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 properties class reflection extensions implement.
10: *
11: * To register it in the configuration file use the `phpstan.broker.propertiesClassReflectionExtension` service tag:
12: *
13: * ```
14: * services:
15: * -
16: * class: App\PHPStan\MyPropertiesClassReflectionExtension
17: * tags:
18: * - phpstan.broker.propertiesClassReflectionExtension
19: * ```
20: *
21: * Learn more: https://phpstan.org/developing-extensions/class-reflection-extensions
22: *
23: * @api
24: */
25: #[ExtensionInterface(tag: BrokerFactory::PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG)]
26: interface PropertiesClassReflectionExtension
27: {
28:
29: public function hasProperty(ClassReflection $classReflection, string $propertyName): bool;
30:
31: public function getProperty(ClassReflection $classReflection, string $propertyName): PropertyReflection;
32:
33: }
34: