Php_codesniffer: How do I disable "only one argument is allowed per line"

Created on 17 Jul 2019  路  3Comments  路  Source: squizlabs/PHP_CodeSniffer

Hi,

I cannot figure out how to disable the check for Only one argument is allowed per line in a multi-line function call. I am running phpcs --standard=PSR1,PSR2 --exclude=Squiz.Functions.FunctionDeclarationArgumentSpacing,Generic.Functions.FunctionCallArgumentSpacing,Squiz.Functions.FunctionDeclaration,Squiz.Functions.MultiLineFunctionDeclaration src/ tests/ and I keep getting this error.

Any help would be appreciated.

Most helpful comment

If you run PHPCS with the -s command line argument, it will show the error code next to each error message. You can then exclude that specific code using a custom ruleset, or just exclude the entire sniff (the first 3 parts of the code) using the CLI argument.

All 3 comments

Well, I think the rule I was looking for is called "PSR2.Methods.FunctionCallSignature" although I'm still unsure how I was suppose to figure that out without this bug tracker.

If you run PHPCS with the -s command line argument, it will show the error code next to each error message. You can then exclude that specific code using a custom ruleset, or just exclude the entire sniff (the first 3 parts of the code) using the CLI argument.

Awesome! That's much easier than digging though the code. Thanks!

Was this page helpful?
0 / 5 - 0 ratings