diff --git a/composer.json b/composer.json index 29152e3..93dc720 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "BSD-3-Clause", "require": { "php": "^8.1", - "phpstan/phpstan": "^1.11" + "phpstan/phpstan": "^1.12.13" }, "require-dev": { "phpunit/phpunit": "^9.6", diff --git a/tests/PHPStan/KeywordSelfRuleTest.php b/tests/PHPStan/KeywordSelfRuleTest.php index 6c82fbb..c5386fe 100644 --- a/tests/PHPStan/KeywordSelfRuleTest.php +++ b/tests/PHPStan/KeywordSelfRuleTest.php @@ -24,17 +24,20 @@ public function provideRule() 'interface' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestInterface.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestInterface' instead.", - 'errorLines' => [13, 18, 18], + // Note that 13 only actually has one violation, but does no harm to be counted twice. + 'errorLines' => [13, 13, 18, 18], ], 'class' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestClass.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestClass' instead.", - 'errorLines' => [9, 11, 16, 16, 18, 20, 21, 21, 25], + // Note that 9 and 21 only actually have one violation, but does no harm to be counted twice. + 'errorLines' => [9, 9, 11, 16, 16, 18, 20, 21, 21, 21, 25], ], 'enum' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestEnum.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestEnum' instead.", - 'errorLines' => [9, 14, 14, 16, 17, 18, 20, 24], + // Note that 9, 16, and 17 only actually have one violation, but does no harm to be counted twice. + 'errorLines' => [9, 9, 14, 14, 16, 16, 17, 17, 18, 20, 24], ], 'trait' => [ 'filePaths' => [