File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
tests/PHPStan/Rules/Methods Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,17 @@ protected function getRule(): Rule
1717
1818 public function testRule (): void
1919 {
20- $ error = [];
20+ $ errors = [];
2121 if (PHP_VERSION_ID >= 80000 ) {
22- $ error = [
23- 'Private method FinalPrivateMethod\Foo::foo() cannot be final as it is never overridden by other classes. ' ,
24- 8 ,
22+ $ errors = [
23+ [
24+ 'Private method FinalPrivateMethod\Foo::foo() cannot be final as it is never overridden by other classes. ' ,
25+ 8 ,
26+ ]
2527 ];
2628 }
2729
28- $ this ->analyse ([__DIR__ . '/data/final-private-method.php ' ], [
29- $ error ,
30+ $ errors = array_merge ($ errors , [
3031 [
3132 'Private method FinalPrivateMethod\FooBarPhp8orHigher::foo() cannot be final as it is never overridden by other classes. ' ,
3233 39 ,
@@ -40,6 +41,8 @@ public function testRule(): void
4041 69 ,
4142 ],
4243 ]);
44+
45+ $ this ->analyse ([__DIR__ . '/data/final-private-method.php ' ], $ errors );
4346 }
4447
4548}
You can’t perform that action at this time.
0 commit comments