@@ -23,7 +23,7 @@ $colorize = false;
2323$ gracefulWarningsfalse ;
2424
2525// parameters 
26- $ params[] ;
26+ $ paramsarray () ;
2727foreach  ($ argvas  $ arg
2828    if  (substr ($ arg0 , 2 ) === '-- ' ) {
2929        $ optionsubstr ($ arg2 );
@@ -73,7 +73,7 @@ if ($root === false) {
7373        fwrite (STDERR , 'Error: Unknown error. Expecting checkstyle formatted xml input. '  ."\n\n" );
7474    }
7575    fwrite (STDERR , $ xml
76-      
76+ 
7777    exit (2 );
7878}
7979
@@ -110,7 +110,7 @@ function annotateCheck($type, $filename, $line, $message, $colorize)
110110    // newlines need to be encoded 
111111    // see https://github.com/actions/starter-workflows/issues/68#issuecomment-581479448 
112112    $ messagestr_replace ("\n" , '%0A ' , $ message
113-      
113+ 
114114    if  ($ colorize
115115        echo  "\033[ " .($ type'error '  ? '91 '  : '93 ' )."m \n" ;
116116    }
@@ -127,10 +127,10 @@ function relativePath($path)
127127
128128function  annotateType ($ type
129129{
130-     if  (in_array ($ type[ 'error ' , 'failure ' ] )) {
130+     if  (in_array ($ typearray ( 'error ' , 'failure ' ) )) {
131131        return  'error ' ;
132132    }
133-     if  (in_array ($ type[ 'info ' , 'notice ' ] )) {
133+     if  (in_array ($ typearray ( 'info ' , 'notice ' ) )) {
134134        return  'notice ' ;
135135    }
136136    return  'warning ' ;
0 commit comments