Enforce coding standards on your PHP & Javascript. Now with SWagger Support. Don’t let your team mess up your code base.

Enforce coding standards on your PHP & Javascript. Now with SWagger Support. Don’t let your team mess up your code base.

README

Enforce coding standards on your PHP & JS code base

Install with composer

composer require alquesadilla/php-coding-standards-enforcer --dev

Add the provider to app config

AlquesadillaEnforcerEnforcerServiceProvider::class

Use artisan to publish the config

php artisan vendor:publish --provider="AlquesadillaEnforcerEnforcerServiceProvider" --tag=config

Run artisan command to copy the pre-commit hook

php artisan enforcer:copy

If you are working with other developers and you prefer each time that someone makes a clone and runs composer install, the hook is automatically copied, just add the copy command to the composer scripts, anyways it runs only on the defined environment, which by default is local.

"post-install-cmd": [
    "...laravel commands..."
    "php artisan enforcer:copy"
],

Source

Add a Comment

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *