Skip to content

Commit 75dbacb

Browse files
committed
Remove unnecessary markers and restore one that shouldn't have been removed
1 parent 9b47eeb commit 75dbacb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/* testSwitchNormalSyntax */
4-
switch ($value) /* testSwitchNormalSyntaxScopeOpener */ {
4+
switch ($value) {
55
case 1:
66
echo 'one';
77
break;
@@ -13,7 +13,8 @@ switch ($value) /* testSwitchNormalSyntaxScopeOpener */ {
1313

1414
// Test for https://github.com/squizlabs/PHP_CodeSniffer/issues/497
1515
/* testSwitchAlternativeSyntax */
16-
switch ($value) /* testSwitchAlternativeSyntaxScopeOpener */ :
16+
switch ($value) :
17+
/* testSwitchAlternativeSyntaxEnsureTestWillNotPickUpWrongColon */
1718
case 1:
1819
echo 'one';
1920
break;

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static function dataSwitchScope()
103103
'scope_opener' => T_OPEN_CURLY_BRACKET,
104104
'scope_closer' => T_CLOSE_CURLY_BRACKET,
105105
],
106-
'testOpenerMarker' => '/* testSwitchNormalSyntaxScopeOpener */',
106+
'testOpenerMarker' => null,
107107
'testCloserMarker' => '/* testSwitchNormalSyntaxScopeCloser */',
108108
],
109109
'switch alternative syntax' => [
@@ -112,7 +112,7 @@ public static function dataSwitchScope()
112112
'scope_opener' => T_COLON,
113113
'scope_closer' => T_ENDSWITCH,
114114
],
115-
'testOpenerMarker' => '/* testSwitchAlternativeSyntaxScopeOpener */',
115+
'testOpenerMarker' => null,
116116
'testCloserMarker' => '/* testSwitchAlternativeSyntaxScopeCloser */',
117117
],
118118
'switch with closure in the condition' => [

0 commit comments

Comments
 (0)