Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs
1.37k
stars
170
forks
source link
SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses false positive producing invalid syntax #1672
Open
whitefang57 opened 2 months ago
Using the following example:
Running phpcs using the Doctrine Coding Standard against this file produces the following:
As you can see, the first block was not flagged as violating the standard while the second and third were.
phpcbf
modifies the file in the following way:Which does not make it syntactically invalid, but does drastically change the meaning of the code.
Before running
phpcbf
it outputs:After running
phpcbf
it outputs: