I have set up code inspection for php doc blocks, so now I will get warning if they are missing or incomplete.
When I have one class open, I can use Code > Generate > PhpDocBlocks
to generate them or just start a comment via /*
in front of a method and it will be added.
Also, if exsiting doc blocks are incomplete or wrong, I can use Update DocBlock
in order to match the DocBlock of a method to the actual method's signature.
Is there a way of applying these, both the doc block generation and, if necessary, the update of a doc block over the entire codebase without manually initializing this in each class?
I am looking for a batch process.
Press Alt+Insert , then select Generate PHPDoc blocks, and choose the code construct to generate PHPDoc comments for.
phpDoc blocks are descriptive comments that are part of the application code. They are used to describe the PHP element in the exact location in the code where the element appears. The block consists of a short description, long description, and phpDoc tags.
In the project overview, you can right click a folder and select Inspect Code
. It's also available via Code > Inspect Code
.
A window will pop up asking you for further detail and you also can expect the scope to whole context.
Make sure your Inspection Profile contains PHPDoc. If the inspection has run through, you then will have a PHPDoc section,
By right clicking you then can Apply Fix
even for multiple classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With