Go under File>>Settings
On the search bar type: trailing
Then under Editor>> Strip trailing spaces on Save: >> Select All from selection options
Hit Apply and then go into every file saving and correcting your coding standard:
~$ phpcs src/Cordova/FilmothequeBundle/
result:
~/sites-2/memorizescripture$ phpcs src/Cordova/FilmothequeBundle/
FILE: ...ites-2/memorizescripture/src/Cordova/FilmothequeBundle/Entity/Movie.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 7 WARNING(S) AFFECTING 7 LINE(S)
--------------------------------------------------------------------------------
17 | WARNING | Please trim any trailing whitespace
22 | WARNING | Please trim any trailing whitespace
27 | WARNING | Please trim any trailing whitespace
33 | WARNING | Please trim any trailing whitespace
38 | WARNING | Please trim any trailing whitespace
44 | WARNING | Please trim any trailing whitespace
120 | WARNING | Consider breaking lines longer than 80 characters; contains
| | 100 characters
--------------------------------------------------------------------------------
Time: 0 seconds, Memory: 3.00Mb
Do your saving operation and then get:
~/sites-2/memorizescripture$ phpcs src/Cordova/FilmothequeBundle/
Time: 1 second, Memory: 3.00Mb
Done.
PS> https://github.com/aYaline/Symfony2-coding-standard
A hint for codesniffer and phpstorm users:
Go under File>>Settings
On the search bar type: External tools.
Add a command for phpcs.with –report=emacs in command line and add an output filter like $FILE_PATH$:$LINE$:$COLUMN$ as an external command
I will make a blog post on your tip now, thanks a lot Lucas! Check it out!