Guest User

Untitled

a guest
Dec 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. command='php-cs-fixer fix src/ --fixers=indentation,trailing_spaces,unused_use,php_closing_tag,return,braces,phpdoc_params,eof_ending,extra_empty_lines,include,controls_spaces,elseif'
  4. files=$($command | wc -l)
  5.  
  6. echo $files" files automatically corrected by PHP CS Fixer"
  7. echo ""
  8.  
  9. if [ $files != 0 ]; then
  10. git ci -am 'Automatically run PHP CS Fixer on post-commit'
  11. fi
Add Comment
Please, Sign In to add comment