@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | { |
162 | 162 | $this->expect(JsonToken::BOOLEAN); |
163 | 163 | |
164 | - $result = (bool)$this->pop(); |
|
164 | + $result = (bool) $this->pop(); |
|
165 | 165 | |
166 | 166 | $this->incrementPathIndex(); |
167 | 167 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | { |
179 | 179 | $this->expect(JsonToken::NUMBER); |
180 | 180 | |
181 | - $result = (float)$this->pop(); |
|
181 | + $result = (float) $this->pop(); |
|
182 | 182 | |
183 | 183 | $this->incrementPathIndex(); |
184 | 184 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | { |
196 | 196 | $this->expect(JsonToken::NUMBER); |
197 | 197 | |
198 | - $result = (int)$this->pop(); |
|
198 | + $result = (int) $this->pop(); |
|
199 | 199 | |
200 | 200 | $this->incrementPathIndex(); |
201 | 201 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | $this->expect(JsonToken::STRING); |
219 | 219 | |
220 | - $result = (string)$this->pop(); |
|
220 | + $result = (string) $this->pop(); |
|
221 | 221 | |
222 | 222 | $this->incrementPathIndex(); |
223 | 223 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | $this->push($value); |
263 | 263 | |
264 | - return (string)$key; |
|
264 | + return (string) $key; |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
@@ -350,11 +350,11 @@ discard block |
||
350 | 350 | $result = '$'; |
351 | 351 | foreach ($this->stack as $index => $item) { |
352 | 352 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
353 | - $result .= '['.$this->pathIndices[$index].']'; |
|
353 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) { |
357 | - $result .= '.'.$this->pathNames[$index]; |
|
357 | + $result .= '.' . $this->pathNames[$index]; |
|
358 | 358 | } |
359 | 359 | } |
360 | 360 |
@@ -354,11 +354,11 @@ |
||
354 | 354 | $result = '$'; |
355 | 355 | foreach ($this->stack as $index => $item) { |
356 | 356 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
357 | - $result .= '['.$this->pathIndices[$index].']'; |
|
357 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | if ($item instanceof JsonObjectIterator && isset($this->pathNames[$index])) { |
361 | - $result .= '.'.$this->pathNames[$index]; |
|
361 | + $result .= '.' . $this->pathNames[$index]; |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @throws \InvalidArgumentException if the type cannot be handled by a type adapter |
57 | 57 | * @throws \LogicException If the wrong number of generics exist |
58 | 58 | */ |
59 | - public function read(JsonReadable $reader): ?array |
|
59 | + public function read(JsonReadable $reader): ? array |
|
60 | 60 | { |
61 | 61 | if ($reader->peek() === JsonToken::NULL) { |
62 | 62 | return $reader->nextNull(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | throw new UnexpectedJsonTokenException(sprintf('Expected integer, but found string for key at "%s"', $reader->getPath())); |
112 | 112 | } |
113 | 113 | |
114 | - $name = (int)$name; |
|
114 | + $name = (int) $name; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $valueAdapter = $this->typeAdapterProvider->getAdapter($generics[1]); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | // no generics specified |
193 | 193 | case 0: |
194 | 194 | if ($arrayIsObject) { |
195 | - $writer->name((string)$key); |
|
195 | + $writer->name((string) $key); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | $adapter = $this->typeAdapterProvider->getAdapter(DefaultPhpType::createFromVariable($item)); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | // generic for value specified |
203 | 203 | case 1: |
204 | 204 | if ($arrayIsObject) { |
205 | - $writer->name((string)$key); |
|
205 | + $writer->name((string) $key); |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | $adapter = $this->typeAdapterProvider->getAdapter($generics[0]); |