Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
33 | public function visit(AbstractNode $node, ?AbstractVisitor $subVisitor = null, ?array $options = null): string |
||
34 | { |
||
35 | /** @var Term $termNode */ |
||
36 | $termNode = $node; |
||
37 | /** @var WordToken $token */ |
||
38 | $token = $termNode->getToken(); |
||
39 | |||
40 | $domain = $token->getDomain(); |
||
41 | if ($domain === '') { |
||
42 | throw new LogicException('Missing required domain'); |
||
43 | } |
||
44 | |||
45 | $wordEscaped = preg_replace('/([\\\'"+\-!():#@ ])/', '\\\\$1', $token->getWord()); |
||
46 | |||
47 | return $this->filterResolver->resolve($domain, $wordEscaped); |
||
48 | } |
||
51 |