hoangphi/pre-commit

Check coding standard & code syntax before commit.

v1.0.2 2023-06-12 04:48 UTC

This package is auto-updated.

Last update: 2024-11-12 08:01:58 UTC


README

Latest Version on Packagist Total Downloads

Installation

composer require hoangphi/pre-commit

Publish the configuration:

php artisan vendor:publish --provider="HoangPhi\PreCommit\Providers\PreCommitServiceProvider" --tag=config

Config pre-commit hooks

php artisan pre-commit:install
  • Create PSR default config phpcs.xml in your root project.
php artisan pre-commit:create-phpcs
  • Added all changed files to git stage and run test manually.
php artisan pre-commit:check