neuecommerce/coding-standards

Coding standards for Neue Commerce projects.

Installs: 1 912

Dependents: 7

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:composer-plugin

dev-main 2024-03-23 10:19 UTC

This package is auto-updated.

Last update: 2024-04-23 10:35:34 UTC


README

This repository contains the coding standards followed by Neue Commerce projects.

It includes configuration for:

Setup

First install the dependency through Composer by running:

composer require neuecommerce/coding-standards --dev

Once the dependency is installed, run the following:

composer neuecommerce:setup-coding-standards

Next open your composer.json file and add the following section:

"scripts": {
    "ecs:fix": "./vendor/bin/ecs --fix",
    "ecs:check": "./vendor/bin/ecs",
    "phpstan": "./vendor/bin/phpstan analyse --ansi",
    "rector:fix": "./vendor/bin/rector process --ansi",
    "rector:check": "./vendor/bin/rector process --ansi --dry-run"
},

Note: If you already have a scripts section on your composer.json file, just merge the new scripts with the existing ones.

Usage

To use it, you can run one of the scripts added to your composer.json file:

composer ecs:fix
composer ecs:check
composer phpstan
composer rector:fix
composer rector:check

License

This package is open-sourced software licensed under the MIT license.