-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip description on same line, remove on next line as based on phpdoc…
…-parser in RemoveUselessParamTagRector (#4551) Co-authored-by: Travis Carden <travis.carden@gmail.com>
- Loading branch information
1 parent
8c5507f
commit 715a047
Showing
5 changed files
with
76 additions
and
74 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...emoveUselessParamTagRector/Fixture/multiline_comment_for_userland_class_type_hint.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,42 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
final class MultilineCommentForUserlandClassTypeHint | ||
{ | ||
/** | ||
* @param string $primitiveValue | ||
* A primitive is fine. | ||
* @param UserlandClass $userlandClass | ||
* A user land class is not. | ||
*/ | ||
public function test(string $primitiveValue, callable $callableValue, UserlandClass $userlandClass) | ||
{ | ||
} | ||
} | ||
|
||
class UserlandClass | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
final class MultilineCommentForUserlandClassTypeHint | ||
{ | ||
/** A primitive is fine. | ||
* A user land class is not. | ||
*/ | ||
public function test(string $primitiveValue, callable $callableValue, UserlandClass $userlandClass) | ||
{ | ||
} | ||
} | ||
|
||
class UserlandClass | ||
{ | ||
} | ||
|
||
?> |
22 changes: 22 additions & 0 deletions
22
...UselessParamTagRector/Fixture/skip_multiline_comment_for_userland_class_type_hint.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,22 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture; | ||
|
||
final class MultilineCommentForUserlandClassTypeHint | ||
{ | ||
/** | ||
* @param string $primitiveValue start on first line | ||
* A primitive is fine. | ||
* @param callable $callableValue start on first line | ||
* A PHP core class is fine. | ||
* @param AnotherUserlandClass $userlandClass start on first line | ||
* A user land class is not. | ||
*/ | ||
public function test(string $primitiveValue, callable $callableValue, AnotherUserlandClass $userlandClass) | ||
{ | ||
} | ||
} | ||
|
||
class AnotherUserlandClass | ||
{ | ||
} |
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