-
-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DowngradePhp70] Handle DowngradeScalarTypeDeclarationRector on Closu…
…re (#102)
- Loading branch information
1 parent
592ca48
commit 4da81fa
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...adePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector/Fixture/closure.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,28 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp70\Rector\FunctionLike\DowngradeScalarTypeDeclarationRector\Fixture; | ||
|
||
do_something(function ( string $to_return ) : string { | ||
return $to_return; | ||
}); | ||
|
||
function do_something($returner) { | ||
$returned = $returner('abc123'); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp70\Rector\FunctionLike\DowngradeScalarTypeDeclarationRector\Fixture; | ||
|
||
do_something(function ( $to_return ) { | ||
$to_return = (string) $to_return; | ||
return $to_return; | ||
}); | ||
|
||
function do_something($returner) { | ||
$returned = $returner('abc123'); | ||
} | ||
|
||
?> |
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