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 279ab98 commit b77bbd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/Fixture/Methods/PrivateInFinalClassRule/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ protected function method(): void
};

$bar = new class() {
use TraitWithProtectedMethod;
};

$baz = new class() {
use TraitWithAbstractProtectedMethod;

protected function method(): void
Expand Down
6 changes: 5 additions & 1 deletion test/Integration/Methods/PrivateInFinalClassRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public function testPrivateInFinalClassRule(): void
],
[
'Method method() in anonymous class is protected, but since the containing class is final, it can be private.',
16,
9,
],
[
'Method method() in anonymous class is protected, but since the containing class is final, it can be private.',
20,
],
],
);
Expand Down

0 comments on commit b77bbd2

Please sign in to comment.