chrometoaster / backend-coding-standards
Back-end coding standards configuration used at Chrometoaster.
Package info
github.com/chrometoasters/backend-coding-standards
pkg:composer/chrometoaster/backend-coding-standards
1.4.0
2022-09-14 23:21 UTC
Requires
- php: 7.x || 8.x
- php-parallel-lint/php-console-highlighter: ~1.0
- php-parallel-lint/php-parallel-lint: ~1.3
- symplify/easy-coding-standard: ~11.1
README
Back-end coding standards used at Chrometoaster are based on PSR-2.
This project bundles tools along with predefined rulesets for automated checks. Provided tools:
- PHP-Parallel-Lint
- EasyCodingStandard that combines PHP-CS-Fixer and PHP_CodeSniffer
Installation & usage
-
Install this package:
$ composer require --dev chrometoaster/backend-coding-standards:~1.0 -
Include a configuration file in your
easy-coding-standard.yml:imports: - { resource: '%vendor_dir%/chrometoaster/backend-coding-standards/config/chrometoaster.yml' }
-
Check your files
$ vendor/bin/parallel-lint /path/to/source/code $ vendor/bin/ecs check path/to/source/code
-
Auto-fix non-compliant files where possible
$ vendor/bin/ecs check path/to/source/code --fix
See the official documentation of the tools used for further information, e.g. how to provide a custom config.
Licence
BSD-3-Clause