1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PHPStan\Broker\BrokerFactory;
6: use PHPStan\DependencyInjection\ExtensionInterface;
7:
8: /**
9: * This is the interface custom methods class reflection extensions implement.
10: *
11: * To register it in the configuration file use the `phpstan.broker.methodsClassReflectionExtension` service tag:
12: *
13: * ```
14: * services:
15: * -
16: * class: App\PHPStan\MyMethodsClassReflectionExtension
17: * tags:
18: * - phpstan.broker.methodsClassReflectionExtension
19: * ```
20: *
21: * Learn more: https://phpstan.org/developing-extensions/class-reflection-extensions
22: *
23: * @api
24: */
25: #[ExtensionInterface(tag: BrokerFactory::METHODS_CLASS_REFLECTION_EXTENSION_TAG)]
26: interface MethodsClassReflectionExtension
27: {
28:
29: public function hasMethod(ClassReflection $classReflection, string $methodName): bool;
30:
31: public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection;
32:
33: }
34: