Skip to content

Commit 0a17a90

Browse files
committed
fix
1 parent 8eed061 commit 0a17a90

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rules/DeadCode/Rector/ClassMethod/RemoveParentDelegatingConstructorRector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ private function isDifferentDefaultValue(
265265
return false;
266266
}
267267

268+
// when parent does not have default value,
269+
// mark as different
270+
if (! $nativeParentParameterReflection->isDefaultValueAvailable()) {
271+
return true;
272+
}
273+
268274
$parentDefault = $nativeParentParameterReflection->getDefaultValue();
269275
if (! $this->valueResolver->isValue($defaultExpr, $parentDefault)) {
270276
return true;

0 commit comments

Comments
 (0)