Skip to content

Commit d64fea0

Browse files
committed
Fix
1 parent 28b69c6 commit d64fea0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ private function isCallableTypeIdentifier(?Node $node): bool
361361

362362
private function shouldSkipPropertyOrParam(Property $property, Param $param): bool
363363
{
364+
foreach ($property->hooks as $hook) {
365+
if (! is_array($hook->body)) {
366+
continue;
367+
}
368+
369+
if (count($hook->body) > 1) {
370+
return true;
371+
}
372+
}
373+
364374
return $property->type instanceof Node
365375
&& $param->type instanceof Node
366376
&& $property->hooks !== []

0 commit comments

Comments
 (0)