Lumen/Laravel wrapper around PHPCS-Fixer package. Used as artisan command.
noitran/cs-fixer-command is a Laravel package for lumen/laravel wrapper around phpcs-fixer package. used as artisan command..
It currently has 1 GitHub stars and 10 downloads on Packagist (latest version v0.2.0).
Install it with composer require noitran/cs-fixer-command.
Discover more Laravel packages by noitran
or browse all Laravel packages to compare alternatives.
Last updated
Lumen/Laravel wrapper around PHPCS-Fixer package that allows, using artisan command, easly apply pre-defined coding standards to your laravel or lumen project.
Wrapper uses PHP Coding Standards Fixer package
List of all fixer rules can be found here
php artisan phpcs:fix that fixes your project to follow standards defined in your config/phpcs.phpphp artisan phpcs:install-hook. After install phpcs:fix will be triggered before each commit and will auto fix your code$ composer require noitran/cs-fixer-command
$ artisan vendor:publish --provider="Noitran\CsFixer\CsFixerServiceProvider"
$app->register(Noitran\CsFixer\CsFixerServiceProvider::class);
$app->configure('phpcs');
Publish phpcs and change if necessary, run command for inspection php artisan phpcs:fix
Hook installation can be done using command php artisan phpcs:install-hook
Hook install command can be added into composer.json as post-install command, so that, at example, other team members will get pre-commit hook when installing composer dependencies at first time.
{
"name": "laravel/lumen",
"require": {
...
},
"autoload": {
...
},
"scripts": {
"post-install-cmd": [
"php artisan phpcs:install-hook"
],
"post-update-cmd": [
...
]
}
}