classy-org / php-classy-standards
A tool to automatically check and fix PHP files according to Classy coding standards
Installs: 54 248
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- friendsofphp/php-cs-fixer: 2.16.4
This package is auto-updated.
Last update: 2024-12-13 04:30:20 UTC
README
composer require --dev classy-org/php-classy-standards
Use
# Testing php files comply with Classy coding standards
vendor/bin/php-classy-fixer fix --dry-run
# Fixing files
vendor/bin/php-classy-fixer fix
# Configure git to automatically fix php files on commit
ln -s ../../vendor/bin/php-classy-precommit-hook .git/hooks/pre-commit
Since php-classy-standards is a simple wrapper around php-cs-fixer with pre-configured rules we use at Classy, you can pass to it any argument php-cs-fixer is accepting. Example:
vendor/bin/php-classy-fixer fix --dry-run ./folder/with/files/to/check