phpstorm coding style export

phpstorm coding style export

by Tomasz Muras -
Number of replies: 3
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators
Hi,

Quite a few of us use phpstorm for Moodle development. Would anyone like to share coding style configuration for Moodle? It might be a good idea to attach it to Moodle wiki.
The one for netbeans is here btw.


Tomek

Average of ratings: Useful (1)
In reply to Tomasz Muras

Re: phpstorm coding style export

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I've created one (attached).  I think it matches the coding style, except that it doesn't wrap associative arrays with a 4-column indent, it always uses 8.

However, my PHPStorm doesn't give me the option to import from a .xml file, only a "JSCS config file".

I think you can just drop it in your ~/.WebIde###/config/codestyles directory, and it should appear in Scheme list on the Settings > Editor > Code style settings page.  Can someone test that for me?

Average of ratings: Useful (3)
In reply to Mark Johnson

Re: phpstorm coding style export

by Tomasz Muras -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

I was able to import it into PHP Storm 2016.01. I had an option to import "Inellij XML". It looks good, so thank you for sharing!

If it's OK for you - I'd publish it on https://github.com/enovation/moodle-utils with netbeans config.

Average of ratings: Useful (2)
In reply to Tomasz Muras

Re: phpstorm coding style export

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Fine by me. For what it's worth, I now also get the correct import option in 2016.1.