1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc; |
4: | |
5: | /** |
6: | * This is the extension interface to implement if you want to dynamically |
7: | * load stub files based on your logic. As opposed to simply list them in the configuration file. |
8: | * |
9: | * To register it in the configuration file use the `phpstan.stubFilesExtension` service tag: |
10: | * |
11: | * ``` |
12: | * services: |
13: | * - |
14: | * class: App\PHPStan\MyExtension |
15: | * tags: |
16: | * - phpstan.stubFilesExtension |
17: | * ``` |
18: | * |
19: | * Learn more: https://phpstan.org/developing-extensions/allowed-subtypes |
20: | * |
21: | * @api |
22: | */ |
23: | interface StubFilesExtension |
24: | { |
25: | |
26: | public const EXTENSION_TAG = 'phpstan.stubFilesExtension'; |
27: | |
28: | /** @return string[] */ |
29: | public function getFiles(): array; |
30: | |
31: | } |
32: |