Open ghost opened 2 years ago
Describe the bug A clear and concise description of what the bug is.
Some files have errors and cannot be repaired, so the code has been truncated to make it shorter and easier to understand.
I don't know if it's a bug or not. But other tools don't fail.
phpcbf --version PHP_CodeSniffer version 3.7.1 (stable) by Squiz (http://www.squiz.net)
Code sample
<?php function test() { ?> <?php printf("%d", 1); }
To reproduce Steps to reproduce the behavior:
test.php
phpcs test.php ...
PHPCS output here
C:\tmp>phpcbf --standard=PSR2 -v text2.php Registering sniffs in the PSR2 standard... DONE (43 sniffs registered) Creating file list... DONE (1 files in queue) Changing into directory C:\tmp Processing text2.php [PHP => 28 tokens in 9 lines]... DONE in 24ms (4 fixable violations) => Fixing file: 1/4 violations remaining [made 50 passes]... ERROR in 551ms PHPCBF RESULT SUMMARY ---------------------------------------------------------------------- FILE FIXED REMAINING ---------------------------------------------------------------------- C:\tmp\text2.php FAILED TO FIX ---------------------------------------------------------------------- A TOTAL OF 3 ERRORS WERE FIXED IN 1 FILE ---------------------------------------------------------------------- PHPCBF FAILED TO FIX 1 FILE ---------------------------------------------------------------------- Time: 826ms; Memory: 8MB
Confirmed as reproducable.
Looks like a fixer conflict between the Generic.WhiteSpace.ScopeIndent sniff and the PEAR.Functions.FunctionCallSignature sniff.
Generic.WhiteSpace.ScopeIndent
PEAR.Functions.FunctionCallSignature
Describe the bug A clear and concise description of what the bug is.
Some files have errors and cannot be repaired, so the code has been truncated to make it shorter and easier to understand.
I don't know if it's a bug or not. But other tools don't fail.
phpcbf --version PHP_CodeSniffer version 3.7.1 (stable) by Squiz (http://www.squiz.net)
Code sample
To reproduce Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
PHPCS output here