Skip to content

Instantly share code, notes, and snippets.

@ssx
Created September 7, 2017 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssx/fdb1bd4d12fb0372730836ae45fff74b to your computer and use it in GitHub Desktop.
Save ssx/fdb1bd4d12fb0372730836ae45fff74b to your computer and use it in GitHub Desktop.
PHP Pre-Commit Example
- repo: https://github.com/digitalpulp/pre-commit-php.git
sha: 1.3.0
hooks:
- id: php-lint
- id: php-unit
- id: php-cbf
files: \.(php)$
args: [--standard=PSR2 --ignore=**/*.blade.php -p]
- id: php-cs
files: \.(php)$
args: [--standard=PSR2 --ignore=**/*.blade.php -p]
- repo: git://github.com/pre-commit/pre-commit-hooks.git
sha: v0.9.2
hooks:
- id: trailing-whitespace
- id: detect-private-key
- id: end-of-file-fixer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment