Closed johnsaigle closed 5 years ago
I can't replicate any conflicts on the code you've supplied, either on 3.4.0 or the latest 3.4.1 version.
I'm testing using this command to limit the checks: phpcs temp.php --standard=Squiz,PEAR --sniffs=PEAR.Functions.FunctionCallSignature,Squiz.Arrays.ArrayDeclaration --report=diff -vv
It's possible that these sniffs do not conflict directly on this code, but instead conflict on a different code structure that has been created during fixing by other sniffs. If you use -vvv
while running PHPCS with the diff report, you'll see how the file content changes after each loop and you may be able to find the code snippet that is causing the problem.
Okay thanks for the feedback. I'll do some more testing and report back with the output of -vvv
Closing due to no feedback. Please post again if this is still an issue and you have more debug output.
I am getting a FAILED TO FIX error on code that has this shape. There are a few places in the codebase that I work on where we use this structure of calling functions using an associative array parameter that is in turn created by another function call:
The problem reduces to this example:
When using
phpcbf -vv ...
I see errors with a conflict between the rulesPHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\FunctionCallSignatureSniff
andPHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff
.