@@ -712,6 +712,8 @@ public function processLongArgument($arg, $pos)
712
712
|| substr ($ arg , 0 , 7 ) === 'report- ' )
713
713
&& PHP_CODESNIFFER_CBF === false
714
714
) {
715
+ $ reports = array ();
716
+
715
717
if ($ arg [6 ] === '- ' ) {
716
718
// This is a report with file output.
717
719
$ split = strpos ($ arg , '= ' );
@@ -737,18 +739,27 @@ public function processLongArgument($arg, $pos)
737
739
}
738
740
}//end if
739
741
}//end if
742
+
743
+ $ reports [$ report ] = $ output ;
740
744
} else {
741
745
// This is a single report.
742
- $ report = substr ($ arg , 7 );
743
- $ output = null ;
746
+ if (isset ($ this ->overriddenDefaults ['reports ' ]) === true ) {
747
+ break ;
748
+ }
749
+
750
+ $ reportNames = explode (', ' , substr ($ arg , 7 ));
751
+ foreach ($ reportNames as $ report ) {
752
+ $ reports [$ report ] = null ;
753
+ }
744
754
}//end if
745
755
746
756
// Remove the default value so the CLI value overrides it.
747
757
if (isset ($ this ->overriddenDefaults ['reports ' ]) === false ) {
748
- $ this ->reports = array ();
758
+ $ this ->reports = $ reports ;
759
+ } else {
760
+ $ this ->reports = array_merge ($ this ->reports , $ reports );
749
761
}
750
762
751
- $ this ->reports [$ report ] = $ output ;
752
763
$ this ->overriddenDefaults ['reports ' ] = true ;
753
764
} else if (substr ($ arg , 0 , 9 ) === 'standard= ' ) {
754
765
$ standards = trim (substr ($ arg , 9 ));
0 commit comments