PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
Hi @jrfnl! :wave: I hope you do not mind me suggesting this. I had to wait for Aprils Fools day to pass before posting this, as I was afraid people...
### History Originally, the changelog was maintained in a `package.xml` file, which was a requirement for releasing to PEAR. With the move from the squizlabs repo to this repo and...
## Description This PR adds the XML documentation for the Generic.Arrays.ArrayIndent sniff. I left some inline comments below highlighting decisions I made while creating this documentation that I'm not sure...
### Premise A standard should be able to be used without leading to fixer conflicts. Now, as code can be written in lots of different ways, it is not always...
## Is your feature request related to a problem? Currently, when a user tries to change a PHP ini option which cannot be changed at runtime, it would be silently...
## Is your feature request related to a problem? Not really. It's more of a "nice to have". I'd like phpcbf to format my arrow functions from this: ```php $ids...
## Describe the bug The `'scope_condition'` key doesn't always get set correctly in the `$tokens` array. Consequently, tokens within the curlies do not get the `'conditions'` array set correctly either....
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/3161 by @gsherwood: > The colon after a goto label does not have to be the very next token; there can be whitespace and comments between them. PHP_CodeSniffer...
## Describe the bug I have two identical files `app/Models/Locale.php` and `app/Models/.Locale.php` phpcs only reports the errors on the first one and phpcbf only fixes the first one. ### Code...
## Is your feature request related to a problem? Searching for proper sniffs/sniffs explanations was always a complicated thing when using `phpcs`, at least for me, especially as a newcomer....