Skip to content

Commit f6cab89

Browse files
staabmondrejmirtes
authored andcommitted
Simplify ClassPropertiesNode->getUninitializedProperties()
1 parent b04bb5a commit f6cab89

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Node/ClassPropertiesNode.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,10 @@ public function getUninitializedProperties(
126126
}
127127
$originalProperties[$property->getName()] = $property;
128128
$is = TrinaryLogic::createFromBoolean($property->isPromoted() && !$property->isPromotedFromTrait());
129-
if (!$is->yes()) {
129+
if (!$is->yes() && $classReflection->hasNativeProperty($property->getName())) {
130+
$propertyReflection = $classReflection->getNativeProperty($property->getName());
131+
130132
foreach ($extensions as $extension) {
131-
if (!$classReflection->hasNativeProperty($property->getName())) {
132-
continue;
133-
}
134-
$propertyReflection = $classReflection->getNativeProperty($property->getName());
135133
if (!$extension->isInitialized($propertyReflection, $property->getName())) {
136134
continue;
137135
}

0 commit comments

Comments
 (0)