Skip to content

Commit cb86558

Browse files
authored
Merge pull request #2 from aachekalov/json_hash
JSON hash function
2 parents 836bb35 + 82e1da4 commit cb86558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/JsonDiff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,13 @@ private function rearrangeEqualItems(array $original, array $new)
503503

504504
$origIdx = [];
505505
foreach ($original as $i => $item) {
506-
$hash = $this->jsonHashOriginal->xorHash($item);
506+
$hash = json_encode($item);
507507
$origIdx[$hash][] = $i;
508508
}
509509

510510
$newIdx = [];
511511
foreach ($new as $i => $item) {
512-
$hash = $this->jsonHashNew->xorHash($item);
512+
$hash = json_encode($item);
513513
$newIdx[$i] = $hash;
514514
}
515515

0 commit comments

Comments
 (0)