Linting PHP with PHP_CodeSniffer
Last updated
Was this helpful?
Last updated
Was this helpful?
Please also see the installation in Air-light Debuggers or on . Your editors should lint automatically after installing these tools.
If for some reason you need to use something that has been disallowed in phpcs.xml you should have good arguments in favor to it. You should comment the change accordingly:
With phpcbf it's quick to fix the most common errors that are not right accoring to your project phpcs.xml.
You should always comment your code as thorough as possible. For indentation we use to char space. Always use the latest .editorconfig: