Last active
May 25, 2020 12:46
-
-
Save Neunerlei/41a3dd0da6f69d50a1ec0bcbcc1a8ac8 to your computer and use it in GitHub Desktop.
PHP-CS-Fixer in PHP-Storm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As an "External Tool" | |
---------------------- | |
Settings -> Tools -> External Tools | |
Create a new Tool called "CS-Fixer" | |
Program: Select your Docker executable | |
Arguments: run --rm -v $FilePath$:/$FileName$ cytopia/php-cs-fixer fix --rules=@PSR2 /$FileName$ | |
OK -> Done | |
As a "File Watcher" | |
---------------------- | |
Settings -> Tools -> File Watchers | |
Create new Watcher called "CS-Fixer" | |
Program: Select your Docker executable | |
Arguments: run --rm -v $FilePath$:/$FileName$ -v $ProjectFileDir$[[PATH_TO_YOUR_CS_CONFIG]]:/.php_cs cytopia/php-cs-fixer fix --config=/.php_cs /$FileName$ | |
OK -> Done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment