Skip to content

Commit

Permalink
Simplify ClassPropertiesNode->getUninitializedProperties()
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Feb 1, 2024
1 parent b04bb5a commit f6cab89
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Node/ClassPropertiesNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,10 @@ public function getUninitializedProperties(
}
$originalProperties[$property->getName()] = $property;
$is = TrinaryLogic::createFromBoolean($property->isPromoted() && !$property->isPromotedFromTrait());
if (!$is->yes()) {
if (!$is->yes() && $classReflection->hasNativeProperty($property->getName())) {
$propertyReflection = $classReflection->getNativeProperty($property->getName());

foreach ($extensions as $extension) {
if (!$classReflection->hasNativeProperty($property->getName())) {
continue;
}
$propertyReflection = $classReflection->getNativeProperty($property->getName());
if (!$extension->isInitialized($propertyReflection, $property->getName())) {
continue;
}
Expand Down

0 comments on commit f6cab89

Please sign in to comment.