The coding standards at my current company requires 2 spaces per tab for PHP code (Drupal 6). I'm in the process of adding autoloading (PSR-4) so we can start using classes and OOP. The new namespace points to a classes/src
directory that I wish to be PSR-2 compliant. Most developers here use PHPStorm. Is there a way to set PHPStorm to use 4 spaces for the classes/src
directory (and any subdirectories) and 2 spaces for the rest of the project?
I'd like to avoid having the developers hit tab twice to get the effect of 4 spaces. I'd also like to avoid converting the rest of the codebase to 4 spaces as that will mess with our git history and have my name plastered everywhere.
I currently use Sublime Text 3 and this is all possible thanks to the Directory Settings package.
No, there is no way to do this - current platform implementation does not allow storing code style settings per scope or per file/directory. Please follow IDEA-69685 for updates