1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Rules\Methods;
4:
5: use PHPStan\DependencyInjection\ExtensionInterface;
6: use PHPStan\Reflection\ExtendedMethodReflection;
7:
8: /**
9: * This is the extension interface to implement if you want to describe an always-used class method.
10: *
11: * To register it in the configuration file use the `phpstan.methods.alwaysUsedMethodExtension` service tag:
12: *
13: * ```
14: * services:
15: * -
16: * class: App\PHPStan\MyExtension
17: * tags:
18: * - phpstan.methods.alwaysUsedMethodExtension
19: * ```
20: *
21: * @api
22: */
23: #[ExtensionInterface(tag: 'phpstan.methods.alwaysUsedMethodExtension')]
24: interface AlwaysUsedMethodExtension
25: {
26:
27: public function isAlwaysUsed(ExtendedMethodReflection $methodReflection): bool;
28:
29: }
30: