I have a project with a setup like this:
Base class
class MyClass extends \SplFileInfo {}
Interface
interface MyClassInterface {}
If I now typehint a method argument which contains a MyClass
object with my MyClassInterface
I lose the IDE completion of the \SplFileInfo object.
It seems pretty logical because the IDE only knows about the interface that is typehinted and nothing about the baseclass which extends the \SplFileInfo.
How could I program to an interface but also make my IDE aware of the baseclass's extended class? I am probably doing something wrong with the way I set up my interface but I am unsure on how to do this.
Hopefully this makes sense, otherwise let me know and I'll try to go more into detail.