1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Rules;
4:
5: use PhpParser\Node;
6:
7: /**
8: * A rule interested in several node classes whose only common ancestor is a broad one - Expr for
9: * BinaryOp and AssignOp, Node for Stmt and PropertyHook. getNodeType() stays that ancestor, which
10: * is what processNode() is typed against; the registry dispatches only the classes listed here, so
11: * the rule is not called for every other node of the ancestor just to reject it.
12: *
13: * @api
14: * @template TNodeType of Node
15: * @extends Rule<TNodeType>
16: */
17: interface MultipleNodeTypesRule extends Rule
18: {
19:
20: /**
21: * @return non-empty-list<class-string<TNodeType>>
22: */
23: public function getNodeTypes(): array;
24:
25: }
26: