I am working with a PHP package that has an interface in it. That interface has certain methods that are required as you would expect from an interface. The interface also has a number a methods, however, that are not required. The people who built this library are documenting the optional methods by putting @method tags in the DocBlock of the interface for each method as if they were being handled by a __call function and then they just put a note saying that they are optional methods. The problem is that PhpStorm is complaining when I implement that interface because I am not implementing the methods that are in the DocBlock but not actually in the interface. When I tell PhpStorm to create the stubs, it just creates @method tags in the DocBlock of my class but I don't really think that is the correct answer since those methods don't actually exist in my class. I have 2 possible solutions:
- Is there a way to tell PhpStorm to ignore the @method tags in the interface so I am not getting the error anymore?
- Is there a better way to document these optional methods that I could suggest to the creators of that library?