We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f75c870 commit 3af88d2Copy full SHA for 3af88d2
lib/jblond/Diff.php
@@ -129,11 +129,10 @@ public function getOld(int $start = 0, $end = null) : array
129
}
130
131
if ($end === null) {
132
- $length = 1;
133
- } else {
134
- $length = $end - $start;
+ return array_slice($this->old, $start, 1);
135
136
+ $length = $end - $start;
137
return array_slice($this->old, $start, $length);
138
139
@@ -154,11 +153,10 @@ public function getNew(int $start = 0, $end = null) : array
154
153
155
156
157
158
159
+ return array_slice($this->new, $start, 1);
160
161
162
return array_slice($this->new, $start, $length);
163
164
0 commit comments