-
-
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.
[DeadCode] Handle duplicated annotation on space before close parenth…
…eses on RemoveUselessParamTagRector (#4795) * Create do_not_duplicate_annotations.php.inc rectorphp/rector#8101 * Fixes #4641 Closes rectorphp/rector#8101 * Fixed 🎉 * fix * ensure bracket compared * cs fix * cs fix --------- Co-authored-by: mkrauss <m.d.krauss@gmail.com>
- Loading branch information
1 parent
d8d4e8d
commit 83fdfb3
Showing
2 changed files
with
67 additions
and
9 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
45 changes: 45 additions & 0 deletions
45
...ctor/ClassMethod/RemoveUselessParamTagRector/Fixture/do_not_duplicate_annotations.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,45 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
final class DoNotDuplicateAnnotations | ||
{ | ||
/** | ||
* @ApiDoc( | ||
* description = "Some Description" | ||
* | ||
* ) | ||
* | ||
* @Route("/some/route") | ||
* | ||
* @param string $thing | ||
*/ | ||
public function foo(string $thing) | ||
{ | ||
echo $thing; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
final class DoNotDuplicateAnnotations | ||
{ | ||
/** | ||
* @ApiDoc( | ||
* description = "Some Description" | ||
* | ||
* ) | ||
* | ||
* @Route("/some/route") | ||
*/ | ||
public function foo(string $thing) | ||
{ | ||
echo $thing; | ||
} | ||
} | ||
|
||
?> |