Phpdock for that checks that method in string exists

How make check that method represent in string?

Example

public static function test(): array
{
return [
['methodA', 1],
['methodB', 2],
];
}

public function methodA(): void
{
...
}

public function methodB(): void
{
...
}

I have base class with static method test, several class extends this base class and override method test, and realize methods. I want to be sure that a method that exists is specified in a given class.

0

请先登录再写评论。