Any refactoring capability for "use", that would support PSR-2 standard?
For example I have old style in all files, that looks like:
use Path\To\Class\One,
Path\To\Class\Two,
And\Another\Path\To\Class\Three,
Exception;
I would expect to either have a way in code style settings to setup it or it to be done automatically by pressing Ctrl+Alt+L without settings configuration. So that it would look like
use Path\To\Class\One;
use Path\To\Class\Two;
use And\Another\Path\To\Class\Three;
use Exception;
http://www.php-fig.org/psr/psr-2/#3-namespace-and-use-declarations
Any way to accomplish that?
Thank you.
请先登录再写评论。
Good question, checking for available options.
Please try Code > Optimize Imports (ctrl+alt+O).
Okay. Thank you. Any way to group imports like in IntelliJ IDEA Arrangement tab in Code Style? Like in second block of code.
Yup, arrangement is available for Code Style > PHP: https://www.jetbrains.com/help/phpstorm/2016.1/code-style-php.html