The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
The method LinkedElement does not exist on object<ElementVirtualLinked>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
The method LinkedElement does not exist on object<ElementVirtualLinked>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
The method LinkedElement does not exist on object<ElementVirtualLinked>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.