@@ -34,7 +34,7 @@ public function __construct(
3434 $ lineno = 0 ,
3535 $ tag = null
3636 ) {
37- $ nodes = array ( 'body ' => $ body) ;
37+ $ nodes = [ 'body ' => $ body] ;
3838 if (null !== $ count ) {
3939 $ nodes ['count ' ] = $ count ;
4040 }
@@ -45,7 +45,7 @@ public function __construct(
4545 $ nodes ['notes ' ] = $ notes ;
4646 }
4747
48- parent ::__construct ($ nodes , array () , $ lineno , $ tag );
48+ parent ::__construct ($ nodes , [] , $ lineno , $ tag );
4949 }
5050
5151 /**
@@ -70,7 +70,7 @@ public function compile(Compiler $compiler)
7070 $ message = trim ($ this ->getNode ('notes ' )->getAttribute ('data ' ));
7171
7272 // line breaks are not allowed cause we want a single line comment
73- $ message = str_replace (array ( "\n" , "\r" ) , ' ' , $ message );
73+ $ message = str_replace ([ "\n" , "\r" ] , ' ' , $ message );
7474 $ compiler ->write ("// notes: {$ message }\n" );
7575 }
7676
@@ -143,10 +143,10 @@ protected function compileString(Node $body)
143143 $ body instanceof ConstantExpression ||
144144 $ body instanceof TempNameExpression
145145 ) {
146- return array ( $ body , array ()) ;
146+ return [ $ body , []] ;
147147 }
148148
149- $ vars = array () ;
149+ $ vars = [] ;
150150 if (count ($ body )) {
151151 $ msg = '' ;
152152
@@ -171,7 +171,7 @@ protected function compileString(Node $body)
171171 $ msg = $ body ->getAttribute ('data ' );
172172 }
173173
174- return array ( new Node (array ( new ConstantExpression (trim ($ msg ), $ body ->getTemplateLine ()))) , $ vars) ;
174+ return [ new Node ([ new ConstantExpression (trim ($ msg ), $ body ->getTemplateLine ())]) , $ vars] ;
175175 }
176176
177177 /**
0 commit comments