@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * |
| 29 | 29 | * @return string |
| 30 | 30 | */ |
| 31 | - public function getType(): ?string; |
|
| 31 | + public function getType(): ? string; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Returns true if the type matches the class, parent, full type, or one of the interfaces |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | * @param string $name |
| 52 | 52 | * @return Property|null |
| 53 | 53 | */ |
| 54 | - public function getBySerializedName(string $name): ?Property |
|
| 54 | + public function getBySerializedName(string $name): ? Property |
|
| 55 | 55 | { |
| 56 | 56 | if (!isset($this->elements[$name])) { |
| 57 | 57 | return null; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | ); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - return (float)$this->pop(); |
|
| 176 | + return (float) $this->pop(); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | ); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - return (int)$this->pop(); |
|
| 193 | + return (int) $this->pop(); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function __construct(JsonObject $jsonObject) |
| 25 | 25 | { |
| 26 | 26 | $this->queue = new SplQueue(); |
| 27 | - foreach($jsonObject as $key => $value) { |
|
| 27 | + foreach ($jsonObject as $key => $value) { |
|
| 28 | 28 | $this->queue[] = [$key, $value]; |
| 29 | 29 | $this->total++; |
| 30 | 30 | } |
@@ -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 | } |