Skip to content

Instantly share code, notes, and snippets.

@Neunerlei
Last active May 25, 2020 12:46
Show Gist options
  • Save Neunerlei/41a3dd0da6f69d50a1ec0bcbcc1a8ac8 to your computer and use it in GitHub Desktop.
Save Neunerlei/41a3dd0da6f69d50a1ec0bcbcc1a8ac8 to your computer and use it in GitHub Desktop.
PHP-CS-Fixer in PHP-Storm
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