Skip to content

Commit cf51568

Browse files
minor #20364 CS: apply rules (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #20364). Discussion ---------- CS: apply rules | Q | A | | --- | --- | | Branch? | 2.7 | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no | | Tests pass? | n/a | | Fixed tickets | - | | License | MIT | | Doc PR | - | Commits ------- 22d4e15 CS: apply rules
2 parents 6e4a258 + 02ca717 commit cf51568

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Tests/ParserTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ public function testObjectSupportDisabledButNoExceptions($input)
444444

445445
public function testObjectForMapEnabledWithMapping()
446446
{
447-
$yaml = <<<EOF
447+
$yaml = <<<'EOF'
448448
foo:
449449
fiz: [cat]
450450
EOF;
@@ -581,7 +581,7 @@ public function testSequenceInAMapping()
581581

582582
public function testSequenceInMappingStartedBySingleDashLine()
583583
{
584-
$yaml = <<<EOT
584+
$yaml = <<<'EOT'
585585
a:
586586
-
587587
b:
@@ -609,7 +609,7 @@ public function testSequenceInMappingStartedBySingleDashLine()
609609

610610
public function testSequenceFollowedByCommentEmbeddedInMapping()
611611
{
612-
$yaml = <<<EOT
612+
$yaml = <<<'EOT'
613613
a:
614614
b:
615615
- c
@@ -645,7 +645,7 @@ public function testMappingInASequence()
645645
*/
646646
public function testScalarInSequence()
647647
{
648-
Yaml::parse(<<<EOF
648+
Yaml::parse(<<<'EOF'
649649
foo:
650650
- bar
651651
"missing colon"
@@ -666,7 +666,7 @@ public function testScalarInSequence()
666666
*/
667667
public function testMappingDuplicateKeyBlock()
668668
{
669-
$input = <<<EOD
669+
$input = <<<'EOD'
670670
parent:
671671
child: first
672672
child: duplicate
@@ -684,7 +684,7 @@ public function testMappingDuplicateKeyBlock()
684684

685685
public function testMappingDuplicateKeyFlow()
686686
{
687-
$input = <<<EOD
687+
$input = <<<'EOD'
688688
parent: { child: first, child: duplicate }
689689
parent: { child: duplicate, child: duplicate }
690690
EOD;
@@ -968,7 +968,7 @@ public function getCommentLikeStringInScalarBlockData()
968968
);
969969
$tests[] = array($yaml, $expected);
970970

971-
$yaml = <<<EOT
971+
$yaml = <<<'EOT'
972972
foo:
973973
bar:
974974
scalar-block: >
@@ -1011,7 +1011,7 @@ public function getCommentLikeStringInScalarBlockData()
10111011

10121012
public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks()
10131013
{
1014-
$yaml = <<<EOT
1014+
$yaml = <<<'EOT'
10151015
test: >
10161016
<h2>A heading</h2>
10171017
@@ -1023,7 +1023,7 @@ public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks()
10231023

10241024
$this->assertSame(
10251025
array(
1026-
'test' => <<<EOT
1026+
'test' => <<<'EOT'
10271027
<h2>A heading</h2>
10281028
<ul> <li>a list</li> <li>may be a good example</li> </ul>
10291029
EOT
@@ -1035,7 +1035,7 @@ public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks()
10351035

10361036
public function testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks()
10371037
{
1038-
$yaml = <<<EOT
1038+
$yaml = <<<'EOT'
10391039
test: >
10401040
<h2>A heading</h2>
10411041
@@ -1047,7 +1047,7 @@ public function testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks()
10471047

10481048
$this->assertSame(
10491049
array(
1050-
'test' => <<<EOT
1050+
'test' => <<<'EOT'
10511051
<h2>A heading</h2>
10521052
<ul>
10531053
<li>a list</li>
@@ -1080,7 +1080,7 @@ public function parserThrowsExceptionWithCorrectLineNumberProvider()
10801080
return array(
10811081
array(
10821082
4,
1083-
<<<YAML
1083+
<<<'YAML'
10841084
foo:
10851085
-
10861086
# bar
@@ -1089,7 +1089,7 @@ public function parserThrowsExceptionWithCorrectLineNumberProvider()
10891089
),
10901090
array(
10911091
5,
1092-
<<<YAML
1092+
<<<'YAML'
10931093
foo:
10941094
-
10951095
# bar
@@ -1099,7 +1099,7 @@ public function parserThrowsExceptionWithCorrectLineNumberProvider()
10991099
),
11001100
array(
11011101
8,
1102-
<<<YAML
1102+
<<<'YAML'
11031103
foo:
11041104
-
11051105
# foobar
@@ -1112,7 +1112,7 @@ public function parserThrowsExceptionWithCorrectLineNumberProvider()
11121112
),
11131113
array(
11141114
10,
1115-
<<<YAML
1115+
<<<'YAML'
11161116
foo:
11171117
-
11181118
# foobar

Unescaper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function unescapeDoubleQuotedString($value)
7373
*/
7474
public function unescapeCharacter($value)
7575
{
76-
switch ($value{1}) {
76+
switch ($value[1]) {
7777
case '0':
7878
return "\x0";
7979
case 'a':

0 commit comments

Comments
 (0)