I'm working on a PHP library and I have two classes.
First one is like this:
/**
* @method static A getInstance()
*/
interface A {...}
Second one is like this:
class B implements A {...}
getInstance is not defined in A, except in PHPDoc above class. Now, my IDE (PHPStorm) suggests an error, saying that I should implement getInstance in B.
My questions are:
Why they put this method in PHPDoc even though it's not declared in the interface? I doubt it's a mistake, since they used the same comment in many other classes.
What do you recommend? should I implement in B or should I remove the PHPDoc comment from A?