Skip to content

chrometoasters/backend-coding-standards

Repository files navigation

Back-end Coding Standard

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:

Installation & usage

  1. Install this package:

    $ composer require --dev chrometoaster/backend-coding-standards:~1.0
  2. Include a configuration file in your easy-coding-standard.yml:

    imports:
        - { resource: '%vendor_dir%/chrometoaster/backend-coding-standards/config/chrometoaster.yml' }
  3. Check your files

    $ vendor/bin/parallel-lint /path/to/source/code
    $ vendor/bin/ecs check path/to/source/code
  4. 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