@@ -256,13 +256,16 @@ public function createAllTestFiles($testManifest = null, $testsToIgnore = null)
256
256
* @throws TestFrameworkException
257
257
*/
258
258
public function throwExceptionIfDuplicateArgumentsFound (string $ fileContents , string $ fileName = '' ): void
259
- {
259
+ {
260
260
$ fileToArr = explode ("\n" , $ fileContents );
261
261
$ argumentArray = [];
262
262
$ actionGroupStart = false ;
263
263
foreach ($ fileToArr as $ fileVal ) {
264
264
$ fileVal = trim ($ fileVal );
265
- if ((str_starts_with ($ fileVal , '<actionGroup ' ) || str_starts_with ($ fileVal , '<helper ' )) && !str_ends_with ($ fileVal , '/> ' )) {
265
+ if (
266
+ (str_starts_with ($ fileVal , '<actionGroup ' ) || str_starts_with ($ fileVal , '<helper ' )) &&
267
+ !str_ends_with ($ fileVal , '/> ' )
268
+ ) {
266
269
$ actionGroupStart = true ;
267
270
continue ;
268
271
}
@@ -274,7 +277,11 @@ public function throwExceptionIfDuplicateArgumentsFound(string $fileContents, st
274
277
$ size = strpos ($ argument , ' ' , $ subtringStart ) - $ subtringStart ;
275
278
$ argumentName = substr ($ argument , $ subtringStart , $ size );
276
279
if (in_array ($ argumentName , $ argumentNameArray )) {
277
- $ err [] = sprintf ('Duplicate argument for actiongroup or helper with name: %s in test file: %s ' , $ argumentName , $ fileName );
280
+ $ err [] = sprintf (
281
+ 'Duplicate argument for actiongroup or helper with name: %s in test file: %s ' ,
282
+ $ argumentName ,
283
+ $ fileName
284
+ );
278
285
throw new TestFrameworkException (implode (PHP_EOL , $ err ));
279
286
}
280
287
$ argumentNameArray [] = $ argumentName ;
0 commit comments