Warnings for NULL initialized class members
Hi Folks,
when using class member vars, default initialized with NULL and then re-initialized in the constructor, PHPStorm gives my warnings. See example screenshot attached. I already did an annotation for this, is there any trick regarding this problem?
When changing
protected $_db = null;
to
protected $_db;
all warnings go away.
Will gladly accept any hints. :)
Cheers,
Dave
Attachment(s):
Bildschirmfoto 2012-10-31 um 17.24.57.png
Bildschirmfoto 2012-10-31 um 17.34.36.png
请先登录再写评论。
Hi David,
Try adding proper PHPDoc for $_db field:
Sorry, forget to add this to the screenshot, just mentioned it in the text.
Dave
Attachment(s):
Bildschirmfoto 2012-10-31 um 17.48.56.png
Bildschirmfoto 2012-10-31 um 17.51.00.png
No idea then. Used to work just fine before since v1 IIRC (but v5.0.3 is really bad -- brought too many new issues -- very unexpected for stable release).
I guess reporting it to the Issue Tracker would the the right choice.
Will do!
Thanks!