-
-
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.
Fix removal of useless @param tag when string|null insteadof ?string …
…is used. (#5684) Fixed by removing the "skip union types" in ParamTagRemover. This was added to fix a different bug, cause a bug in TypeHasher, where the normalized UnionType was actually overwritten by the last element in the union, Co-authored-by: Arjen Schol <arjen.schol@lyceo.nl>
- Loading branch information
1 parent
b925e54
commit 9b4ad93
Showing
3 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...dCode/Rector/ClassMethod/RemoveUselessParamTagRector/Fixture/remove_nullable_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,28 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
class WithNullableType | ||
{ | ||
/** | ||
* @param string|null $nullable | ||
*/ | ||
function foo(?string $nullable) | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
class WithNullableType | ||
{ | ||
function foo(?string $nullable) | ||
{ | ||
} | ||
} | ||
|
||
?> |
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