PSR1/PSR2 Predefined Style not doing anything

I've set my coding style to use the predefined style PSR1/PSR2 as per this article: http://www.matthewsetter.com/enforcing-psr1-and-psr2-with-phpstorm/

I'm using PHPStorm 8.0.1.

I don't get any notifications/warnings/underlines/whatever when not conforming to PSR1 or PSR2. I purposely wrote some poorly formatted code, and it didn't do anything...

What am I missing?

3 comments
Comment actions Permalink

'PSR-1/PSR-2' Code Style is just a set of formatting rules applied on Code/Reformat Code.., it's not a way to lint your code. Choose this code style and then hit Ctrl+Alt+L (or whatever your shortcut for code formatting is) to get your code formatted according to PSR-2 coding style guide

0
Comment actions Permalink

According to the linked article:

From now on, when you’re developing, if you don’t conform to the standard, you’ll see a notification appear to let you know what you need to change to conform to the standard.

So, that's what's throwing me off...

0
Comment actions Permalink

You can use PHP Code sniffer ( https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm ) to get your code validated agains these standards

0

Please sign in to leave a comment.