When using call specific compiler pass for PrettyPrintDocBlocks it removes the line spaces between @params and @return in the doc block which raises an error by the phpcs(Code Sniffer),
Tag cannot be grouped with parameter tags in a doc comment
for example, the following function dockblock considered valid by phpcs
It has to be exactly 1 space after the
tag value @param which on formatting converts to 2 spaces after formatting the file, because the @param and @return tags are grouped and this forces it to add another space after the @param tag.
one blank line between @return and @param tags as they cant be grouped together which is also removed after formatting the file and then causes the above behavior
the above DOC Block is converted to the following once formatted
I looked into the options if there are any available in combination to the current like we have
OrderAndRemoveUseClasses
OnlyOrderUseClasses
Can we have another pass for the PrettyPrintDocBlocks too? Or any alternates to this while keeping the pretty print doc blocks enabled.
When using call specific compiler pass for
PrettyPrintDocBlocks
it removes the line spaces between@params
and@return
in the doc block which raises an error by thephpcs
(Code Sniffer),for example, the following function dockblock considered valid by phpcs
It has to be exactly 1 space after the
tag value
@param
which on formatting converts to 2 spaces after formatting the file, because the@param
and@return
tags are grouped and this forces it to add another space after the@param
tag.one blank line between
@return
and@param
tags as they cant be grouped together which is also removed after formatting the file and then causes the above behaviorthe above DOC Block is converted to the following once formatted
I looked into the options if there are any available in combination to the current like we have
OrderAndRemoveUseClasses
OnlyOrderUseClasses
Can we have another pass for the
PrettyPrintDocBlocks
too? Or any alternates to this while keeping the pretty print doc blocks enabled.| OS | Ubuntu | | PHPFmt | 1.0.30 |
VsCode Version