Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class NullTypeAdapter extends TypeAdapter |
||
17 | { |
||
18 | /** |
||
19 | * Read the next value, convert it to its type and return it |
||
20 | * |
||
21 | * @param JsonReadable $reader |
||
22 | * @return void|null |
||
23 | */ |
||
24 | public function read(JsonReadable $reader): void |
||
25 | { |
||
26 | $reader->nextNull(); |
||
27 | } |
||
28 | 1 | ||
29 | /** |
||
30 | 1 | * Write the value to the writer for the type |
|
31 | 1 | * |
|
32 | * @param JsonWritable $writer |
||
33 | * @param mixed $value |
||
34 | * @return void |
||
35 | */ |
||
36 | public function write(JsonWritable $writer, $value): void |
||
39 | } |
||
40 | } |
||
41 |