@@ -321,60 +321,6 @@ public function fromParameters(array $parameters): Configuration
321
321
322
322
switch ($ option [0 ]) {
323
323
case '--all ' :
324
- $ this ->warnWhenOptionsConflict (
325
- $ testSuite ,
326
- '--all ' ,
327
- '--testsuite ' ,
328
- );
329
-
330
- $ this ->warnWhenOptionsConflict (
331
- $ excludeTestSuite ,
332
- '--all ' ,
333
- '--exclude-testsuite ' ,
334
- );
335
-
336
- $ this ->warnWhenOptionsConflict (
337
- $ groups ,
338
- '--all ' ,
339
- '--group ' ,
340
- );
341
-
342
- $ this ->warnWhenOptionsConflict (
343
- $ excludeGroups ,
344
- '--all ' ,
345
- '--exclude-group ' ,
346
- );
347
-
348
- $ this ->warnWhenOptionsConflict (
349
- $ testsCovering ,
350
- '--all ' ,
351
- '--covers ' ,
352
- );
353
-
354
- $ this ->warnWhenOptionsConflict (
355
- $ testsUsing ,
356
- '--all ' ,
357
- '--uses ' ,
358
- );
359
-
360
- $ this ->warnWhenOptionsConflict (
361
- $ testsRequiringPhpExtension ,
362
- '--all ' ,
363
- '--requires-php-extension ' ,
364
- );
365
-
366
- $ this ->warnWhenOptionsConflict (
367
- $ filter ,
368
- '--all ' ,
369
- '--filter ' ,
370
- );
371
-
372
- $ this ->warnWhenOptionsConflict (
373
- $ excludeFilter ,
374
- '--all ' ,
375
- '--exclude-filter ' ,
376
- );
377
-
378
324
$ all = true ;
379
325
380
326
break ;
@@ -513,45 +459,21 @@ public function fromParameters(array $parameters): Configuration
513
459
break ;
514
460
515
461
case '--filter ' :
516
- $ this ->warnWhenOptionsConflict (
517
- $ all ,
518
- '--filter ' ,
519
- '--all ' ,
520
- );
521
-
522
462
$ filter = $ option [1 ];
523
463
524
464
break ;
525
465
526
466
case '--exclude-filter ' :
527
- $ this ->warnWhenOptionsConflict (
528
- $ all ,
529
- '--exclude-filter ' ,
530
- '--all ' ,
531
- );
532
-
533
467
$ excludeFilter = $ option [1 ];
534
468
535
469
break ;
536
470
537
471
case '--testsuite ' :
538
- $ this ->warnWhenOptionsConflict (
539
- $ all ,
540
- '--testsuite ' ,
541
- '--all ' ,
542
- );
543
-
544
472
$ testSuite = $ option [1 ];
545
473
546
474
break ;
547
475
548
476
case '--exclude-testsuite ' :
549
- $ this ->warnWhenOptionsConflict (
550
- $ all ,
551
- '--exclude-testsuite ' ,
552
- '--all ' ,
553
- );
554
-
555
477
$ excludeTestSuite = $ option [1 ];
556
478
557
479
break ;
@@ -590,12 +512,6 @@ public function fromParameters(array $parameters): Configuration
590
512
break ;
591
513
592
514
case '--group ' :
593
- $ this ->warnWhenOptionsConflict (
594
- $ all ,
595
- '--group ' ,
596
- '--all ' ,
597
- );
598
-
599
515
if ($ groups === null ) {
600
516
$ groups = [];
601
517
}
@@ -607,12 +523,6 @@ public function fromParameters(array $parameters): Configuration
607
523
break ;
608
524
609
525
case '--exclude-group ' :
610
- $ this ->warnWhenOptionsConflict (
611
- $ all ,
612
- '--exclude-group ' ,
613
- '--all ' ,
614
- );
615
-
616
526
if ($ excludeGroups === null ) {
617
527
$ excludeGroups = [];
618
528
}
@@ -624,12 +534,6 @@ public function fromParameters(array $parameters): Configuration
624
534
break ;
625
535
626
536
case '--covers ' :
627
- $ this ->warnWhenOptionsConflict (
628
- $ all ,
629
- '--covers ' ,
630
- '--all ' ,
631
- );
632
-
633
537
if ($ testsCovering === null ) {
634
538
$ testsCovering = [];
635
539
}
@@ -641,12 +545,6 @@ public function fromParameters(array $parameters): Configuration
641
545
break ;
642
546
643
547
case '--uses ' :
644
- $ this ->warnWhenOptionsConflict (
645
- $ all ,
646
- '--uses ' ,
647
- '--all ' ,
648
- );
649
-
650
548
if ($ testsUsing === null ) {
651
549
$ testsUsing = [];
652
550
}
@@ -658,12 +556,6 @@ public function fromParameters(array $parameters): Configuration
658
556
break ;
659
557
660
558
case '--requires-php-extension ' :
661
- $ this ->warnWhenOptionsConflict (
662
- $ all ,
663
- '--requires-php-extension ' ,
664
- '--all ' ,
665
- );
666
-
667
559
if ($ testsRequiringPhpExtension === null ) {
668
560
$ testsRequiringPhpExtension = [];
669
561
}
@@ -1508,10 +1400,9 @@ private function markProcessed(string $option): void
1508
1400
}
1509
1401
1510
1402
/**
1511
- * @param null|array<non-empty-string>|bool|string $current
1512
- * @param non-empty-string $option
1403
+ * @param non-empty-string $option
1513
1404
*/
1514
- private function warnWhenOptionsConflict (null | array | bool | string $ current , string $ option , string $ opposite ): void
1405
+ private function warnWhenOptionsConflict (? bool $ current , string $ option , string $ opposite ): void
1515
1406
{
1516
1407
if ($ current === null ) {
1517
1408
return ;
0 commit comments