File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -274,29 +274,37 @@ public static function getLinesToBeIgnored($filename, $cacheTokens = TRUE)
274274 $ firstMethod = array_shift (
275275 $ classes [$ token ->getName ()]['methods ' ]
276276 );
277+
277278 $ lastMethod = array_pop (
278279 $ classes [$ token ->getName ()]['methods ' ]
279280 );
281+
280282 if ($ lastMethod === NULL ) {
281283 $ lastMethod = $ firstMethod ;
282284 }
283285
284- for ($ i = $ token ->getLine (); $ i < $ firstMethod ['startLine ' ]; $ i ++) {
286+ for ($ i = $ token ->getLine ();
287+ $ i < $ firstMethod ['startLine ' ];
288+ $ i ++) {
285289 self ::$ ignoredLines [$ filename ][$ i ] = TRUE ;
286290 }
287- for ($ i = $ token ->getEndLine (); $ i > $ lastMethod ['endLine ' ]; $ i --) {
291+
292+ for ($ i = $ token ->getEndLine ();
293+ $ i > $ lastMethod ['endLine ' ];
294+ $ i --) {
288295 self ::$ ignoredLines [$ filename ][$ i ] = TRUE ;
289296 }
290297 }
291298 }
292299 break ;
300+
293301 case 'PHP_Token_OPEN_TAG ' :
294302 case 'PHP_Token_CLOSE_TAG ' :
295303 case 'PHP_Token_NAMESPACE ' :
296- case 'PHP_Token_USE ' :
304+ case 'PHP_Token_USE ' : {
297305 self ::$ ignoredLines [$ filename ][$ token ->getLine ()] = TRUE ;
298- break ;
299-
306+ }
307+ break ;
300308
301309 case 'PHP_Token_COMMENT ' : {
302310 $ _token = trim ($ token );
You can’t perform that action at this time.
0 commit comments