diff --git a/composer.json b/composer.json index 605611a..7be55b8 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "laravel/pint": "^1.13", "pestphp/pest": "^2.0", "phpstan/phpstan": "^1.3", - "rector/rector": "^0.18.5" + "rector/rector": "^1" }, "autoload": { "psr-4": { diff --git a/src/Stat.php b/src/Stat.php index 279b075..9d56c9b 100644 --- a/src/Stat.php +++ b/src/Stat.php @@ -42,7 +42,7 @@ public static function mean(array $data): int|float|null throw new InvalidDataInputException('The data must not be empty.'); } // @phpstan-ignore-next-line - if (!empty(array_filter($data, 'is_string'))) { + if (array_filter($data, 'is_string') !== []) { throw new InvalidDataInputException('The data array contains a string.'); } $sum = array_sum($data);