Skip to content

Commit bf2ddb8

Browse files
committedMar 4, 2024
chore: tidy codes
Signed-off-by: Jack Cherng <[email protected]>
1 parent e0da986 commit bf2ddb8

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed
 

‎src/Differ.php

+7-11
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ final class Differ
7272

7373
/**
7474
* @var int the end index for the old if the old has no EOL at EOF
75-
* -1 means the old has an EOL at EOF
75+
* `-1` means the old has an EOL at EOF
7676
*/
7777
private int $oldNoEolAtEofIdx = -1;
7878

7979
/**
8080
* @var int the end index for the new if the new has no EOL at EOF
81-
* -1 means the new has an EOL at EOF
81+
* `-1` means the new has an EOL at EOF
8282
*/
8383
private int $newNoEolAtEofIdx = -1;
8484

8585
/**
8686
* @var int the result of comparing the old and the new with the spaceship operator
87-
* -1 means old < new, 0 means old == new, 1 means old > new
87+
* `-1` means `old < new`, `0` means `old == new`, `1` means `old > new`
8888
*/
8989
private int $oldNewComparison = 0;
9090

@@ -310,12 +310,10 @@ public function getGroupedOpcodes(): array
310310
return $this->groupedOpcodes;
311311
}
312312

313-
$old = $this->old;
314-
$new = $this->new;
315-
$this->getGroupedOpcodesPre($old, $new);
313+
$this->getGroupedOpcodesPre($this->old, $this->new);
316314

317315
$opcodes = $this->sequenceMatcher
318-
->setSequences($old, $new)
316+
->setSequences($this->old, $this->new)
319317
->getGroupedOpcodes($this->options['context'])
320318
;
321319

@@ -337,12 +335,10 @@ public function getGroupedOpcodesGnu(): array
337335
return $this->groupedOpcodesGnu;
338336
}
339337

340-
$old = $this->old;
341-
$new = $this->new;
342-
$this->getGroupedOpcodesGnuPre($old, $new);
338+
$this->getGroupedOpcodesGnuPre($this->old, $this->new);
343339

344340
$opcodes = $this->sequenceMatcher
345-
->setSequences($old, $new)
341+
->setSequences($this->old, $this->new)
346342
->getGroupedOpcodes($this->options['context'])
347343
;
348344

0 commit comments

Comments
 (0)