Official Github repository and documentation
https://github.com/FriendsOfPHP/PHP-CS-Fixer http://cs.sensiolabs.org/
docker run ypereirareis/php-cs-fixer
By default this run will execute php-cs-fixer --help
- php-cs-fixer from the ENTRYPOINT Dockerfile config
- --help from the CMD Dockerfile config
Open your matching file and paste this code:
php-cs-fixer () {
docker run -it --rm --net host -v `pwd`:/app ypereirareis/php-cs-fixer fix --level=psr2 --verbose $@
}
Of course you can modify the function name or php-cs-fixer options
Feel free to add the correct config into your fig.yml OR docker-compose.yml to run php-cs-fixer whenever you want.