@@ -113,6 +113,15 @@ public static function dataNormalParentheses()
113
113
'parens without owner in short ternary ' => [
114
114
'testMarker ' => '/* testParensNoOwnerInShortTernary */ ' ,
115
115
],
116
+ 'parens without owner in ternary then (fn call in inline then) ' => [
117
+ 'testMarker ' => '/* testFnCallParensNoOwnerInTernaryA */ ' ,
118
+ ],
119
+ 'parens without owner in ternary then (fn call in inline else) ' => [
120
+ 'testMarker ' => '/* testFnCallParensNoOwnerInTernaryB */ ' ,
121
+ ],
122
+ 'parens without owner in short ternary (fn call) ' => [
123
+ 'testMarker ' => '/* testPFnCallarensNoOwnerInShortTernary */ ' ,
124
+ ],
116
125
'parens with owner: function; & in default value ' => [
117
126
'testMarker ' => '/* testParensOwnerFunctionAmpersandInDefaultValue */ ' ,
118
127
],
@@ -158,6 +167,69 @@ public static function dataNormalParentheses()
158
167
'parens without owner, function call, named param + bitwise and ' => [
159
168
'testMarker ' => '/* testParensNoOwnerFunctionCallWithDNFLookALikeNamedParamIntersect */ ' ,
160
169
],
170
+ 'parens without owner, function call in named param ' => [
171
+ 'testMarker ' => '/* testParensNoOwnerFunctionCallInNamedParam */ ' ,
172
+ ],
173
+ 'parens with owner: fn; in named param ' => [
174
+ 'testMarker ' => '/* testParensOwnerArrowFunctionInNamedParam */ ' ,
175
+ ],
176
+ 'parens without owner, function call in named param arrow return ' => [
177
+ 'testMarker ' => '/* testParensNoOwnerFunctionCallInArrowFnReturn */ ' ,
178
+ ],
179
+ 'parens with owner: closure; in named param ' => [
180
+ 'testMarker ' => '/* testParensOwnerClosureInNamedParam */ ' ,
181
+ ],
182
+ 'parens without owner, function call, named param closure return ' => [
183
+ 'testMarker ' => '/* testParensNoOwnerFunctionCallInClosureReturn */ ' ,
184
+ ],
185
+ 'parens with owner: switch condition ' => [
186
+ 'testMarker ' => '/* testSwitchControlStructureCondition */ ' ,
187
+ ],
188
+ 'parens without owner in switch-case condition ' => [
189
+ 'testMarker ' => '/* testFunctionCallInSwitchCaseCondition */ ' ,
190
+ ],
191
+ 'parens without owner in switch-case body ' => [
192
+ 'testMarker ' => '/* testFunctionCallInSwitchCaseBody */ ' ,
193
+ ],
194
+ 'parens without owner in switch-default body ' => [
195
+ 'testMarker ' => '/* testFunctionCallInSwitchDefaultBody */ ' ,
196
+ ],
197
+ 'parens with owner: if condition, alternative syntax ' => [
198
+ 'testMarker ' => '/* testIfAlternativeSyntaxCondition */ ' ,
199
+ ],
200
+ 'parens without owner in if body, alternative syntax ' => [
201
+ 'testMarker ' => '/* testFunctionCallInIfBody */ ' ,
202
+ ],
203
+ 'parens with owner: elseif condition, alternative syntax ' => [
204
+ 'testMarker ' => '/* testElseIfAlternativeSyntaxCondition */ ' ,
205
+ ],
206
+ 'parens without owner in elseif body, alternative syntax ' => [
207
+ 'testMarker ' => '/* testFunctionCallInElseIfBody */ ' ,
208
+ ],
209
+ 'parens without owner in else body, alternative syntax ' => [
210
+ 'testMarker ' => '/* testFunctionCallInElseBody */ ' ,
211
+ ],
212
+ 'parens without owner in goto body ' => [
213
+ 'testMarker ' => '/* testFunctionCallInGotoBody */ ' ,
214
+ ],
215
+ 'parens with owner: while condition, alternative syntax ' => [
216
+ 'testMarker ' => '/* testWhileAlternativeSyntaxCondition */ ' ,
217
+ ],
218
+ 'parens without owner in while body, alternative syntax ' => [
219
+ 'testMarker ' => '/* testFunctionCallInWhileBody */ ' ,
220
+ ],
221
+ 'parens with owner: for condition, alternative syntax ' => [
222
+ 'testMarker ' => '/* testForAlternativeSyntaxCondition */ ' ,
223
+ ],
224
+ 'parens without owner in for body, alternative syntax ' => [
225
+ 'testMarker ' => '/* testFunctionCallInForBody */ ' ,
226
+ ],
227
+ 'parens with owner: foreach condition, alternative syntax ' => [
228
+ 'testMarker ' => '/* testForEachAlternativeSyntaxCondition */ ' ,
229
+ ],
230
+ 'parens without owner in foreach body, alternative syntax ' => [
231
+ 'testMarker ' => '/* testFunctionCallInForeachBody */ ' ,
232
+ ],
161
233
162
234
'parens without owner in OO const default value ' => [
163
235
'testMarker ' => '/* testParensNoOwnerOOConstDefaultValue */ ' ,
@@ -193,33 +265,6 @@ public static function dataNormalParentheses()
193
265
'parens without owner in arrow function return expression ' => [
194
266
'testMarker ' => '/* testParensNoOwnerInArrowReturnExpression */ ' ,
195
267
],
196
- 'parens with owner: switch condition ' => [
197
- 'testMarker ' => '/* testSwitchControlStructureCondition */ ' ,
198
- ],
199
- 'parens without owner in switch-case condition ' => [
200
- 'testMarker ' => '/* testFunctionCallInSwitchCaseCondition */ ' ,
201
- ],
202
- 'parens without owner in switch-case body ' => [
203
- 'testMarker ' => '/* testFunctionCallInSwitchCaseBody */ ' ,
204
- ],
205
- 'parens without owner in switch-default body ' => [
206
- 'testMarker ' => '/* testFunctionCallInSwitchDefaultBody */ ' ,
207
- ],
208
- 'parens with owner: if condition, alternative syntax ' => [
209
- 'testMarker ' => '/* testIfAlternativeSyntaxCondition */ ' ,
210
- ],
211
- 'parens without owner in if body, alternative syntax ' => [
212
- 'testMarker ' => '/* testFunctionCallInIfBody */ ' ,
213
- ],
214
- 'parens with owner: elseif condition, alternative syntax ' => [
215
- 'testMarker ' => '/* testElseIfAlternativeSyntaxCondition */ ' ,
216
- ],
217
- 'parens without owner in elseif body, alternative syntax ' => [
218
- 'testMarker ' => '/* testFunctionCallInElseIfBody */ ' ,
219
- ],
220
- 'parens without owner in goto body ' => [
221
- 'testMarker ' => '/* testFunctionCallInGotoBody */ ' ,
222
- ],
223
268
];
224
269
225
270
}//end dataNormalParentheses()
@@ -340,6 +385,13 @@ public function testDNFTypeParentheses($testMarker)
340
385
public static function dataDNFTypeParentheses ()
341
386
{
342
387
return [
388
+ 'arrow function return type: in named parameter ' => [
389
+ 'testMarker ' => '/* testDNFTypeArrowFnReturnInNamedParam */ ' ,
390
+ ],
391
+ 'closure return type: in named parameter ' => [
392
+ 'testMarker ' => '/* testDNFTypeClosureReturnInNamedParam */ ' ,
393
+ ],
394
+
343
395
'OO const type: unqualified classes ' => [
344
396
'testMarker ' => '/* testDNFTypeOOConstUnqualifiedClasses */ ' ,
345
397
],
0 commit comments