-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LocallyCalledStaticMethodToNonStaticRector when static function i…
…s called using the class name
- Loading branch information
1 parent
bbdeb0f
commit de99118
Showing
3 changed files
with
33 additions
and
5 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
18 changes: 18 additions & 0 deletions
18
...lledStaticMethodToNonStaticRector/Fixture/skip_in_static_closure_using_class_name.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,18 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector\Fixture; | ||
|
||
final class SkipInStaticClosureUsingClassName | ||
{ | ||
public function run() | ||
{ | ||
return static function () { | ||
return SkipInStaticClosureUsingClassName::method("string"); | ||
}; | ||
} | ||
|
||
private static function method(?string $value) | ||
{ | ||
return $value; | ||
} | ||
} |
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