Emily Virginita
Emily Virginita

Reputation: 161

Remove entirely PHPDoc from all files / or this file?

Is it possible to delete/remove all PHPDoc from all files or File that we are working on?

enter image description here

I mean this things and all other comments like that PHPDoc etc

Upvotes: 1

Views: 2164

Answers (2)

Fabiano
Fabiano

Reputation: 9

In 2022, now have a rule in the inspection section: File > Settings > Inspections, then PHPDoc and finally Redundant PHPDoc comment. I changed it to a Weak Warning first, then went to one of the classes I had the issue and ran Code > Inspect Code, only on that file. Click on Analyse.

A panel of Inspection results will show up and Redundant PHPDoc comment, will show in PHP > PHPDoc section. Click on it, and on the right side, you will have another button "Run inspection on ...". That will run an inspection ONLY for that rule. Click on it and choose a custom scope or the whole project. Click Ok.

Now the inspection results will show all occurrences of that case. You can click on the first file on the left panel and SHIFT + click the last one and finally click the "Remove redundant PHPDoc comment" button on the right panel.

Not really intuitive, but did the trick for me.

Upvotes: 0

Jaime
Jaime

Reputation: 6091

There are many options to consider:

Upvotes: 1

Related Questions