@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @throws \Tebru\Gson\Exception\JsonSyntaxException If trying to read from non object/array |
| 55 | 55 | * @throws \Tebru\PhpType\Exception\MalformedTypeException If the type cannot be parsed |
| 56 | 56 | */ |
| 57 | - public function read(JsonReadable $reader): ?array |
|
| 57 | + public function read(JsonReadable $reader): ? array |
|
| 58 | 58 | { |
| 59 | 59 | if ($reader->peek() === JsonToken::NULL) { |
| 60 | 60 | return $reader->nextNull(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param JsonReadable $reader |
| 25 | 25 | * @return string|null |
| 26 | 26 | */ |
| 27 | - public function read(JsonReadable $reader): ?string |
|
| 27 | + public function read(JsonReadable $reader): ? string |
|
| 28 | 28 | { |
| 29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
| 30 | 30 | return $reader->nextNull(); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @return DateTime|null |
| 51 | 51 | * @throws \Tebru\Gson\Exception\JsonSyntaxException If the DateTime could not be created from format |
| 52 | 52 | */ |
| 53 | - public function read(JsonReadable $reader): ?DateTime |
|
| 53 | + public function read(JsonReadable $reader): ? DateTime |
|
| 54 | 54 | { |
| 55 | 55 | if ($reader->peek() === JsonToken::NULL) { |
| 56 | 56 | return $reader->nextNull(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param JsonReadable $reader |
| 25 | 25 | * @return bool|null |
| 26 | 26 | */ |
| 27 | - public function read(JsonReadable $reader): ?bool |
|
| 27 | + public function read(JsonReadable $reader): ? bool |
|
| 28 | 28 | { |
| 29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
| 30 | 30 | return $reader->nextNull(); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | switch ($reader->peek()) { |
| 51 | 51 | case JsonToken::BEGIN_ARRAY: |
| 52 | - $type = new TypeToken(TypeToken::ARRAY); |
|
| 52 | + $type = new TypeToken(TypeToken::array); |
|
| 53 | 53 | break; |
| 54 | 54 | case JsonToken::BEGIN_OBJECT: |
| 55 | 55 | $type = new TypeToken(TypeToken::OBJECT); |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | case JsonToken::NUMBER: |
| 67 | 67 | $type = new TypeToken(TypeToken::FLOAT); |
| 68 | 68 | break; |
| 69 | - case JsonToken::NULL: |
|
| 70 | - $type = new TypeToken(TypeToken::NULL); |
|
| 69 | + case JsonToken::null: |
|
| 70 | + $type = new TypeToken(TypeToken::null); |
|
| 71 | 71 | break; |
| 72 | 72 | default: |
| 73 | 73 | throw new JsonSyntaxException( |