diff --git a/composer.json b/composer.json index 08245173..5b8d4651 100644 --- a/composer.json +++ b/composer.json @@ -58,9 +58,9 @@ }, "require-dev": { "doctrine/annotations": "^1.9", - "ekino/phpstan-banned-code": "^0.4", + "ekino/phpstan-banned-code": "^1.0", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan": "^1.6", "psr/log": "^1", "symfony/browser-kit": "^5.1|^6.0", "symfony/expression-language": "^5.1|^6.0", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 76e753a4..0e3edf7a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,21 +2,21 @@ includes: - vendor/ekino/phpstan-banned-code/extension.neon parameters: + level: 1 + bootstrapFiles: - config/tags.php - tests/bootstrap.php - vendor/bin/.phpunit/phpunit/vendor/autoload.php - excludes_analyse: - - tests/fixtures/app/var/ - - tests/fixtures/Unit/Service/Git/bin - - level: 1 - paths: - 'src' - 'tests' + excludePaths: + - tests/fixtures/app/var/ + - tests/fixtures/Unit/Service/Git/bin + banned_code: nodes: #- diff --git a/src/Command/DebugCommand.php b/src/Command/DebugCommand.php index 68927b35..20638231 100644 --- a/src/Command/DebugCommand.php +++ b/src/Command/DebugCommand.php @@ -188,7 +188,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int private function getOrders(array $rawOrders): array { $orders = []; - foreach ($rawOrders ?? [] as $field) { + foreach ($rawOrders as $field) { if (str_starts_with($field, 'desc:')) { $orders[substr($field, 5)] = false; continue;