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