@@ -211,11 +211,11 @@ |
||
| 211 | 211 | $result = '$'; |
| 212 | 212 | foreach ($this->stack as $index => $item) { |
| 213 | 213 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
| 214 | - $result .= '['.$this->pathIndices[$index].']'; |
|
| 214 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) { |
| 218 | - $result .= '.'.$this->pathNames[$index]; |
|
| 218 | + $result .= '.' . $this->pathNames[$index]; |
|
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | |
@@ -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 */ |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @throws \Tebru\Gson\Exception\JsonSyntaxException If trying to read from non object/array |
| 55 | 55 | * @throws \Tebru\PhpType\Exception\MalformedTypeException If the type cannot be parsed |
| 56 | 56 | */ |
| 57 | - public function read(JsonReadable $reader): ?array |
|
| 57 | + public function read(JsonReadable $reader): ? array |
|
| 58 | 58 | { |
| 59 | 59 | if ($reader->peek() === JsonToken::NULL) { |
| 60 | 60 | return $reader->nextNull(); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function read(JsonReadable $reader): ?array |
| 58 | 58 | { |
| 59 | - if ($reader->peek() === JsonToken::NULL) { |
|
| 59 | + if ($reader->peek() === JsonToken::null) { |
|
| 60 | 60 | return $reader->nextNull(); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -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( |