@@ -97,7 +97,7 @@ public function testSwitchScope($testMarker, $expectedTokens, $testOpenerMarker=
97
97
public static function dataSwitchScope ()
98
98
{
99
99
return [
100
- 'switch normal syntax ' => [
100
+ 'switch normal syntax ' => [
101
101
'testMarker ' => '/* testSwitchNormalSyntax */ ' ,
102
102
'expectedTokens ' => [
103
103
'scope_opener ' => T_OPEN_CURLY_BRACKET ,
@@ -106,7 +106,7 @@ public static function dataSwitchScope()
106
106
'testOpenerMarker ' => null ,
107
107
'testCloserMarker ' => '/* testSwitchNormalSyntaxScopeCloser */ ' ,
108
108
],
109
- 'switch alternative syntax ' => [
109
+ 'switch alternative syntax ' => [
110
110
'testMarker ' => '/* testSwitchAlternativeSyntax */ ' ,
111
111
'expectedTokens ' => [
112
112
'scope_opener ' => T_COLON ,
@@ -115,7 +115,7 @@ public static function dataSwitchScope()
115
115
'testOpenerMarker ' => null ,
116
116
'testCloserMarker ' => '/* testSwitchAlternativeSyntaxScopeCloser */ ' ,
117
117
],
118
- 'switch with closure in the condition ' => [
118
+ 'switch with closure in the condition ' => [
119
119
'testMarker ' => '/* testSwitchClosureWithinCondition */ ' ,
120
120
'expectedTokens ' => [
121
121
'scope_opener ' => T_OPEN_CURLY_BRACKET ,
@@ -124,16 +124,16 @@ public static function dataSwitchScope()
124
124
'testOpenerMarker ' => '/* testSwitchClosureWithinConditionScopeOpener */ ' ,
125
125
'testCloserMarker ' => '/* testSwitchClosureWithinConditionScopeCloser */ ' ,
126
126
],
127
- 'switch with closure containing return type in the condition ' => [
127
+ 'switch alternative syntax with closure containing return type in the condition ' => [
128
128
'testMarker ' => '/* testSwitchClosureWithReturnTypeWithinCondition */ ' ,
129
129
'expectedTokens ' => [
130
- 'scope_opener ' => T_OPEN_CURLY_BRACKET ,
131
- 'scope_closer ' => T_CLOSE_CURLY_BRACKET ,
130
+ 'scope_opener ' => T_COLON ,
131
+ 'scope_closer ' => T_ENDSWITCH ,
132
132
],
133
133
'testOpenerMarker ' => '/* testSwitchClosureWithReturnTypeWithinConditionScopeOpener */ ' ,
134
134
'testCloserMarker ' => '/* testSwitchClosureWithReturnTypeWithinConditionScopeCloser */ ' ,
135
135
],
136
- 'switch with arrow function in the condition ' => [
136
+ 'switch with arrow function in the condition ' => [
137
137
'testMarker ' => '/* testSwitchArrowFunctionWithinCondition */ ' ,
138
138
'expectedTokens ' => [
139
139
'scope_opener ' => T_OPEN_CURLY_BRACKET ,
@@ -142,11 +142,11 @@ public static function dataSwitchScope()
142
142
'testOpenerMarker ' => '/* testSwitchArrowFunctionWithinConditionScopeOpener */ ' ,
143
143
'testCloserMarker ' => '/* testSwitchArrowFunctionWithinConditionScopeCloser */ ' ,
144
144
],
145
- 'switch with arrow function containing return type in the condition ' => [
145
+ 'switch alternative syntax with arrow function containing return type in the condition ' => [
146
146
'testMarker ' => '/* testSwitchArrowFunctionWithReturnTypeWithinCondition */ ' ,
147
147
'expectedTokens ' => [
148
- 'scope_opener ' => T_OPEN_CURLY_BRACKET ,
149
- 'scope_closer ' => T_CLOSE_CURLY_BRACKET ,
148
+ 'scope_opener ' => T_COLON ,
149
+ 'scope_closer ' => T_ENDSWITCH ,
150
150
],
151
151
'testOpenerMarker ' => '/* testSwitchArrowFunctionWithReturnTypeWithinConditionScopeOpener */ ' ,
152
152
'testCloserMarker ' => '/* testSwitchArrowFunctionWithReturnTypeWithinConditionScopeCloser */ ' ,
0 commit comments