Hi Rector Team: One question How would you deduplicate phpdoc blocks using rector? #7724
Answered
by
TomasVotruba
alexandreelise
asked this question in
Q&A
|
How to remove unexpected and useless php doc blocks that are sometimes generated through IDE many times again and again. Can it be fixed using a Rector? If not thanks anyway. Have a great day and keep on coding good stuff. For example something like that /**
* @var int $a
*/
/**
* @var int $a
*/
public function show($a)
{
//...some code goes here
} |
Answered by
TomasVotruba
Feb 2, 2023
Replies: 2 comments 2 replies
|
Hi, should I rephrase my question or refine it? Is it too poor quality or off-topic to be answered? Please shed a light to let me understand what did I do wrong. |
1 reply
|
Hi, you can write a custom rule that checks "comments" attribute of the Here is how to write a custom rule: |
1 reply
Answer selected by
TomasVotruba
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, you can write a custom rule that checks "comments" attribute of the
ClassMethodnodeHere is how to write a custom rule:
https://getrector.com/documentation/custom-rule