Skip to content

Commit

Permalink
Check cast directly
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Sep 2, 2024
1 parent 88161f3 commit 83a1bda
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ private function addReturn0ToExecuteClassMethod(ClassMethod $classMethod): void

private function isReturnIntegerType(?Expr $expr): bool
{
if ($expr instanceof Int_) {
return true;
}

if ($expr instanceof Expr) {
$returnedType = $this->getType($expr);
if ($returnedType instanceof IntegerType) {
Expand Down

0 comments on commit 83a1bda

Please sign in to comment.