Skip to content

Commit 9e649d8

Browse files
committed
Fix typos
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent b4704f0 commit 9e649d8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Renderer/Html/LineRenderer/AbstractLineRenderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ public function getTemplateOptions(): array
8989
}
9090

9191
/**
92-
* Get the change extent segments.
92+
* Get the changed extent segments.
9393
*
9494
* @param array $from the from array
9595
* @param array $to the to array
9696
*
97-
* @return array the change extent segment
97+
* @return array the changed extent segments
9898
*/
99-
protected function getChangeExtentSegments(array $from, array $to): array
99+
protected function getChangedExtentSegments(array $from, array $to): array
100100
{
101101
return $this->sequenceMatcher->setSequences($from, $to)->getOpcodes();
102102
}

src/Renderer/Html/LineRenderer/Char.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Char extends AbstractLineRenderer
1515
*/
1616
public function render(MbString $mbFrom, MbString $mbTo): LineRendererInterface
1717
{
18-
$opcodes = $this->getChangeExtentSegments($mbFrom->toArray(), $mbTo->toArray());
18+
$opcodes = $this->getChangedExtentSegments($mbFrom->toArray(), $mbTo->toArray());
1919

2020
// reversely iterate opcodes
2121
foreach (ReverseIterator::fromArray($opcodes) as [$tag, $i1, $i2, $j1, $j2]) {

src/Renderer/Html/LineRenderer/Line.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Line extends AbstractLineRenderer
1313
*/
1414
public function render(MbString $mbFrom, MbString $mbTo): LineRendererInterface
1515
{
16-
[$start, $end] = $this->getChangeExtentBeginEnd($mbFrom, $mbTo);
16+
[$start, $end] = $this->getChangedExtentBeginEnd($mbFrom, $mbTo);
1717

1818
// two strings are the same
1919
if ($end === 0) {
@@ -45,7 +45,7 @@ public function render(MbString $mbFrom, MbString $mbTo): LineRendererInterface
4545
* @return array Array containing the starting position (non-negative) and the ending position (negative)
4646
* [0, 0] if two strings are the same
4747
*/
48-
protected function getChangeExtentBeginEnd(MbString $mbFrom, MbString $mbTo): array
48+
protected function getChangedExtentBeginEnd(MbString $mbFrom, MbString $mbTo): array
4949
{
5050
// two strings are the same
5151
// most lines should be this cases, an early return could save many function calls

src/Renderer/Html/LineRenderer/Word.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function render(MbString $mbFrom, MbString $mbTo): LineRendererInterface
2020
$fromWords = $mbFrom->toArraySplit("/([{$punctuations}])/uS", -1, \PREG_SPLIT_DELIM_CAPTURE);
2121
$toWords = $mbTo->toArraySplit("/([{$punctuations}])/uS", -1, \PREG_SPLIT_DELIM_CAPTURE);
2222

23-
$opcodes = $this->getChangeExtentSegments($fromWords, $toWords);
23+
$opcodes = $this->getChangedExtentSegments($fromWords, $toWords);
2424

2525
// reversely iterate opcodes
2626
foreach (ReverseIterator::fromArray($opcodes) as [$tag, $i1, $i2, $j1, $j2]) {

0 commit comments

Comments
 (0)