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.
请先登录再写评论。
After a little further bit of investigation I've found the thread that details a workaround:
http://devnet.jetbrains.net/thread/436119?tstart=30
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?
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).