Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
20 | 1 | public function visit(AbstractNode $node, ?AbstractVisitor $subVisitor = null, ?array $options = null): string |
|
21 | { |
||
22 | 1 | if (! $node instanceof Term) { |
|
23 | throw new LogicException('Implementation accepts instance of Term Node'); |
||
24 | } |
||
25 | 1 | $token = $node->getToken(); |
|
26 | 1 | if (! $token instanceof TagToken) { |
|
27 | throw new LogicException('Implementation accepts instance of Tag Token'); |
||
28 | } |
||
29 | 1 | return "{$token->getMarker()}{$token->getTag()}"; |
|
30 | } |
||
33 |