Skip to content

Commit 84941b3

Browse files
committed
remove list, but use an array
1 parent 9700db7 commit 84941b3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,7 @@ public function getOpCodes(): array
487487
$this->opCodes = array();
488488

489489
$blocks = $this->getMatchingBlocks();
490-
foreach ($blocks as $block) {
491-
list($ai, $bj, $size) = $block;
490+
foreach ($blocks as [$ai, $bj, $size]) {
492491
$tag = '';
493492
if ($i < $ai && $j < $bj) {
494493
$tag = 'replace';
@@ -579,8 +578,7 @@ public function getGroupedOpcodes(int $context = 3): array
579578
$groups = array();
580579
$group = array();
581580

582-
foreach ($opCodes as $code) {
583-
list($tag, $i1, $i2, $j1, $j2) = $code;
581+
foreach ($opCodes as [$tag, $i1, $i2, $j1, $j2]) {
584582
if ($tag == 'equal' && $i2 - $i1 > $maxRange) {
585583
$group[] = array(
586584
$tag,

0 commit comments

Comments
 (0)