| @@ -21,7 +21,7 @@ discard block | ||
| 21 | 21 | $xorHash = ''; | 
| 22 | 22 | |
| 23 | 23 |          if (!$data instanceof \stdClass && !is_array($data)) { | 
| 24 | - $s = $path . (string)$data; | |
| 24 | + $s = $path.(string) $data; | |
| 25 | 25 |              if (strlen($xorHash) < strlen($s)) { | 
| 26 | 26 | $xorHash = str_pad($xorHash, strlen($s)); | 
| 27 | 27 | } | 
| @@ -32,15 +32,15 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 |          if ($this->options & JsonDiff::TOLERATE_ASSOCIATIVE_ARRAYS) { | 
| 34 | 34 |              if (is_array($data) && !empty($data) && !array_key_exists(0, $data)) { | 
| 35 | - $data = (object)$data; | |
| 35 | + $data = (object) $data; | |
| 36 | 36 | } | 
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 |          if (is_array($data)) { | 
| 40 | 40 |              if ($this->options & JsonDiff::REARRANGE_ARRAYS) { | 
| 41 | 41 |                  foreach ($data as $key => $item) { | 
| 42 | - $itemPath = $path . '/' . $key; | |
| 43 | - $itemHash = $path . $this->xorHash($item, $itemPath); | |
| 42 | + $itemPath = $path.'/'.$key; | |
| 43 | + $itemHash = $path.$this->xorHash($item, $itemPath); | |
| 44 | 44 |                      if (strlen($xorHash) < strlen($itemHash)) { | 
| 45 | 45 | $xorHash = str_pad($xorHash, strlen($itemHash)); | 
| 46 | 46 | } | 
| @@ -48,8 +48,8 @@ discard block | ||
| 48 | 48 | } | 
| 49 | 49 |              } else { | 
| 50 | 50 |                  foreach ($data as $key => $item) { | 
| 51 | - $itemPath = $path . '/' . $key; | |
| 52 | - $itemHash = md5($itemPath . $this->xorHash($item, $itemPath), true); | |
| 51 | + $itemPath = $path.'/'.$key; | |
| 52 | + $itemHash = md5($itemPath.$this->xorHash($item, $itemPath), true); | |
| 53 | 53 |                      if (strlen($xorHash) < strlen($itemHash)) { | 
| 54 | 54 | $xorHash = str_pad($xorHash, strlen($itemHash)); | 
| 55 | 55 | } | 
| @@ -62,9 +62,9 @@ discard block | ||
| 62 | 62 | |
| 63 | 63 | $dataKeys = get_object_vars($data); | 
| 64 | 64 |          foreach ($dataKeys as $key => $value) { | 
| 65 | - $propertyPath = $path . '/' . | |
| 66 | - JsonPointer::escapeSegment($key, (bool)($this->options & JsonDiff::JSON_URI_FRAGMENT_ID)); | |
| 67 | - $propertyHash = $propertyPath . $this->xorHash($value, $propertyPath); | |
| 65 | + $propertyPath = $path.'/'. | |
| 66 | + JsonPointer::escapeSegment($key, (bool) ($this->options & JsonDiff::JSON_URI_FRAGMENT_ID)); | |
| 67 | + $propertyHash = $propertyPath.$this->xorHash($value, $propertyPath); | |
| 68 | 68 |              if (strlen($xorHash) < strlen($propertyHash)) { | 
| 69 | 69 | $xorHash = str_pad($xorHash, strlen($propertyHash)); | 
| 70 | 70 | } |