This package provides custom and adapted coding standards for use with squizlabs/PHP_CodeSniffer
The following standards are provided by this package
An adaptation of the PSR-12 coding standard with some minor tweaks. View Documentation
Using the standards provided by this package is a simple as using composer to require within your project.
This package requires squizlabs/php_codesniffer ^3.0 if you are using an older version of PHP_CodeSniffer you will not be able to install these standards.
This package is built on top of dealerdirect/phpcodesniffer-composer-installer so installation is as simple as
$ composer require jparkinson1991/phpcodesniffer-standards
After requiring this package in your project it will be installed and available for use with PHP_CodeSniffer
$ ./vendor/bin/phpcs -i
The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1, PSR12 and JPSR12
Use the standards provided by this package in the exact same way you would use the defaults provided by PHP_Codesniffer. Using JPSR12 as an example.
$ ./vendor/bin/phpcs --standard JPSR12
// phpcs.xml
<rule ref="JPSR12"/>
SemVer is used for versioning. For the versions available, see the tags on this repository.
- Josh Parkinson - Hacking and slashing
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details
- dealerdirect For the coding standards installer plugin
- Drupal For the multi keyword control structure sniff
- PHP-FIG For PSR-12
- squizlabs For PHP_Codesniffer