File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ composer.lock
88tests /caches /
99! tests /caches /.gitkeep
1010tools
11+ cghooks.lock
Original file line number Diff line number Diff line change 3434 "require-dev" : {
3535 "phpunit/phpunit" : " ^8.0" ,
3636 "squizlabs/php_codesniffer" : " ^3.4" ,
37- "friendsofphp/php-cs-fixer" : " ^2.14"
37+ "friendsofphp/php-cs-fixer" : " ^2.14" ,
38+ "brainmaestro/composer-git-hooks" : " ^2.6"
3839 },
3940 "scripts" : {
4041 "test" : " phpunit tests --stop-on-failure" ,
4445 " @test" ,
4546 " @cs" ,
4647 " @fix"
47- ]
48+ ],
49+ "post-install-cmd" : " cghooks add --ignore-lock" ,
50+ "post-update-cmd" : " cghooks update"
51+ },
52+ "extra" : {
53+ "hooks" : {
54+ "pre-commit" : " git diff-index --cached --name-only HEAD | xargs -n1 vendor/bin/php-cs-fixer fix"
55+ }
4856 }
4957}
You can’t perform that action at this time.
0 commit comments