Skip to content

Commit 9d46847

Browse files
DigiLiveJBlond
authored andcommitted
Refactor variables
1 parent ea6a2e4 commit 9d46847

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,18 +344,18 @@ public function getOpCodes(): array
344344
}
345345

346346
if ($this->options['ignoreLines']) {
347-
$part1 = array_slice($this->old, $i, $ai - $i);
348-
$part2 = array_slice($this->new, $j, $bj - $j);
347+
$slice1 = array_slice($this->old, $i, $ai - $i);
348+
$slice2 = array_slice($this->new, $j, $bj - $j);
349349

350350
if ($this->options['ignoreLines'] == 2) {
351351
array_walk(
352-
$part1,
352+
$slice1,
353353
function (&$line) {
354354
$line = trim($line);
355355
}
356356
);
357357
array_walk(
358-
$part2,
358+
$slice2,
359359
function (&$line) {
360360
$line = trim($line);
361361
}
@@ -364,8 +364,8 @@ function (&$line) {
364364
}
365365

366366
if (
367-
($tag == 'delete' && implode('', $part1) == '') ||
368-
($tag == 'insert' && implode('', $part2) == '')
367+
($tag == 'delete' && implode('', $slice1) == '') ||
368+
($tag == 'insert' && implode('', $slice2) == '')
369369
) {
370370
$tag = 'ignore';
371371
}

0 commit comments

Comments
 (0)