55use PHPStan \Analyser \ResultCache \ResultCacheValueExtension ;
66
77/**
8- * The interface DependencyEmitter can be typehinted in 2nd parameter of Rule::processNode(),
8+ * The interface DependencyTracker can be typehinted in 2nd parameter of Rule::processNode(),
99 * and in the Scope parameter of dynamic return type extensions and expression type resolver
1010 * extensions:
1111 *
1212 * ```php
1313 * /**
14- * * @param Scope&DependencyEmitter $scope
14+ * * @param Scope&DependencyTracker $scope
1515 * *\/
1616 * public function processNode(Node $node, Scope $scope): array
1717 * ```
1818 *
1919 * The intersection goes to the PHPDoc: the native parameter type stays Scope, which is what the
2020 * interfaces declare once PHPStan is downgraded for older PHP versions.
2121 *
22- * It declares what the analysis of the current file depends on besides the analysed code, so
23- * that the result cache re-analyses the file when that changes - see ResultCacheValueExtension.
22+ * It tracks what the analysis of the current file depends on besides the analysed code, so that
23+ * the result cache re-analyses the file when that changes - see ResultCacheValueExtension.
2424 *
2525 * @api
2626 */
27- interface DependencyEmitter
27+ interface DependencyTracker
2828{
2929
3030 /**
3131 * The analysis of the current file depends on the value $extensionClass gives for $key.
3232 *
3333 * @param class-string<ResultCacheValueExtension> $extensionClass
3434 */
35- public function valueDependency (string $ extensionClass , string $ key ): void ;
35+ public function trackValueDependency (string $ extensionClass , string $ key ): void ;
3636
3737 /**
3838 * The analysis of the current file depends on the contents of $file - a data file, a template,
@@ -41,6 +41,6 @@ public function valueDependency(string $extensionClass, string $key): void;
4141 *
4242 * The path should be absolute. The file does not have to exist.
4343 */
44- public function fileDependency (string $ file ): void ;
44+ public function trackFileDependency (string $ file ): void ;
4545
4646}
0 commit comments