Skip to content

Commit

Permalink
[Performance][CodingStyle] Check public method only for verify overri…
Browse files Browse the repository at this point in the history
…de interface (#5708)
  • Loading branch information
samsonasik authored Mar 11, 2024
1 parent c0be2b4 commit 5789430
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ public function refactor(Node $node): ?Node
/** @var string $methodName */
$methodName = $this->getName($classMethod->name);

foreach ($interfaces as $interface) {
if ($interface->hasNativeMethod($methodName)) {
continue 2;
if ($classMethod->isPublic()) {
foreach ($interfaces as $interface) {
if ($interface->hasNativeMethod($methodName)) {
continue 2;
}
}
}

Expand Down

0 comments on commit 5789430

Please sign in to comment.