From 59b4ada78813ae99e860555b67ab2fd9b862ed99 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Wed, 20 Nov 2024 22:13:15 +0900 Subject: [PATCH] Update PHPStan 2.0 --- composer.json | 2 +- phpstan.neon | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 801f9c2..17a9e0d 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.0", "friendsofphp/php-cs-fixer": "^2.17", - "phpstan/phpstan": "~0.12.0", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^9.2" }, "autoload": { diff --git a/phpstan.neon b/phpstan.neon index d08e518..c0663ae 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,7 +2,8 @@ parameters: level: 7 paths: [ src ] ignoreErrors: - - '/If condition is always false/' - - '/If condition is always true/' - - '/Unreachable statement/' - + - identifier: deadCode.unreachable + - identifier: empty.offset + - identifier: if.alwaysFalse + - identifier: if.alwaysTrue + - identifier: method.unused