@@ -279,12 +279,12 @@ discard block |
||
279 | 279 | if ($merge && is_array($new) && !is_array($original)) { |
280 | 280 | $merge = false; |
281 | 281 | JsonPointer::add($this->merge, $this->pathItems, $new); |
282 | - } elseif ($merge && $new instanceof \stdClass && !$original instanceof \stdClass) { |
|
282 | + } elseif ($merge && $new instanceof \stdClass && !$original instanceof \stdClass) { |
|
283 | 283 | $merge = false; |
284 | 284 | JsonPointer::add($this->merge, $this->pathItems, $new); |
285 | 285 | } |
286 | 286 | |
287 | - $isUriFragment = (bool)($this->options & self::JSON_URI_FRAGMENT_ID); |
|
287 | + $isUriFragment = (bool) ($this->options & self::JSON_URI_FRAGMENT_ID); |
|
288 | 288 | foreach ($originalKeys as $key => $originalValue) { |
289 | 289 | if ($this->options & self::STOP_ON_DIFF) { |
290 | 290 | if ($this->modifiedCnt || $this->addedCnt || $this->removedCnt) { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | if ($isArray) { |
299 | 299 | $actualKey -= $removedOffset; |
300 | 300 | } |
301 | - $this->path .= '/' . JsonPointer::escapeSegment((string)$actualKey, $isUriFragment); |
|
301 | + $this->path .= '/'.JsonPointer::escapeSegment((string) $actualKey, $isUriFragment); |
|
302 | 302 | $this->pathItems[] = $actualKey; |
303 | 303 | |
304 | 304 | if (array_key_exists($key, $newArray)) { |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | return null; |
336 | 336 | } |
337 | 337 | $newOrdered[$key] = $value; |
338 | - $path = $this->path . '/' . JsonPointer::escapeSegment($key, $isUriFragment); |
|
338 | + $path = $this->path.'/'.JsonPointer::escapeSegment($key, $isUriFragment); |
|
339 | 339 | $pathItems = $this->pathItems; |
340 | 340 | $pathItems[] = $key; |
341 | 341 | JsonPointer::add($this->added, $pathItems, $value); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | } |
353 | 353 | |
354 | - return is_array($new) ? $newOrdered : (object)$newOrdered; |
|
354 | + return is_array($new) ? $newOrdered : (object) $newOrdered; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | private function rearrangeArray(array $original, array $new) |