Skip to content

Commit bcb1ca9

Browse files
committed
phpstan fix: use Type::getObjectClassReflections instead of instanceof TypeWithClassName
1 parent 0d9c061 commit bcb1ca9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Type/PropertyOfType.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ public function isResolvable(): bool
5454
protected function getResult(): Type
5555
{
5656

57-
$classReflection = null;
58-
59-
if ($this->type instanceof TypeWithClassName) {
60-
$classReflection = $this->type->getClassReflection();
61-
}
57+
$classReflections = $this->type->getObjectClassReflections();
58+
$classReflection = $classReflections[0] ?? null;
6259

6360
if ($classReflection !== null) {
6461

0 commit comments

Comments
 (0)