Skip to content

Commit 5d07754

Browse files
committed
avoid short variable names
1 parent 0f27cc1 commit 5d07754

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/jblond/Diff/Renderer/Html/HtmlArray.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ public function renderHtml($changes, $object)
112112
*/
113113
public function render()
114114
{
115-
// As we'll be modifying a & b to include our change markers,
115+
// As we'll be modifying old & new to include our change markers,
116116
// we need to get the contents and store them here. That way
117117
// we're not going to destroy the original data
118-
$a = $this->diff->getOld();
119-
$b = $this->diff->getNew();
118+
$old = $this->diff->getOld();
119+
$new = $this->diff->getNew();
120120

121121
$changes = array();
122122
$opCodes = $this->diff->getGroupedOpcodes();
@@ -129,8 +129,8 @@ public function render()
129129

130130
if ($tag == 'replace' && $i2 - $i1 == $j2 - $j1) {
131131
for ($i = 0; $i < ($i2 - $i1); ++$i) {
132-
$fromLine = $a[$i1 + $i];
133-
$toLine = $b[$j1 + $i];
132+
$fromLine = $old[$i1 + $i];
133+
$toLine = $new[$j1 + $i];
134134

135135
list($start, $end) = $this->getChangeExtent($fromLine, $toLine);
136136
if ($start != 0 || $end != 0) {
@@ -145,8 +145,8 @@ public function render()
145145
"\0" . mb_substr($toLine, $start, $realEnd - $start) . "\1" .
146146
mb_substr($toLine, $realEnd);
147147

148-
$a[$i1 + $i] = $fromLine;
149-
$b[$j1 + $i] = $toLine;
148+
$old[$i1 + $i] = $fromLine;
149+
$new[$j1 + $i] = $toLine;
150150
}
151151
}
152152
}
@@ -159,20 +159,20 @@ public function render()
159159
$lastTag = $tag;
160160

161161
if ($tag == 'equal') {
162-
$lines = array_slice($a, $i1, ($i2 - $i1));
162+
$lines = array_slice($old, $i1, ($i2 - $i1));
163163
$blocks[$lastBlock]['base']['lines'] += $this->formatLines($lines);
164-
$lines = array_slice($b, $j1, ($j2 - $j1));
164+
$lines = array_slice($new, $j1, ($j2 - $j1));
165165
$blocks[$lastBlock]['changed']['lines'] += $this->formatLines($lines);
166166
} else {
167167
if ($tag == 'replace' || $tag == 'delete') {
168-
$lines = array_slice($a, $i1, ($i2 - $i1));
168+
$lines = array_slice($old, $i1, ($i2 - $i1));
169169
$lines = $this->formatLines($lines);
170170
$lines = str_replace(array("\0", "\1"), array('<del>', '</del>'), $lines);
171171
$blocks[$lastBlock]['base']['lines'] += $lines;
172172
}
173173

174174
if ($tag == 'replace' || $tag == 'insert') {
175-
$lines = array_slice($b, $j1, ($j2 - $j1));
175+
$lines = array_slice($new, $j1, ($j2 - $j1));
176176
$lines = $this->formatLines($lines);
177177
$lines = str_replace(array("\0", "\1"), array('<ins>', '</ins>'), $lines);
178178
$blocks[$lastBlock]['changed']['lines'] += $lines;

0 commit comments

Comments
 (0)