Skip to content

Commit 927dd44

Browse files
committed
Swap condition order: check getObjectClassNames() before pickProperty()
1 parent 4f11c35 commit 927dd44

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Rules/Properties/AccessPropertiesCheck.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ private function processSingleProperty(Scope $scope, PropertyFetch $node, string
140140
return [];
141141
}
142142

143-
$maybePropertyReflection = $this->pickProperty($scope, $type, $name);
144-
if ($maybePropertyReflection !== null && $maybePropertyReflection->isDummy()->no()) {
143+
if ($type->getObjectClassNames() === []) {
145144
return [];
146145
}
147146

148-
if ($type->getObjectClassNames() === []) {
147+
$maybePropertyReflection = $this->pickProperty($scope, $type, $name);
148+
if ($maybePropertyReflection !== null && $maybePropertyReflection->isDummy()->no()) {
149149
return [];
150150
}
151151
}

0 commit comments

Comments
 (0)