Skip to content

Commit 7482c2b

Browse files
committed
avoid short variable names
1 parent ef0f9ae commit 7482c2b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/jblond/Diff.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class Diff
5252
/**
5353
* @var array The "old" sequence to use as the basis for the comparison.
5454
*/
55-
private $a = null;
55+
private $old = null;
5656

5757
/**
5858
* @var array The "new" sequence to generate the changes for.
5959
*/
60-
private $b = null;
60+
private $new = null;
6161

6262
/**
6363
* @var array Array containing the generated op codes for the differences between the two items.
@@ -89,8 +89,8 @@ class Diff
8989
*/
9090
public function __construct(array $a, array $b, array $options = array())
9191
{
92-
$this->a = $a;
93-
$this->b = $b;
92+
$this->old = $a;
93+
$this->new = $b;
9494

9595
if (is_array($options)) {
9696
$this->options = array_merge($this->defaultOptions, $options);
@@ -122,10 +122,10 @@ public function render($renderer)
122122
* @param int|null $end The ending number. If not supplied, only the item in $start will be returned.
123123
* @return array Array of all of the lines between the specified range.
124124
*/
125-
public function getA(int $start = 0, $end = null) : array
125+
public function getOld(int $start = 0, $end = null) : array
126126
{
127127
if ($start == 0 && $end === null) {
128-
return $this->a;
128+
return $this->old;
129129
}
130130

131131
if ($end === null) {
@@ -134,7 +134,7 @@ public function getA(int $start = 0, $end = null) : array
134134
$length = $end - $start;
135135
}
136136

137-
return array_slice($this->a, $start, $length);
137+
return array_slice($this->old, $start, $length);
138138
}
139139

140140
/**
@@ -147,10 +147,10 @@ public function getA(int $start = 0, $end = null) : array
147147
* @param int|null $end The ending number. If not supplied, only the item in $start will be returned.
148148
* @return array Array of all of the lines between the specified range.
149149
*/
150-
public function getB(int $start = 0, $end = null) : array
150+
public function getNew(int $start = 0, $end = null) : array
151151
{
152152
if ($start == 0 && $end === null) {
153-
return $this->b;
153+
return $this->new;
154154
}
155155

156156
if ($end === null) {
@@ -159,7 +159,7 @@ public function getB(int $start = 0, $end = null) : array
159159
$length = $end - $start;
160160
}
161161

162-
return array_slice($this->b, $start, $length);
162+
return array_slice($this->new, $start, $length);
163163
}
164164

165165
/**
@@ -176,7 +176,7 @@ public function getGroupedOpcodes() : array
176176
return $this->groupedCodes;
177177
}
178178

179-
$sequenceMatcher = new SequenceMatcher($this->a, $this->b, $this->options, null);
179+
$sequenceMatcher = new SequenceMatcher($this->old, $this->new, $this->options, null);
180180
$this->groupedCodes = $sequenceMatcher->getGroupedOpcodes($this->options['context']);
181181
return $this->groupedCodes;
182182
}

0 commit comments

Comments
 (0)