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