Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function parseLiteral($valueNode) |
||
16 | { |
||
17 | // Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL |
||
18 | // error location in query: |
||
19 | if (!($valueNode instanceof StringValueNode)) { |
||
20 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, [$valueNode]); |
||
21 | } |
||
22 | |||
23 | return $valueNode->value; |
||
24 | } |
||
44 |