banovo / coding-standard
CodeSniffer ruleset for the Banovo PHP coding standard
Installs: 5 918
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
Requires
- friendsofphp/php-cs-fixer: 2.15.8
- phpmd/phpmd: 2.9.1
- squizlabs/php_codesniffer: 3.*
This package is not auto-updated.
Last update: 2024-11-07 07:21:54 UTC
README
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:
-
rulesets/Symfony
folder is a copy from Symfony Coding Standard -
rulesets/SlevomatCodingStandard
folder is a copy from Slevomat Coding Standard