@@ -92,7 +92,7 @@ protected function scan()
9292 $ MACRO_DOC_COMMENT_VALIDATE = function () use (&$ docCommentIndex ) {
9393 static $ validTrailingTokens = null ;
9494 if ($ validTrailingTokens === null ) {
95- $ validTrailingTokens = array ( T_WHITESPACE , T_FINAL , T_ABSTRACT , T_INTERFACE , T_CLASS , T_FUNCTION ) ;
95+ $ validTrailingTokens = [ T_WHITESPACE , T_FINAL , T_ABSTRACT , T_INTERFACE , T_CLASS , T_FUNCTION ] ;
9696 }
9797 if ($ docCommentIndex !== false && !in_array ($ this ->tokenType , $ validTrailingTokens )) {
9898 $ docCommentIndex = false ;
@@ -134,14 +134,14 @@ protected function scan()
134134
135135 case T_NAMESPACE :
136136
137- $ infos [$ infoIndex ] = array (
137+ $ infos [$ infoIndex ] = [
138138 'type ' => 'namespace ' ,
139139 'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
140140 'tokenEnd ' => null ,
141141 'lineStart ' => $ token [2 ],
142142 'lineEnd ' => null ,
143143 'namespace ' => null ,
144- ) ;
144+ ] ;
145145
146146 // start processing with next token
147147 if ($ MACRO_TOKEN_ADVANCE () === false ) {
@@ -179,16 +179,15 @@ protected function scan()
179179
180180 case T_USE :
181181
182- $ infos [$ infoIndex ] = array (
182+ $ infos [$ infoIndex ] = [
183183 'type ' => 'use ' ,
184184 'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
185185 'tokenEnd ' => null ,
186186 'lineStart ' => $ tokens [$ tokenIndex ][2 ],
187187 'lineEnd ' => null ,
188188 'namespace ' => $ namespace ,
189- 'statements ' => array (0 => array ('use ' => null ,
190- 'as ' => null )),
191- );
189+ 'statements ' => [0 => ['use ' => null , 'as ' => null ]],
190+ ];
192191
193192 $ useStatementIndex = 0 ;
194193 $ useAsContext = false ;
@@ -206,8 +205,7 @@ protected function scan()
206205 } elseif ($ tokenContent === ', ' ) {
207206 $ useAsContext = false ;
208207 $ useStatementIndex ++;
209- $ infos [$ infoIndex ]['statements ' ][$ useStatementIndex ] = array ('use ' => null ,
210- 'as ' => null );
208+ $ infos [$ infoIndex ]['statements ' ][$ useStatementIndex ] = ['use ' => null , 'as ' => null ];
211209 }
212210 }
213211
@@ -246,22 +244,22 @@ protected function scan()
246244 case T_REQUIRE_ONCE :
247245
248246 // Static for performance
249- static $ includeTypes = array (
247+ static $ includeTypes = [
250248 T_INCLUDE => 'include ' ,
251249 T_INCLUDE_ONCE => 'include_once ' ,
252250 T_REQUIRE => 'require ' ,
253251 T_REQUIRE_ONCE => 'require_once '
254- ) ;
252+ ] ;
255253
256- $ infos [$ infoIndex ] = array (
254+ $ infos [$ infoIndex ] = [
257255 'type ' => 'include ' ,
258256 'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
259257 'tokenEnd ' => null ,
260258 'lineStart ' => $ tokens [$ tokenIndex ][2 ],
261259 'lineEnd ' => null ,
262260 'includeType ' => $ includeTypes [$ tokens [$ tokenIndex ][0 ]],
263261 'path ' => '' ,
264- ) ;
262+ ] ;
265263
266264 // start processing with next token
267265 if ($ MACRO_TOKEN_ADVANCE () === false ) {
@@ -296,7 +294,7 @@ protected function scan()
296294 case T_INTERFACE :
297295 case T_TRAIT :
298296
299- $ infos [$ infoIndex ] = array (
297+ $ infos [$ infoIndex ] = [
300298 'type ' => ($ this ->tokenType === T_FUNCTION ) ? 'function ' : 'class ' ,
301299 'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
302300 'tokenEnd ' => null ,
@@ -306,7 +304,7 @@ protected function scan()
306304 'uses ' => $ this ->getUsesNoScan ($ namespace ),
307305 'name ' => null ,
308306 'shortName ' => null ,
309- ) ;
307+ ] ;
310308
311309 $ classBraceCount = 0 ;
312310
0 commit comments