-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php81] Skip const Fetch non static method on FirstClassCallableRector (
#3183) Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
5ccf468
commit 8bf7073
Showing
5 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...llableRector/Fixture/skip_non_static_private_method_with_other_object_const_fetch.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Fixture; | ||
|
||
use Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Source\SomeExternalObject; | ||
|
||
final class SkipNonStaticPrivateMethodWithOtherObjectConstFetch | ||
{ | ||
public function provideListenerPriority(): array | ||
{ | ||
return [ | ||
'listener' => [ | ||
[SomeExternalObject::class, 'sleepPrivateStatic'], | ||
], | ||
]; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...y_/FirstClassCallableRector/Fixture/skip_non_static_with_other_object_const_fetch.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Fixture; | ||
|
||
use Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Source\SomeExternalObject; | ||
|
||
final class SkipNonStaticWithOtherObjectConstFetch | ||
{ | ||
public function provideListenerPriority(): array | ||
{ | ||
return [ | ||
'listener' => [ | ||
[SomeExternalObject::class, 'sleepOver'], | ||
], | ||
]; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...ctor/Array_/FirstClassCallableRector/Fixture/static_with_other_object_const_fetch.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,31 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Fixture; | ||
|
||
use Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Source\SomeExternalObject; | ||
|
||
final class StaticWithOtherObjectConstFetch | ||
{ | ||
public function provideListenerPriority(): array | ||
{ | ||
return [SomeExternalObject::class, 'sleepStatic']; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Fixture; | ||
|
||
use Rector\Tests\Php81\Rector\Array_\FirstClassCallableRector\Source\SomeExternalObject; | ||
|
||
final class StaticWithOtherObjectConstFetch | ||
{ | ||
public function provideListenerPriority(): array | ||
{ | ||
return SomeExternalObject::sleepStatic(...); | ||
} | ||
} | ||
|
||
?> |
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