Skip to content

Commit 82e1da4

Browse files
author
Алексей Чекалов
committed
JSON hash function
* Let hash is the JSON itself
1 parent 836bb35 commit 82e1da4

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)