Skip to content

Commit 49e82cc

Browse files
authored
Check cast directly (#665)
1 parent 88161f3 commit 49e82cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ private function addReturn0ToExecuteClassMethod(ClassMethod $classMethod): void
146146

147147
private function isReturnIntegerType(?Expr $expr): bool
148148
{
149+
if ($expr instanceof Int_) {
150+
return true;
151+
}
152+
149153
if ($expr instanceof Expr) {
150154
$returnedType = $this->getType($expr);
151155
if ($returnedType instanceof IntegerType) {

0 commit comments

Comments
 (0)