Do you mean making sure method exists given the code $x->method()?
How do you expect the linter to know all of the classes of which $x could be an instance and all of the namespaces whose name $x could contain.
I guess you could do an imperfect job if you knew some possible values for $x. That raises the following question:
How do you expect the linter to know any of the classes of which $x could be an instance or any of the namespaces whose name $x could contain.
Update: Now takes class methods into consideration.
In reply to Re: linting for undefined object methods
by ikegami
in thread linting for undefined object methods
by aespen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |