@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Annotation; |
| 10 | 10 | |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | const STRING = 'string'; |
| 24 | 24 | const BOOLEAN = 'boolean'; |
| 25 | 25 | const NUMBER = 'number'; |
| 26 | - const NULL = 'null'; |
|
| 26 | + const null = 'null'; |
|
| 27 | 27 | const NAME = 'name'; |
| 28 | 28 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson; |
| 10 | 10 | |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | $token = JsonToken::BEGIN_ARRAY; |
| 167 | 167 | break; |
| 168 | 168 | case JsonNull::class: |
| 169 | - $token = JsonToken::NULL; |
|
| 169 | + $token = JsonToken::null; |
|
| 170 | 170 | break; |
| 171 | 171 | case JsonObject::class: |
| 172 | 172 | $token = JsonToken::BEGIN_OBJECT; |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal; |
| 10 | 10 | |
@@ -219,11 +219,11 @@ discard block |
||
| 219 | 219 | $result = '$'; |
| 220 | 220 | foreach ($this->stack as $index => $item) { |
| 221 | 221 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
| 222 | - $result .= '['.$this->pathIndices[$index].']'; |
|
| 222 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | if ($item instanceof JsonObjectIterator && isset($this->pathNames[$index])) { |
| 226 | - $result .= '.'.$this->pathNames[$index]; |
|
| 226 | + $result .= '.' . $this->pathNames[$index]; |
|
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | |
@@ -160,7 +160,7 @@ |
||
| 160 | 160 | */ |
| 161 | 161 | public function nextNull() |
| 162 | 162 | { |
| 163 | - $this->expect(JsonToken::NULL); |
|
| 163 | + $this->expect(JsonToken::null); |
|
| 164 | 164 | |
| 165 | 165 | $this->pop(); |
| 166 | 166 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal; |
| 10 | 10 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function read(JsonReadable $reader): ?float |
| 28 | 28 | { |
| 29 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 29 | + if ($reader->peek() === JsonToken::null) { |
|
| 30 | 30 | return $reader->nextNull(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal\TypeAdapter; |
| 10 | 10 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function read(JsonReadable $reader): ?int |
| 28 | 28 | { |
| 29 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 29 | + if ($reader->peek() === JsonToken::null) { |
|
| 30 | 30 | return $reader->nextNull(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal\TypeAdapter; |
| 10 | 10 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function read(JsonReadable $reader): ?bool |
| 28 | 28 | { |
| 29 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 29 | + if ($reader->peek() === JsonToken::null) { |
|
| 30 | 30 | return $reader->nextNull(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal\TypeAdapter; |
| 10 | 10 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function read(JsonReadable $reader): ?string |
| 28 | 28 | { |
| 29 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 29 | + if ($reader->peek() === JsonToken::null) { |
|
| 30 | 30 | return $reader->nextNull(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal\TypeAdapter; |
| 10 | 10 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | public function read(JsonReadable $reader): ?DateTime |
| 52 | 52 | { |
| 53 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 53 | + if ($reader->peek() === JsonToken::null) { |
|
| 54 | 54 | return $reader->nextNull(); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * Distributed under the MIT License (http://opensource.org/licenses/MIT) |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Tebru\Gson\Internal\TypeAdapter; |
| 10 | 10 | |