Skip to content

Commit 3ae6da1

Browse files
committed
Make coding thoughts more clear
These "+=" is "technically" wrong but just get the same result luckily. Signed-off-by: Jack Cherng <[email protected]>
1 parent 0394a74 commit 3ae6da1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Renderer/Html/AbstractHtml.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ public function getChanges(Differ $differ): array
8989
// the old and the new may not be exactly the same
9090
// because of ignoreCase, ignoreWhitespace, etc
9191
$lines = \array_slice($old, $i1, $i2 - $i1);
92-
$hunk[$lastBlock]['old']['lines'] += $this->formatLines($lines);
92+
$hunk[$lastBlock]['old']['lines'] = $this->formatLines($lines);
9393
$lines = \array_slice($new, $j1, $j2 - $j1);
94-
$hunk[$lastBlock]['new']['lines'] += $this->formatLines($lines);
94+
$hunk[$lastBlock]['new']['lines'] = $this->formatLines($lines);
9595

9696
continue;
9797
}
@@ -105,7 +105,7 @@ public function getChanges(Differ $differ): array
105105
$lines
106106
);
107107

108-
$hunk[$lastBlock]['old']['lines'] += $lines;
108+
$hunk[$lastBlock]['old']['lines'] = $lines;
109109
}
110110

111111
if ($tag & (SequenceMatcher::OP_REP | SequenceMatcher::OP_INS)) {
@@ -117,7 +117,7 @@ public function getChanges(Differ $differ): array
117117
$lines
118118
);
119119

120-
$hunk[$lastBlock]['new']['lines'] += $lines;
120+
$hunk[$lastBlock]['new']['lines'] = $lines;
121121
}
122122
}
123123

0 commit comments

Comments
 (0)