-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Add Closure support on StrictStringParamConcatRector (
- Loading branch information
1 parent
5965ddd
commit 90f8714
Showing
3 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
...ation/Rector/ClassMethod/StrictStringParamConcatRector/Fixture/skip_inner_closure.php.inc
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...ation/Rector/ClassMethod/StrictStringParamConcatRector/Fixture/with_inner_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,39 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector\Fixture; | ||
|
||
final class WithInnerClosure | ||
{ | ||
public function resolve($item) | ||
{ | ||
$result = $item * 100; | ||
|
||
function ($item) { | ||
return $item . ' world'; | ||
}; | ||
|
||
return $result; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector\Fixture; | ||
|
||
final class WithInnerClosure | ||
{ | ||
public function resolve($item) | ||
{ | ||
$result = $item * 100; | ||
|
||
function (string $item) { | ||
return $item . ' world'; | ||
}; | ||
|
||
return $result; | ||
} | ||
} | ||
|
||
?> |
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