Skip to content

Commit 305d1bb

Browse files
committed
skip non-public
1 parent 9f77a27 commit 305d1bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

rules/DeadCode/Rector/ClassMethod/RemoveParentDelegatingConstructorRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ public function refactor(Node $node): ?int
102102
return null;
103103
}
104104

105+
if (! $node->isPublic()) {
106+
return null;
107+
}
108+
105109
$parentMethodReflection = $this->matchParentConstructorReflection($node);
106110
if (! $parentMethodReflection instanceof ExtendedMethodReflection) {
107111
return null;

0 commit comments

Comments
 (0)