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: | * @api |
20: | */ |
21: | interface StubFilesExtension |
22: | { |
23: | |
24: | public const EXTENSION_TAG = 'phpstan.stubFilesExtension'; |
25: | |
26: | /** @return string[] */ |
27: | public function getFiles(): array; |
28: | |
29: | } |
30: |