From 7e91d570c78464c1a25487e39e78d52484609afd Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sat, 6 Jun 2026 07:58:31 +0000 Subject: [PATCH] Fix static analysis CI step error --- .gitignore | 1 + phpstan.dist.neon | 10 ++++++++++ src/Factory/RatingFactory.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 phpstan.dist.neon diff --git a/.gitignore b/.gitignore index e5cac5c..f48a397 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ ###> phpstan/phpstan ### phpstan.* +!phpstan.dist.neon ###< phpstan/phpstan ### diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 0000000..4278926 --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,10 @@ +parameters: + level: 6 + paths: + - bin/ + - config/ + - public/ + - src/ + - tests/ +includes: + - phpstan-baseline.neon diff --git a/src/Factory/RatingFactory.php b/src/Factory/RatingFactory.php index 390fb4d..499c687 100644 --- a/src/Factory/RatingFactory.php +++ b/src/Factory/RatingFactory.php @@ -33,7 +33,7 @@ final class RatingFactory extends PersistentObjectFactory { return [ 'score' => self::faker()->numberBetween(1, 5), - 'note' => self::faker()->optional()->sentence(), + 'note' => self::faker()->optional()->sentence() ?? '', 'subject' => RestaurantFactory::new(), 'user' => UserFactory::new(), ];