@@ -49,7 +49,7 @@ |
||
49 | 49 | * @param JsonReadable $reader |
50 | 50 | * @return DateTime|null |
51 | 51 | */ |
52 | - public function read(JsonReadable $reader): ?DateTime |
|
52 | + public function read(JsonReadable $reader): ? DateTime |
|
53 | 53 | { |
54 | 54 | if ($reader->peek() === JsonToken::NULL) { |
55 | 55 | return $reader->nextNull(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param JsonReadable $reader |
25 | 25 | * @return int|null |
26 | 26 | */ |
27 | - public function read(JsonReadable $reader): ?int |
|
27 | + public function read(JsonReadable $reader): ? int |
|
28 | 28 | { |
29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
30 | 30 | return $reader->nextNull(); |
@@ -48,6 +48,6 @@ discard block |
||
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $writer->writeInteger((int)$value); |
|
51 | + $writer->writeInteger((int) $value); |
|
52 | 52 | } |
53 | 53 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @throws \InvalidArgumentException if the type cannot be handled by a type adapter |
58 | 58 | * @throws \LogicException If the wrong number of generics exist |
59 | 59 | */ |
60 | - public function read(JsonReadable $reader): ?array |
|
60 | + public function read(JsonReadable $reader): ? array |
|
61 | 61 | { |
62 | 62 | if ($reader->peek() === JsonToken::NULL) { |
63 | 63 | return $reader->nextNull(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | // no generics specified |
188 | 188 | case 0: |
189 | 189 | if ($arrayIsObject) { |
190 | - $writer->name((string)$key); |
|
190 | + $writer->name((string) $key); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | $adapter = $this->typeAdapterProvider->getAdapter(DefaultPhpType::createFromVariable($item)); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | // generic for value specified |
198 | 198 | case 1: |
199 | 199 | if ($arrayIsObject) { |
200 | - $writer->name((string)$key); |
|
200 | + $writer->name((string) $key); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | $adapter = $this->typeAdapterProvider->getAdapter($generics[0]); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param JsonReadable $reader |
25 | 25 | * @return mixed |
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(); |
@@ -48,6 +48,6 @@ discard block |
||
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $writer->writeBoolean((bool)$value); |
|
51 | + $writer->writeBoolean((bool) $value); |
|
52 | 52 | } |
53 | 53 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param JsonReadable $reader |
25 | 25 | * @return mixed |
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(); |
@@ -48,6 +48,6 @@ discard block |
||
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $writer->writeString((string)$value); |
|
51 | + $writer->writeString((string) $value); |
|
52 | 52 | } |
53 | 53 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param JsonReadable $reader |
25 | 25 | * @return float|null |
26 | 26 | */ |
27 | - public function read(JsonReadable $reader): ?float |
|
27 | + public function read(JsonReadable $reader): ? float |
|
28 | 28 | { |
29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
30 | 30 | return $reader->nextNull(); |
@@ -48,6 +48,6 @@ discard block |
||
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $writer->writeFloat((float)$value); |
|
51 | + $writer->writeFloat((float) $value); |
|
52 | 52 | } |
53 | 53 | } |