@@ -32,11 +32,11 @@ if ($argc === 1) {
3232$ exit = 0 ;
3333$ root = simplexml_load_string ($ xml );
3434
35- if ($ root ) {
36- foreach ($ root as $ file ) {
35+ if ($ root ) {
36+ foreach ($ root as $ file ) {
3737 $ filename = (string )$ file ['name ' ];
3838
39- foreach ($ file as $ error ) {
39+ foreach ($ file as $ error ) {
4040 $ type = (string ) $ error ['severity ' ];
4141 $ line = (string ) $ error ['line ' ];
4242 $ message = (string ) $ error ['message ' ];
@@ -55,14 +55,17 @@ exit($exit);
5555 * @param int $line
5656 * @param string $message
5757 */
58- function annotateCheck ($ type , $ filename , $ line , $ message ) {
58+ function annotateCheck ($ type , $ filename , $ line , $ message )
59+ {
5960 echo ":: {$ type } file= {$ filename },line= {$ line }:: {$ message }\n" ;
6061}
6162
62- function relativePath ($ path ) {
63+ function relativePath ($ path )
64+ {
6365 return str_replace (getcwd ().'/ ' , '' , $ path );
6466}
6567
66- function annotateType ($ type ) {
68+ function annotateType ($ type )
69+ {
6770 return in_array ($ type , ['error ' , 'failure ' ]) ? 'error ' : 'warning ' ;
6871}
0 commit comments