From 1f1d6beff7dca688c4b63ea28eb84370d1988410 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 20 Sep 2025 14:29:39 +0200 Subject: [PATCH] use innmind/static-analysis --- composer.json | 2 +- src/Button.php | 1 + src/Card.php | 1 + src/Center.php | 1 + src/Grid.php | 1 + src/Image.php | 1 + src/Listing.php | 1 + src/NavigationLink.php | 1 + src/Picker.php | 1 + src/Progress.php | 1 + src/ScrollView.php | 1 + src/Shape/Kind.php | 1 + src/Stack.php | 1 + src/Svg.php | 1 + src/Text.php | 1 + src/Toolbar.php | 1 + src/View/Container.php | 1 + src/Window.php | 1 + src/Zoom.php | 1 + 19 files changed, 19 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d040c75..b18cfa7 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ } }, "require-dev": { - "vimeo/psalm": "~5.13", + "innmind/static-analysis": "^1.2.1", "innmind/coding-standard": "~2.0" } } diff --git a/src/Button.php b/src/Button.php index b3afad0..8a68774 100644 --- a/src/Button.php +++ b/src/Button.php @@ -56,6 +56,7 @@ public function selectedWhen(bool $selected): self ); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Card.php b/src/Card.php index 44150b7..2a7af56 100644 --- a/src/Card.php +++ b/src/Card.php @@ -25,6 +25,7 @@ public static function of(View $inner): self return new self(Center::of($inner)); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Center.php b/src/Center.php index a7f6c59..5a703b1 100644 --- a/src/Center.php +++ b/src/Center.php @@ -25,6 +25,7 @@ public static function of(View $inner): self return new self($inner); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Grid.php b/src/Grid.php index 130c03d..56a3df2 100644 --- a/src/Grid.php +++ b/src/Grid.php @@ -32,6 +32,7 @@ public static function of(Sequence $cards): self return new self($cards); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Image.php b/src/Image.php index 7ed2dc8..11c36be 100644 --- a/src/Image.php +++ b/src/Image.php @@ -31,6 +31,7 @@ public function shape(Shape $shape): View return $shape->wrap($this); } + #[\Override] public function render(): Content { return Lines::of(\sprintf( diff --git a/src/Listing.php b/src/Listing.php index 595a2f3..524b897 100644 --- a/src/Listing.php +++ b/src/Listing.php @@ -32,6 +32,7 @@ public static function of(Sequence $elements): self return new self($elements); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/NavigationLink.php b/src/NavigationLink.php index 1e3fadd..6609085 100644 --- a/src/NavigationLink.php +++ b/src/NavigationLink.php @@ -56,6 +56,7 @@ public function selectedWhen(bool $selected): self ); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Picker.php b/src/Picker.php index 8f296a2..b78dfb3 100644 --- a/src/Picker.php +++ b/src/Picker.php @@ -51,6 +51,7 @@ public function disableWhen(bool $disable): self ); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Progress.php b/src/Progress.php index d8286bd..8436b08 100644 --- a/src/Progress.php +++ b/src/Progress.php @@ -26,6 +26,7 @@ public static function new(): self return new self; } + #[\Override] public function render(): Content { $svg = static fn(bool $black): string => \sprintf( diff --git a/src/ScrollView.php b/src/ScrollView.php index 9335c6a..fa1a9a8 100644 --- a/src/ScrollView.php +++ b/src/ScrollView.php @@ -25,6 +25,7 @@ public static function of(View $inner): self return new self($inner); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Shape/Kind.php b/src/Shape/Kind.php index a0822d3..30d9bea 100644 --- a/src/Shape/Kind.php +++ b/src/Shape/Kind.php @@ -40,6 +40,7 @@ public static function circle(View $inner): self return new self($inner, 'circle'); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Stack.php b/src/Stack.php index 9a51dc3..ff45c0c 100644 --- a/src/Stack.php +++ b/src/Stack.php @@ -42,6 +42,7 @@ public static function vertical(View $first, View $second, View ...$rest): self return new self(false, Sequence::of($first, $second, ...$rest)); } + #[\Override] public function render(): Content { $class = match ($this->horizontal) { diff --git a/src/Svg.php b/src/Svg.php index 593b111..d67df9b 100644 --- a/src/Svg.php +++ b/src/Svg.php @@ -33,6 +33,7 @@ public function zoom(int $size): View return Zoom::of($this, $size); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Text.php b/src/Text.php index 30358ed..8627b8f 100644 --- a/src/Text.php +++ b/src/Text.php @@ -38,6 +38,7 @@ public static function escape(string $string): string ); } + #[\Override] public function render(): Content { return Content::ofString(self::escape($this->text)); diff --git a/src/Toolbar.php b/src/Toolbar.php index 9cc90e0..46a9f75 100644 --- a/src/Toolbar.php +++ b/src/Toolbar.php @@ -50,6 +50,7 @@ public function trailing(View $view): self ); } + #[\Override] public function render(): Content { $lines = Lines::of( diff --git a/src/View/Container.php b/src/View/Container.php index 786679d..39d3459 100644 --- a/src/View/Container.php +++ b/src/View/Container.php @@ -30,6 +30,7 @@ public static function of(View $view): self return new self($view); } + #[\Override] public function render(): Content { return Lines::of( diff --git a/src/Window.php b/src/Window.php index 08f3a63..b838c65 100644 --- a/src/Window.php +++ b/src/Window.php @@ -42,6 +42,7 @@ public function stylesheet(Url $url): self ); } + #[\Override] public function render(): Content { $lines = Lines::of( diff --git a/src/Zoom.php b/src/Zoom.php index b629c5c..acbea60 100644 --- a/src/Zoom.php +++ b/src/Zoom.php @@ -33,6 +33,7 @@ public static function of(View $inner, int $size): self return new self($inner, $size); } + #[\Override] public function render(): Content { return Lines::of(