Skip to content
Prev Previous commit
Next Next commit
lint
  • Loading branch information
liamduckett committed Jul 24, 2025
commit 29a73c11f08f8a7d00c0ff9e19f58ff4b43886d3
16 changes: 9 additions & 7 deletions src/Type/Php/PropertyExistsTypeSpecifyingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public function specifyTypes(
} elseif ($objectType->isObject()->yes()) {
$propertyNodes = [];

foreach($propertyNameTypes as $propertyNameType) {
if($propertyNameType->getValue() === '') {
foreach ($propertyNameTypes as $propertyNameType) {
if ($propertyNameType->getValue() === '') {
return new SpecifiedTypes([], []);
}

Expand All @@ -91,12 +91,14 @@ public function specifyTypes(
return new SpecifiedTypes([], []);
}

foreach($propertyNodes as $propertyNode) {
foreach ($propertyNodes as $propertyNode) {
$propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($propertyNode, $scope);
if ($propertyReflection !== null) {
if (!$propertyReflection->isNative()) {
return new SpecifiedTypes([], []);
}
if ($propertyReflection === null) {
continue;
}

if (!$propertyReflection->isNative()) {
return new SpecifiedTypes([], []);
}
}

Expand Down