Skip to content

Commit 4684f62

Browse files
committed
move empty string check, to satisfy static analysis
1 parent ecff9a1 commit 4684f62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Type/Php/PropertyExistsTypeSpecifyingExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ public function specifyTypes(
6868

6969
$hasPropertyTypes = [];
7070
foreach ($propertyNameTypes as $propertyNameType) {
71-
if($propertyNameType->getValue() === '') {
72-
return new SpecifiedTypes([], []);
73-
}
74-
7571
$hasPropertyTypes[] = new HasPropertyType($propertyNameType->getValue());
7672
}
7773

@@ -82,6 +78,10 @@ public function specifyTypes(
8278
$propertyNodes = [];
8379

8480
foreach($propertyNameTypes as $propertyNameType) {
81+
if($propertyNameType->getValue() === '') {
82+
return new SpecifiedTypes([], []);
83+
}
84+
8585
$propertyNodes[] = new PropertyFetch(
8686
$node->getArgs()[0]->value,
8787
new Identifier($propertyNameType->getValue()),

0 commit comments

Comments
 (0)