-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php83] Add implements interface support on AddOverrideAttributeToOve…
…rriddenMethodsRector (#5429)
- Loading branch information
1 parent
1f9829d
commit b007a8b
Showing
3 changed files
with
85 additions
and
35 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...OverriddenMethodsRector/Fixture/apply_attribute_to_override_method_from_interface.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,30 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\Fixture; | ||
|
||
use Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\Source\ExampleFromInterface; | ||
|
||
class ApplyAttributeToOverrideMethodFromInterface implements ExampleFromInterface | ||
{ | ||
public function foo() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\Fixture; | ||
|
||
use Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\Source\ExampleFromInterface; | ||
|
||
class ApplyAttributeToOverrideMethodFromInterface implements ExampleFromInterface | ||
{ | ||
#[\Override] | ||
public function foo() | ||
{ | ||
} | ||
} | ||
|
||
?> |
8 changes: 8 additions & 0 deletions
8
...ClassMethod/AddOverrideAttributeToOverriddenMethodsRector/Source/ExampleFromInterface.php
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,8 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\Source; | ||
|
||
interface ExampleFromInterface | ||
{ | ||
public function foo(); | ||
} |
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