Skip to content

Commit 3cc6af6

Browse files
Fix rebase
1 parent de2877a commit 3cc6af6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Rules/Properties/AccessPropertiesCheck.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ private function pickProperty(Scope $scope, Type $type, string $name): ?Extended
274274
$types = [];
275275
if ($type instanceof UnionType) {
276276
foreach ($type->getTypes() as $innerType) {
277-
if ($innerType->hasProperty($name)->no()) {
277+
if ($innerType->hasInstanceProperty($name)->no()) {
278278
continue;
279279
}
280280

@@ -284,15 +284,15 @@ private function pickProperty(Scope $scope, Type $type, string $name): ?Extended
284284

285285
if (count($types) === 0) {
286286
try {
287-
return $type->getProperty($name, $scope);
287+
return $type->getInstanceProperty($name, $scope);
288288
} catch (MissingPropertyFromReflectionException) {
289289
return null;
290290
}
291291
}
292292

293293
if (count($types) === 1) {
294294
try {
295-
return $types[0]->getProperty($name, $scope);
295+
return $types[0]->getInstanceProperty($name, $scope);
296296
} catch (MissingPropertyFromReflectionException) {
297297
return null;
298298
}
@@ -301,7 +301,7 @@ private function pickProperty(Scope $scope, Type $type, string $name): ?Extended
301301
$unionType = TypeCombinator::union(...$types);
302302

303303
try {
304-
return $unionType->getProperty($name, $scope);
304+
return $unionType->getInstanceProperty($name, $scope);
305305
} catch (MissingPropertyFromReflectionException) {
306306
return null;
307307
}

0 commit comments

Comments
 (0)