Skip to content

Commit 926f19f

Browse files
committed
$ php-cs-fixer fix
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 89ec714 commit 926f19f

File tree

9 files changed

+25
-5
lines changed

9 files changed

+25
-5
lines changed

src/Differ.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public function finalize(): self
265265
private function resetCachedResults(): self
266266
{
267267
foreach (static::CACHED_PROPERTIES as $property => $value) {
268-
$this->$property = $value;
268+
$this->{$property} = $value;
269269
}
270270

271271
$this->isCacheDirty = false;

src/Renderer/Html/Inline.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,22 @@ protected function renderTableBlock(array $change): string
9797
// equal changes should be shown on both sides of the diff
9898
case SequenceMatcher::OP_EQ:
9999
$html .= $this->renderTableEqual($change);
100+
100101
break;
101102
// added lines only on the r side
102103
case SequenceMatcher::OP_INS:
103104
$html .= $this->renderTableInsert($change);
105+
104106
break;
105107
// show deleted lines only on the l side
106108
case SequenceMatcher::OP_DEL:
107109
$html .= $this->renderTableDelete($change);
110+
108111
break;
109112
// show modified lines on both sides
110113
case SequenceMatcher::OP_REP:
111114
$html .= $this->renderTableReplace($change);
115+
112116
break;
113117
}
114118

src/Renderer/Html/LineRenderer/Char.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ public function render(MbString $mbOld, MbString $mbNew): LineRendererInterface
2323
switch ($tag) {
2424
case SequenceMatcher::OP_DEL:
2525
$mbOld->str_enclose_i(RendererConstant::HTML_CLOSURES, $i1, $i2 - $i1);
26+
2627
break;
2728
case SequenceMatcher::OP_INS:
2829
$mbNew->str_enclose_i(RendererConstant::HTML_CLOSURES, $j1, $j2 - $j1);
30+
2931
break;
3032
case SequenceMatcher::OP_REP:
3133
$mbOld->str_enclose_i(RendererConstant::HTML_CLOSURES, $i1, $i2 - $i1);
3234
$mbNew->str_enclose_i(RendererConstant::HTML_CLOSURES, $j1, $j2 - $j1);
35+
3336
break;
3437
default:
3538
continue 2;

src/Renderer/Html/LineRenderer/Word.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ public function render(MbString $mbOld, MbString $mbNew): LineRendererInterface
2929
case SequenceMatcher::OP_DEL:
3030
$oldWords[$i1] = RendererConstant::HTML_CLOSURES[0] . $oldWords[$i1];
3131
$oldWords[$i2 - 1] .= RendererConstant::HTML_CLOSURES[1];
32+
3233
break;
3334
case SequenceMatcher::OP_INS:
3435
$newWords[$j1] = RendererConstant::HTML_CLOSURES[0] . $newWords[$j1];
3536
$newWords[$j2 - 1] .= RendererConstant::HTML_CLOSURES[1];
37+
3638
break;
3739
case SequenceMatcher::OP_REP:
3840
$oldWords[$i1] = RendererConstant::HTML_CLOSURES[0] . $oldWords[$i1];
3941
$oldWords[$i2 - 1] .= RendererConstant::HTML_CLOSURES[1];
4042
$newWords[$j1] = RendererConstant::HTML_CLOSURES[0] . $newWords[$j1];
4143
$newWords[$j2 - 1] .= RendererConstant::HTML_CLOSURES[1];
44+
4245
break;
4346
default:
4447
continue 2;

src/Renderer/Html/SideBySide.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,22 @@ protected function renderTableBlock(array $change): string
9595
// equal changes should be shown on both sides of the diff
9696
case SequenceMatcher::OP_EQ:
9797
$html .= $this->renderTableEqual($change);
98+
9899
break;
99100
// added lines only on the r side
100101
case SequenceMatcher::OP_INS:
101102
$html .= $this->renderTableInsert($change);
103+
102104
break;
103105
// show deleted lines only on the l side
104106
case SequenceMatcher::OP_DEL:
105107
$html .= $this->renderTableDelete($change);
108+
106109
break;
107110
// show modified lines on both sides
108111
case SequenceMatcher::OP_REP:
109112
$html .= $this->renderTableReplace($change);
113+
110114
break;
111115
}
112116

src/Renderer/RendererConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ final class RendererConstant
6565
// @see https://unicode-table.com/en/blocks/ideographic-symbols-and-punctuation/
6666
"\u{16FE0}-\u{16FFF}" .
6767
// hmm... these seem to be no rule
68-
" \t$,.:;!?'\"()\[\]{}%@<=>_+\-*\/~\\\\|" .
68+
" \t$,.:;!?'\"()\\[\\]{}%@<=>_+\\-*\\/~\\\\|" .
6969
' $,.:;!?’"()[]{}%@<=>_+-*/~\|' .
7070
'「」『』〈〉《》【】()()‘’“”' .
7171
'.‧・・•·¿'

tests/DiffHelperTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
/**
1111
* @coversNothing
12+
*
13+
* @internal
1214
*/
13-
class DiffHelperTest extends TestCase
15+
final class DiffHelperTest extends TestCase
1416
{
1517
/**
1618
* Data provider for DiffHelper::calculate.

tests/DifferTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
/**
1212
* @coversNothing
13+
*
14+
* @internal
1315
*/
14-
class DifferTest extends TestCase
16+
final class DifferTest extends TestCase
1517
{
1618
/**
1719
* Data provider for Differ::getGroupedOpcodes.

tests/Utility/LanguageTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
/**
1111
* @coversNothing
12+
*
13+
* @internal
1214
*/
13-
class LanguageTest extends TestCase
15+
final class LanguageTest extends TestCase
1416
{
1517
/**
1618
* The Language object.

0 commit comments

Comments
 (0)