This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Steps to reproduce: <?php class newPHPClass { protected $_foo = 'bar'; public function baz() { $apple = 'fruit'; } } Result: Hint: "Variable $apple does not seem to be used in it's scope" is shown. Expected result: No hint!
No, it really isn't used...it's just defined...but not used...you have variable $apple and you are not using it...it's just defined. And that's exactly what the hint makes...it alerts you, when you define some variable and don't use it. Because you really don't want to have variables, which are only defined, do you? ;)
Maybe you thought that hint controls "initializing" of variables...that's another hint, this hint just controls "usage" of declared variables.
IMHO the hint text is a bit confusing then. It makes me think the editor tries to hint me about a variable that is being used outside of its scope. Now that I read the hint again, with your comment, I understand it. Maybe the text should be altered to avoid confusion. By example to "Variable $foo seems to be unused in its scope". "it's scope" is a grammatical error by the way. "It's" means "it is" or "it has". In other words, it reads "Variable $foo does not seem to be used in it is scope." currently :p Shall I file an enhancement for the change of the hint text and a bug report for the grammar error?
(In reply to comment #3) > Shall I file an enhancement for the change of the hint text and a bug report > for the grammar error? Yes, please, one bug will be fine. Thanks a lot!
(In reply to comment #4) > (In reply to comment #3) > > Shall I file an enhancement for the change of the hint text and a bug report > > for the grammar error? > > Yes, please, one bug will be fine. > > Thanks a lot! http://netbeans.org/bugzilla/show_bug.cgi?id=202527