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