@@ -262,11 +262,11 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | if ($this->options & self::TOLERATE_ASSOCIATIVE_ARRAYS) { |
| 264 | 264 | if (is_array($original) && !empty($original) && !array_key_exists(0, $original)) { |
| 265 | - $original = (object)$original; |
|
| 265 | + $original = (object) $original; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | if (is_array($new) && !empty($new) && !array_key_exists(0, $new)) { |
| 269 | - $new = (object)$new; |
|
| 269 | + $new = (object) $new; |
|
| 270 | 270 | } |
| 271 | 271 | } |
| 272 | 272 | |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | JsonPointer::add($this->merge, $this->pathItems, $new); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - $isUriFragment = (bool)($this->options & self::JSON_URI_FRAGMENT_ID); |
|
| 325 | + $isUriFragment = (bool) ($this->options & self::JSON_URI_FRAGMENT_ID); |
|
| 326 | 326 | foreach ($originalKeys as $key => $originalValue) { |
| 327 | 327 | if ($this->options & self::STOP_ON_DIFF) { |
| 328 | 328 | if ($this->modifiedCnt || $this->addedCnt || $this->removedCnt) { |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | if ($isArray && is_int($actualKey)) { |
| 337 | 337 | $actualKey -= $removedOffset; |
| 338 | 338 | } |
| 339 | - $this->path .= '/' . JsonPointer::escapeSegment((string)$actualKey, $isUriFragment); |
|
| 339 | + $this->path .= '/'.JsonPointer::escapeSegment((string) $actualKey, $isUriFragment); |
|
| 340 | 340 | $this->pathItems[] = $actualKey; |
| 341 | 341 | |
| 342 | 342 | if (array_key_exists($key, $newArray)) { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | return null; |
| 374 | 374 | } |
| 375 | 375 | $newOrdered[$key] = $value; |
| 376 | - $path = $this->path . '/' . JsonPointer::escapeSegment($key, $isUriFragment); |
|
| 376 | + $path = $this->path.'/'.JsonPointer::escapeSegment($key, $isUriFragment); |
|
| 377 | 377 | $pathItems = $this->pathItems; |
| 378 | 378 | $pathItems[] = $key; |
| 379 | 379 | JsonPointer::add($this->added, $pathItems, $value); |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - return is_array($new) ? $newOrdered : (object)$newOrdered; |
|
| 392 | + return is_array($new) ? $newOrdered : (object) $newOrdered; |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | private function rearrangeArray(array $original, array $new) |