hyperflex / coding-standard
This package is abandoned and no longer maintained.
No replacement package was suggested.
Hyperflex coding standard
1.0.1
2018-10-23 14:56 UTC
Requires
This package is auto-updated.
Last update: 2020-01-27 14:22:35 UTC
README
Repository with all coding standard ruleset for Hyperflex repositories.
Installation
-
Install the module via composer by running:
$ composer require --dev hyperflex/coding-standard
-
Add composer scripts into your
composer.json
:"scripts": { "cs-check": "phpcs", "cs-fix": "phpcbf" }
-
Create file
phpcs.xml
on base path of your repository with content:<?xml version="1.0"?> <ruleset name="Hyperflex Coding Standard"> <rule ref="./vendor/hyperflex/coding-standard/ruleset.xml"/> <!-- Paths to check --> <file>config</file> <file>src</file> <file>test</file> </ruleset>
You can add or exclude some locations in that file. For a reference please see: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
Usage
-
To run checks only:
$ composer cs-check
-
To automatically fix many CS issues:
$ composer cs-fix