streamcommon / coding-standard
StreamCommon Team Coding Standard
1.0.3
2019-02-16 22:27 UTC
Requires
- squizlabs/php_codesniffer: ^3.4.0
This package is auto-updated.
Last update: 2024-11-13 07:25:47 UTC
README
Installation
- Install the module via composer:
- Console run:
composer require --dev streamcommon/coding-standard
- Or add into your
composer.json
:
"require-dev": { "streamcommon/coding-standard": "*" }
- Add composer scripts into your
composer.json
:"scripts": { "cs-check": "phpcs", "cs-fix": "phpcbf" }
- Create file
phpcs.xml
:<?xml version="1.0"?> <ruleset name="StreamCommon Team Coding Standard"> <rule ref="./vendor/streamcommon/coding-standard/ruleset.xml"/> <file>bin</file> <file>config</file> <file>lib</file> <file>src</file> <file>test</file> </ruleset>
Usage
Run: composer cs-check
OR composer cs-fix
Customize
See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml