As the title says:
Is there a Netbeans/PHPStorm plugin for writing/refactoring to PSR-compilant code ?
phphint.org does exactly that, but offers only an online-copy&paste-tool, not an IDE-integrated real time solution.
What exactly i'm searching for is:
In case you are wondering what i'm talking about: PSR-1 Basic Coding Standard and PSR-2 Coding Style Guide are Coding Guidelines published by the big PHP guys.
For PhpStorm code formatting can be set to PSR1/PSR2 simply:File -> Settings -> Code Style -> PHP -> Set From... -> Predefined Style -> PSR1/PSR2
Details are on the JetBrain's web site too.
And use Ctrl + Alt + L
to reformat code.
Just have a look at Fabien Potenciers CS fixer at https://github.com/fabpot/PHP-CS-Fixer - I cannot tell you about the quality of the output, but as this seems to be a one time task, I don't think you'd need a plugin for this.
PHPStorm does format your code well to PSR standards by default, and it will also refactor stuff like missing curly braces for one-line if structures etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With