PhpStorm enforcing PSR-2 on a subset of files

Viewed 2029

I want my IDE (PhpStorm) to enforce PSR-2 compatible formatting on all of own files. Occasionally however, I have to submit patches on legacy code where I only want to commit functional changes, not changes in code style.

How can I enforce PSR-2 using PhpStorm on only a subset of files, preferably using a magic comment / marker in the files which should be enforced?

2 Answers
Related