-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DowngradePhp80] Remove self return type if child already has no retu…
…rn type (#725) * [DowngradePhp80] Remove self return type if child already has no return type * comment * fix * clean up * phpstan
- Loading branch information
1 parent
3c8f8a0
commit ceb4930
Showing
3 changed files
with
108 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
44 changes: 44 additions & 0 deletions
44
...gradeStaticTypeDeclarationRector/Fixture/remove_self_child_already_no_return_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector\Fixture; | ||
|
||
interface RemoveSelfChildAlreadyNoType | ||
{ | ||
public function run(): self; | ||
} | ||
|
||
class Child implements RemoveSelfChildAlreadyNoType | ||
{ | ||
// return type may removed by other rules | ||
// @see https://github.com/rectorphp/rector/issues/6652 | ||
public function run() | ||
{ | ||
|
||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector\Fixture; | ||
|
||
interface RemoveSelfChildAlreadyNoType | ||
{ | ||
/** | ||
* @return $this | ||
*/ | ||
public function run(); | ||
} | ||
|
||
class Child implements RemoveSelfChildAlreadyNoType | ||
{ | ||
// return type may removed by other rules | ||
// @see https://github.com/rectorphp/rector/issues/6652 | ||
public function run() | ||
{ | ||
|
||
} | ||
} | ||
|
||
?> |
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