-
-
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.
[DeadCode] Skip Remove @return/@param null functionality in case of s…
…ub type (#5350) * [DeadCode] Remove @return/@param null only when has native type already * move to usefull check * param null with description * skip * [ci-review] Rector Rectify * skip remove null * remove null same type --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
287eab3
commit 68c42e7
Showing
7 changed files
with
45 additions
and
61 deletions.
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
...tests/DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector/Fixture/remove_null.php.inc
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
.../ClassMethod/RemoveUselessParamTagRector/Fixture/skip_param_null_with_description.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,15 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
class SkipParamNullWithDescription | ||
{ | ||
/** | ||
* @param null $a this is description | ||
*/ | ||
public function foo(int $a = null) | ||
{ | ||
|
||
} | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
.../DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector/Fixture/skip_remove_null.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,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
class SkipRemoveNull | ||
{ | ||
/** | ||
* @param null $a | ||
*/ | ||
public function foo(int $a = 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
14 changes: 14 additions & 0 deletions
14
...DeadCode/Rector/ClassMethod/RemoveUselessReturnTagRector/Fixture/skip_remove_null.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,14 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector\Fixture; | ||
|
||
class SkipRemoveNull | ||
{ | ||
/** | ||
* @return null | ||
*/ | ||
function foo(): ?int | ||
{ | ||
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
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