-
-
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.
Make NullToStrictStringFuncCallArgRector run without scope (#4792)
- Loading branch information
1 parent
685fe90
commit 514df0a
Showing
18 changed files
with
74 additions
and
82 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
37 changes: 37 additions & 0 deletions
37
...1/Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/preg_match_callable.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
final class PregMatchCallable | ||
{ | ||
public function run($regex) | ||
{ | ||
preg_replace_callback($regex, 'value', function (array $match) use ( | ||
&$string | ||
): string { | ||
$innerPattern = $match['content']; | ||
$positionDelimiter = strpos($innerPattern, ''); | ||
}); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
final class PregMatchCallable | ||
{ | ||
public function run($regex) | ||
{ | ||
preg_replace_callback($regex, 'value', function (array $match) use ( | ||
&$string | ||
): string { | ||
$innerPattern = $match['content']; | ||
$positionDelimiter = strpos((string) $innerPattern, ''); | ||
}); | ||
} | ||
} | ||
|
||
?> |
2 changes: 1 addition & 1 deletion
2
...cCall/NullToStrictStringFuncCallArgRector/Fixture/skip_constant_string_param_type.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
27 changes: 0 additions & 27 deletions
27
...Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/skip_error_type.php.inc
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...Call/NullToStrictStringFuncCallArgRector/Fixture/skip_intersection_string_numeric.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
2 changes: 1 addition & 1 deletion
2
...or/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/skip_method_call_on_trait.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
2 changes: 1 addition & 1 deletion
2
...StringFuncCallArgRector/Fixture/skip_not_registered_func_call_with_named_argument.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
2 changes: 1 addition & 1 deletion
2
...81/Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/skip_reassign_cast.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
2 changes: 1 addition & 1 deletion
2
...l/NullToStrictStringFuncCallArgRector/Fixture/skip_str_replace_pass_array_subject.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
2 changes: 1 addition & 1 deletion
2
...ector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/skip_string_param_type.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
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