A
A
Arris2017-07-02 10:13:05
phpstorm
Arris, 2017-07-02 10:13:05

PHPStorm: method xpath not found in class. How to "teach" the IDE to find methods?

I'm tormented by words to explain, I'd rather show a gif:
d6735af934ca48a8bc18b9c6b6159a8f.gif
A simple wrapper class. When choosing a method for $this-svg , the possible methods in the list are substituted, and then the method is immediately highlighted as not found.
Interestingly, this behavior does not always take place ! For example, for a wrapper over PDO, sometimes everything is fine, sometimes method prepare() not found in class .
Tried to google, but could not formulate a request.
wtf? CHADNT?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2017-07-02
@Arris

And if you specify php-doc?

class ParseSVG {
    /**
     * @var SimpleXMLElement
     */
    private $svg;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question