@@ -92,7 +92,7 @@ protected function scan()
92
92
$ MACRO_DOC_COMMENT_VALIDATE = function () use (&$ docCommentIndex ) {
93
93
static $ validTrailingTokens = null ;
94
94
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 ] ;
96
96
}
97
97
if ($ docCommentIndex !== false && !in_array ($ this ->tokenType , $ validTrailingTokens )) {
98
98
$ docCommentIndex = false ;
@@ -134,14 +134,14 @@ protected function scan()
134
134
135
135
case T_NAMESPACE :
136
136
137
- $ infos [$ infoIndex ] = array (
137
+ $ infos [$ infoIndex ] = [
138
138
'type ' => 'namespace ' ,
139
139
'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
140
140
'tokenEnd ' => null ,
141
141
'lineStart ' => $ token [2 ],
142
142
'lineEnd ' => null ,
143
143
'namespace ' => null ,
144
- ) ;
144
+ ] ;
145
145
146
146
// start processing with next token
147
147
if ($ MACRO_TOKEN_ADVANCE () === false ) {
@@ -179,16 +179,15 @@ protected function scan()
179
179
180
180
case T_USE :
181
181
182
- $ infos [$ infoIndex ] = array (
182
+ $ infos [$ infoIndex ] = [
183
183
'type ' => 'use ' ,
184
184
'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
185
185
'tokenEnd ' => null ,
186
186
'lineStart ' => $ tokens [$ tokenIndex ][2 ],
187
187
'lineEnd ' => null ,
188
188
'namespace ' => $ namespace ,
189
- 'statements ' => array (0 => array ('use ' => null ,
190
- 'as ' => null )),
191
- );
189
+ 'statements ' => [0 => ['use ' => null , 'as ' => null ]],
190
+ ];
192
191
193
192
$ useStatementIndex = 0 ;
194
193
$ useAsContext = false ;
@@ -206,8 +205,7 @@ protected function scan()
206
205
} elseif ($ tokenContent === ', ' ) {
207
206
$ useAsContext = false ;
208
207
$ useStatementIndex ++;
209
- $ infos [$ infoIndex ]['statements ' ][$ useStatementIndex ] = array ('use ' => null ,
210
- 'as ' => null );
208
+ $ infos [$ infoIndex ]['statements ' ][$ useStatementIndex ] = ['use ' => null , 'as ' => null ];
211
209
}
212
210
}
213
211
@@ -246,22 +244,22 @@ protected function scan()
246
244
case T_REQUIRE_ONCE :
247
245
248
246
// Static for performance
249
- static $ includeTypes = array (
247
+ static $ includeTypes = [
250
248
T_INCLUDE => 'include ' ,
251
249
T_INCLUDE_ONCE => 'include_once ' ,
252
250
T_REQUIRE => 'require ' ,
253
251
T_REQUIRE_ONCE => 'require_once '
254
- ) ;
252
+ ] ;
255
253
256
- $ infos [$ infoIndex ] = array (
254
+ $ infos [$ infoIndex ] = [
257
255
'type ' => 'include ' ,
258
256
'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
259
257
'tokenEnd ' => null ,
260
258
'lineStart ' => $ tokens [$ tokenIndex ][2 ],
261
259
'lineEnd ' => null ,
262
260
'includeType ' => $ includeTypes [$ tokens [$ tokenIndex ][0 ]],
263
261
'path ' => '' ,
264
- ) ;
262
+ ] ;
265
263
266
264
// start processing with next token
267
265
if ($ MACRO_TOKEN_ADVANCE () === false ) {
@@ -296,7 +294,7 @@ protected function scan()
296
294
case T_INTERFACE :
297
295
case T_TRAIT :
298
296
299
- $ infos [$ infoIndex ] = array (
297
+ $ infos [$ infoIndex ] = [
300
298
'type ' => ($ this ->tokenType === T_FUNCTION ) ? 'function ' : 'class ' ,
301
299
'tokenStart ' => $ MACRO_TOKEN_LOGICAL_START_INDEX (),
302
300
'tokenEnd ' => null ,
@@ -306,7 +304,7 @@ protected function scan()
306
304
'uses ' => $ this ->getUsesNoScan ($ namespace ),
307
305
'name ' => null ,
308
306
'shortName ' => null ,
309
- ) ;
307
+ ] ;
310
308
311
309
$ classBraceCount = 0 ;
312
310
0 commit comments