Skip to content

PHP CS Fixer configuration for Hypefactors

License

Notifications You must be signed in to change notification settings

hypefactors/php-code-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PHP Code Standards

This repository contains the coding standards followed by Hypefactors.

It includes configuration for:

Setup

First install the dependency through Composer by running:

composer require hypefactors/php-code-standards --dev

Once the dependency is installed, run the following:

composer hypefactors:setup-code-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

PHP Code Standards is licenced under the BSD 3-Clause Licence. Please see the license file for more information.

About

PHP CS Fixer configuration for Hypefactors

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages