Total Complexity | 4 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
16 | class AnyType extends ScalarType |
||
17 | { |
||
18 | public const ANY = 'Any'; |
||
19 | |||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | public function __construct(array $config = []) |
||
24 | { |
||
25 | $this->name = self::ANY; |
||
26 | $this->description = 'The `Any` type can represent different type of scalars like string, integer, boolean etc.'; |
||
27 | |||
28 | parent::__construct($config); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Serializes an internal value to include in a response. |
||
33 | * |
||
34 | * @param string $value |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | public function serialize($value) |
||
39 | { |
||
40 | return $value; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Parses an externally provided value (query variable) to use as an input |
||
45 | * |
||
46 | * @param mixed $value |
||
47 | * |
||
48 | * @return mixed |
||
49 | * |
||
50 | * @throws Error |
||
51 | */ |
||
52 | public function parseValue($value) |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param \GraphQL\Language\AST\Node $valueNode |
||
59 | * |
||
60 | * @return string |
||
61 | * |
||
62 | * @throws Error |
||
63 | */ |
||
64 | public function parseLiteral($valueNode) |
||
67 | } |
||
68 | } |
||
69 |