Changing syntax error detection

Is there capability within PHP/Webstorm of changing the syntax error detection within PHP/other langs?

I use a framework which makes heavy use of the __get & __set magic class functions and I'm getting a little annoyed with seeing 'nonexistent' fields being marked as errors.

Comment actions Permalink

After a little further bit of investigation I've found the thread that details a workaround:

However it would be useful to programmatically change parts of the syntax error detection framework. I might be living in vain, optimistic hope here but any pointers?

Comment actions Permalink

Hi Benjamin,

Settings | Inspections | PHP | Undefined | Undefined field --> Downgrade severity if __magic methods are present in class

In upcoming v5 it can be even better -- depends on how __get declared (presence of proper PHPDoc; what type it returns etc). If it works similar to how MongoDB works (when selecting Database or Table) then the aforementioned option is not even required (but this is rather a specific case, which is not common when general-purpose framework is involved).


Please sign in to leave a comment.