Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Allow abs() to return int when pass int arg on Ret…
…urnTypeFromStrictTypedCallRector (#5653) * [TypeDeclaration] Allow abs() to return int when pass int arg * [TypeDeclaration] Allow abs() to return int when pass int arg
- Loading branch information
1 parent
99a79f8
commit 6095e32
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...ector/ClassMethod/ReturnTypeFromStrictTypedCallRector/FixturePhp80/abs_return_int.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture; | ||
|
||
final class AbsReturnInt | ||
{ | ||
function aa(int $param) | ||
{ | ||
return abs($param); | ||
} | ||
} | ||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture; | ||
|
||
final class AbsReturnInt | ||
{ | ||
function aa(int $param): int | ||
{ | ||
return abs($param); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters