Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Remove unused @return mixed on RemoveUselessReturnTagRector (
#5332) * [DeadCode] Remove unused @return mixed on RemoveUselessReturnTagRector * implemented 🎉 * more fixture
- Loading branch information
1 parent
1daab3c
commit 043d43c
Showing
3 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...dCode/Rector/ClassMethod/RemoveUselessReturnTagRector/Fixture/remove_return_mixed.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,34 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
use stdClass; | ||
|
||
class RemoveReturnMixed | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
function foo(): stdClass | ||
{ | ||
return new stdClass(); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
use stdClass; | ||
|
||
class RemoveReturnMixed | ||
{ | ||
function foo(): stdClass | ||
{ | ||
return new stdClass(); | ||
} | ||
} | ||
|
||
?> |
30 changes: 30 additions & 0 deletions
30
...Code/Rector/ClassMethod/RemoveUselessReturnTagRector/Fixture/remove_return_mixed2.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; | ||
|
||
class RemoveReturnMixed2 | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
function foo(): mixed | ||
{ | ||
return null; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
class RemoveReturnMixed2 | ||
{ | ||
function foo(): mixed | ||
{ | ||
return null; | ||
} | ||
} | ||
|
||
?> |
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