-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Remove @return void on return self on RemoveUselessReturnT…
…agRector (#4894) * [DeadCode] Remove @return void on return self on RemoveUselessReturnTagRector * [DeadCode] Remove @return void on return self on RemoveUselessReturnTagRector * rework: check empty description early * reduce unused method * Fix * fix * [ci-review] Rector Rectify * final touch: add remove void on void fixture --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
3243e0e
commit d5f399e
Showing
5 changed files
with
77 additions
and
29 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ode/Rector/ClassMethod/RemoveUselessReturnTagRector/Fixture/return_void_on_fluent.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\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
final class ReturnVoidOnFluent | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function resolve(): self | ||
{ | ||
return $this; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
final class ReturnVoidOnFluent | ||
{ | ||
public function resolve(): self | ||
{ | ||
return $this; | ||
} | ||
} | ||
|
||
?> |
28 changes: 28 additions & 0 deletions
28
...dCode/Rector/ClassMethod/RemoveUselessReturnTagRector/Fixture/return_void_on_void.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,28 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
final class ReturnVoidOnVoid | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function resolve(): void | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
final class ReturnVoidOnVoid | ||
{ | ||
public function resolve(): void | ||
{ | ||
} | ||
} | ||
|
||
?> |
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