| Total Complexity | 9 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class StringType extends ScalarType |
||
| 19 | { |
||
| 20 | /** @var string */ |
||
| 21 | public $name = Type::STRING; |
||
| 22 | |||
| 23 | /** @var string */ |
||
| 24 | public $description = |
||
| 25 | 'The `String` scalar type represents textual data, represented as UTF-8 |
||
| 26 | character sequences. The String type is most often used by GraphQL to |
||
| 27 | represent free-form human-readable text.'; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param mixed $value |
||
| 31 | * |
||
| 32 | * @return mixed|string |
||
| 33 | * |
||
| 34 | * @throws Error |
||
| 35 | */ |
||
| 36 | 141 | public function serialize($value) |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param mixed $value |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | * |
||
| 56 | * @throws Error |
||
| 57 | */ |
||
| 58 | 23 | public function parseValue($value) |
|
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param Node $valueNode |
||
| 71 | * @param mixed[]|null $variables |
||
| 72 | * |
||
| 73 | * @return string|null |
||
| 74 | * |
||
| 75 | * @throws Exception |
||
| 76 | */ |
||
| 77 | 62 | public function parseLiteral($valueNode, ?array $variables = null) |
|
| 87 |