Skip to content

Commit 0d3caab

Browse files
committed
[CodeQuality] Skip used by other property hooks on InlineConstructorDefaultToPropertyRector
1 parent d02f407 commit 0d3caab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function isFoundInAnyPropertyHooks(Class_ $class, string $propertyName):
161161
continue;
162162
}
163163

164-
$isFoundInPropertyAnyHooks = $this->betterNodeFinder->findFirst($property->hooks, function (Node $subNode) use (
164+
$isFoundInPropertyAnyHooks = (bool) $this->betterNodeFinder->findFirst($property->hooks, function (Node $subNode) use (
165165
$class,
166166
$propertyName
167167
): bool {
@@ -172,7 +172,7 @@ private function isFoundInAnyPropertyHooks(Class_ $class, string $propertyName):
172172
return $this->propertyFetchFinder->isLocalPropertyFetchByName($subNode, $class, $propertyName);
173173
});
174174

175-
if ($isFoundInPropertyAnyHooks instanceof Node) {
175+
if ($isFoundInPropertyAnyHooks) {
176176
return true;
177177
}
178178
}

0 commit comments

Comments
 (0)