Conditions | 2 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
14 | public function buildQuery( |
||
15 | string $source, |
||
16 | 6 | Tree $queryAst, |
|
17 | CallbackBuilderInterface $callbackBuilder |
||
18 | 6 | ): QueryInterface { |
|
19 | 6 | try { |
|
20 | $translator = new Translator($queryAst, $callbackBuilder); |
||
21 | 6 | $translator->run(); |
|
22 | } catch (Throwable $e) { |
||
23 | throw new Exception\QueryAstNotTranslatedException($queryAst, $e); |
||
24 | 6 | } |
|
25 | 6 | ||
26 | 1 | return new Query($source, $callbackBuilder); |
|
27 | 1 | } |
|
29 |