Enable unused ignoredErrors reporting for PHPStan

[MAILPOET-3296]
This commit is contained in:
Rostislav Wolny
2020-12-01 17:16:26 +01:00
committed by Veljko V
parent b4ee9a756a
commit 0ee843723e
3 changed files with 4 additions and 143 deletions

View File

@@ -4,6 +4,8 @@ declare(strict_types = 1);
# see https://github.com/phpstan/phpstan/issues/4060
$config = [];
$config['parameters']['phpVersion'] = 80000;
if (PHP_VERSION_ID < 80000) {
$config['parameters']['ignoreErrors'][] = [
'message' => '#^Else branch is unreachable because ternary operator condition is always true#',
@@ -26,7 +28,7 @@ if (PHP_VERSION_ID < 80000) {
'count' => 1,
];
$config['parameters']['ignoreErrors'][] = [
'message' => '#^Cannot access offset \(int\|string\) on array\|false#',
'message' => '#^Cannot access offset \\(int\\|string\\) on array\\|false#',
'path' => __DIR__ . '/../../lib/Features/FeatureFlagsController.php',
'count' => 1,
];