1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Analyser;
4:
5: use PhpParser\Node;
6:
7: /**
8: * This is the extension interface to implement if you want to ignore errors
9: * based on the node and scope.
10: *
11: * To register it in the configuration file use the `phpstan.ignoreErrorExtension` service tag:
12: *
13: * ```
14: * services:
15: * -
16: * class: App\PHPStan\MyExtension
17: * tags:
18: * - phpstan.ignoreErrorExtension
19: * ```
20: *
21: * Learn more: https://phpstan.org/developing-extensions/ignore-error-extensions
22: *
23: * @api
24: */
25: interface IgnoreErrorExtension
26: {
27:
28: public const EXTENSION_TAG = 'phpstan.ignoreErrorExtension';
29:
30: public function shouldIgnore(Error $error, Node $node, Scope $scope): bool;
31:
32: }
33: