jparkinson1991 / phpcodesniffer-standards
Custom PHP_Codesniffer standards
Installs: 7 753
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
Requires
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2024-10-07 19:44:11 UTC
README
This package provides custom and adapted coding standards for use with squizlabs/PHP_CodeSniffer
Coding Standards
The following standards are provided by this package
JPSR-12
An adaptation of the PSR-12 coding standard with some minor tweaks. View Documentation
Getting Started
Using the standards provided by this package is a simple as using composer to require within your project.
Prerequisites
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.
Installing
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
Usage
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"/>
Versioning
SemVer is used for versioning. For the versions available, see the tags on this repository.
Authors
- Josh Parkinson - Hacking and slashing
License
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details
Acknowledgments
- dealerdirect For the coding standards installer plugin
- Drupal For the multi keyword control structure sniff
- PHP-FIG For PSR-12
- squizlabs For PHP_Codesniffer