| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 63 | public function parseLiteral($ast, array $variables = null) |
||
| 64 | { |
||
| 65 | // Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL |
||
| 66 | // error location in query: |
||
| 67 | if (!($ast instanceof StringValueNode)) { |
||
| 68 | throw new Error('Query error: Can only parse strings got: ' . $ast->kind, [$ast]); |
||
| 69 | } |
||
| 70 | |||
| 71 | return $ast->value; |
||
| 72 | } |
||
| 74 |