Skip to content

Commit

Permalink
Fix: Add test case
Browse files Browse the repository at this point in the history
Related to #893.
  • Loading branch information
localheinz committed Jan 6, 2025
1 parent 2193f14 commit fb58818
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/Fixture/Methods/PrivateInFinalClassRule/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ protected function method(): void
};

$baz = new class() {
use TraitWithProtectedMethod;

protected function method(): void
{
}
};

$qux = new class() {
use TraitWithAbstractProtectedMethod;

protected function method(): void
Expand Down
4 changes: 4 additions & 0 deletions test/Integration/Methods/PrivateInFinalClassRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function testPrivateInFinalClassRule(): void
'Method method() in anonymous class is protected, but since the containing class is final, it can be private.',
20,
],
[
'Method method() in anonymous class is protected, but since the containing class is final, it can be private.',
28,
],
],
);
}
Expand Down

0 comments on commit fb58818

Please sign in to comment.