Skip to content

banovo/coding-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banovo Coding Standards

Build Status

Installation

Add to composer.json:

"require-dev": {
    "banovo/coding-standard": "0.3.*"
},
"scripts": {
    "post-install-cmd": [
        "echo 'bin/checker' > .git/hooks/pre-commit"
    ],
    "post-update-cmd": [
        "echo 'bin/checker' > .git/hooks/pre-commit"
    ]
},

Add pre-commit hook

echo './vendor/bin/php-cs-fixer fix --config=./vendor/banovo/coding-standard/rulesets/.php_cs.dist src && git add .' > .git/hooks/pre-commit

Usage

Pre-commit hook will execute checker automatically, when you run git commit.

Execute bin/checker -h to see additional configuration.

Update

Ensure it is up-to-date: