Conditions | 2 |
Paths | 4 |
Total Lines | 23 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 3 | public function __invoke(NodeValueInterface $rootNode, RuntimeInterface $runtime): ValueListInterface |
|
27 | { |
||
28 | try { |
||
29 | $callback = $this |
||
30 | 3 | ->callbackBuilder |
|
31 | 3 | ->getCallback(); |
|
32 | |||
33 | $args = [ |
||
34 | 3 | (new NodeValueListBuilder) |
|
35 | 3 | ->addValue($rootNode, 0) |
|
36 | 3 | ->build(), |
|
37 | 3 | $runtime->getValueListFetcher(), |
|
38 | 3 | $runtime->getEvaluator(), |
|
39 | 3 | $runtime->getLiteralFactory(), |
|
40 | 3 | $runtime->getMatcherFactory(), |
|
41 | ]; |
||
42 | |||
43 | 3 | return call_user_func($callback, ...$args); |
|
44 | 1 | } catch (Throwable $e) { |
|
45 | 1 | throw new Exception\QueryExecutionFailedException( |
|
46 | 1 | $this->source, |
|
47 | 1 | $this->callbackBuilder->getCallbackCode(), |
|
48 | $e, |
||
49 | ); |
||
65 |