Skip to content

Commit

Permalink
Get rid of instanceof TypeWithClassName in TypeSpecifier
Browse files Browse the repository at this point in the history
  • Loading branch information
herndlm authored and ondrejmirtes committed Jan 16, 2023
1 parent a30e267 commit fc8e156
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Analyser/TypeSpecifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use function array_filter;
use function array_key_exists;
Expand Down Expand Up @@ -152,7 +151,7 @@ public function specifyTypesInCondition(
if ($type instanceof UnionType || $type instanceof IntersectionType) {
return $traverse($type);
}
if ($type instanceof TypeWithClassName) {
if ($type->getObjectClassNames() !== []) {
return $type;
}
if ($type instanceof GenericClassStringType) {
Expand Down

0 comments on commit fc8e156

Please sign in to comment.