@@ -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 | |
@@ -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 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | return JsonPrimitive::create($reader->nextDouble()); |
| 60 | 60 | case JsonToken::BOOLEAN: |
| 61 | 61 | return JsonPrimitive::create($reader->nextBoolean()); |
| 62 | - case JsonToken::NULL: |
|
| 62 | + case JsonToken::null: |
|
| 63 | 63 | $reader->nextNull(); |
| 64 | 64 | |
| 65 | 65 | return new JsonNull(); |
@@ -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 | |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | case 'boolean': |
| 171 | 171 | return JsonToken::BOOLEAN; |
| 172 | 172 | case 'NULL': |
| 173 | - $token = JsonToken::NULL; |
|
| 173 | + $token = JsonToken::null; |
|
| 174 | 174 | break; |
| 175 | 175 | case StdClassIterator::class: |
| 176 | 176 | /** @var StdClassIterator $element */ |
@@ -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 | |
@@ -216,11 +216,11 @@ discard block |
||
| 216 | 216 | $result = '$'; |
| 217 | 217 | foreach ($this->stack as $index => $item) { |
| 218 | 218 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
| 219 | - $result .= '['.$this->pathIndices[$index].']'; |
|
| 219 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) { |
| 223 | - $result .= '.'.$this->pathNames[$index]; |
|
| 223 | + $result .= '.' . $this->pathNames[$index]; |
|
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
@@ -66,8 +66,8 @@ |
||
| 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( |
@@ -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 | |
@@ -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 | |
@@ -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\Element; |
| 10 | 10 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function asString(): string |
| 108 | 108 | { |
| 109 | - return (string) $this->value; |
|
| 109 | + return (string)$this->value; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function asInteger(): int |
| 118 | 118 | { |
| 119 | - return (int) $this->value; |
|
| 119 | + return (int)$this->value; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function asFloat(): float |
| 128 | 128 | { |
| 129 | - return (float) $this->value; |
|
| 129 | + return (float)$this->value; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public function asBoolean(): bool |
| 138 | 138 | { |
| 139 | - return (bool) $this->value; |
|
| 139 | + return (bool)$this->value; |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
@@ -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\Element; |
| 10 | 10 | |
@@ -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\Exception; |
| 10 | 10 | |