1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | namespace PHPStan\BetterReflection\Util\Exception; |
6: | |
7: | use InvalidArgumentException; |
8: | use PhpParser\Lexer; |
9: | use PhpParser\Node; |
10: | |
11: | use function sprintf; |
12: | |
13: | class NoNodePosition extends InvalidArgumentException |
14: | { |
15: | public static function fromNode(Node $node): self |
16: | { |
17: | return new self(sprintf('%s doesn\'t contain position. Your %s is not configured properly', get_class($node), Lexer::class)); |
18: | } |
19: | } |
20: |