1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Collectors;
4:
5: use PhpParser\Node;
6: use PHPStan\Analyser\Scope;
7:
8: /**
9: * @api
10: * @phpstan-template-covariant TNodeType of Node
11: * @phpstan-template-covariant TValue
12: */
13: interface Collector
14: {
15:
16: /**
17: * @phpstan-return class-string<TNodeType>
18: */
19: public function getNodeType(): string;
20:
21: /**
22: * @phpstan-param TNodeType $node
23: * @return TValue|null Collected data
24: */
25: public function processNode(Node $node, Scope $scope);
26:
27: }
28: