intelephense-docs icon indicating copy to clipboard operation
intelephense-docs copied to clipboard

Implementation not found when method is implemented in a trait

Open fabiosal opened this issue 3 years ago • 1 comments

The Implementation is not found when method is implemented in a trait used in a class that implements the interface

an example:

interface EngineInterface
{
    public function run(): void;
}


trait Engine
{
    public function run(): void
    {
        echo "brum"; 
    }
}


class Veichle implements EngineInterface
{
    use Engine;
}

finding implementations for run() method inside the Engine Interface result in implementation not found instead of pointing on run() method inside the Engine trait

fabiosal avatar May 07 '21 07:05 fabiosal

It happens to me too. Any way to make it work?

Krato avatar Feb 15 '24 09:02 Krato