Skip to content

Commit d308207

Browse files
committed
Update FinalPrivateMethodRuleTest.php
1 parent 0bc2d71 commit d308207

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/PHPStan/Rules/Methods/FinalPrivateMethodRuleTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)