Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 5, 2022
1 parent f2ba789 commit 94d479a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Type/Php/MethodExistsTypeSpecifyingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function specifyTypes(
}

$objectType = $scope->getType($node->getArgs()[0]->value);
if (!$objectType instanceof ObjectType) {
if ($objectType->isString()->yes()) {
if ($objectType instanceof ConstantStringType && $objectType->isClassString()) {
return $this->typeSpecifier->create(
$node->getArgs()[0]->value,
Expand All @@ -66,9 +66,8 @@ public function specifyTypes(
$scope,
);
}
if ($objectType->isString()->yes()) {
return new SpecifiedTypes([], []);
}

return new SpecifiedTypes([], []);
}

return $this->typeSpecifier->create(
Expand Down

0 comments on commit 94d479a

Please sign in to comment.