@@ -284,8 +284,9 @@ public function process(File $phpcsFile, $stackPtr)
284
284
if (isset ($ tokens [$ parenCloser ]['nested_parenthesis ' ]) === true
285
285
&& empty ($ tokens [$ parenCloser ]['nested_parenthesis ' ]) === false
286
286
) {
287
- end ($ tokens [$ parenCloser ]['nested_parenthesis ' ]);
288
- $ parens = key ($ tokens [$ parenCloser ]['nested_parenthesis ' ]);
287
+ $ parens = $ tokens [$ parenCloser ]['nested_parenthesis ' ];
288
+ end ($ parens );
289
+ $ parens = key ($ parens );
289
290
if ($ this ->debug === true ) {
290
291
$ line = $ tokens [$ parens ]['line ' ];
291
292
echo "\t* token has nested parenthesis $ parens on line $ line * " .PHP_EOL ;
@@ -296,8 +297,9 @@ public function process(File $phpcsFile, $stackPtr)
296
297
if (isset ($ tokens [$ parenCloser ]['conditions ' ]) === true
297
298
&& empty ($ tokens [$ parenCloser ]['conditions ' ]) === false
298
299
) {
299
- end ($ tokens [$ parenCloser ]['conditions ' ]);
300
- $ condition = key ($ tokens [$ parenCloser ]['conditions ' ]);
300
+ $ condition = $ tokens [$ parenCloser ]['conditions ' ];
301
+ end ($ condition );
302
+ $ condition = key ($ condition );
301
303
if ($ this ->debug === true ) {
302
304
$ line = $ tokens [$ condition ]['line ' ];
303
305
$ type = $ tokens [$ condition ]['type ' ];
@@ -557,8 +559,9 @@ public function process(File $phpcsFile, $stackPtr)
557
559
&& $ tokens [$ checkToken ]['scope_opener ' ] === $ checkToken ))
558
560
) {
559
561
if (empty ($ tokens [$ checkToken ]['conditions ' ]) === false ) {
560
- end ($ tokens [$ checkToken ]['conditions ' ]);
561
- $ condition = key ($ tokens [$ checkToken ]['conditions ' ]);
562
+ $ condition = $ tokens [$ checkToken ]['conditions ' ];
563
+ end ($ condition );
564
+ $ condition = key ($ condition );
562
565
} else {
563
566
$ condition = $ tokens [$ checkToken ]['scope_condition ' ];
564
567
}
@@ -699,8 +702,9 @@ public function process(File $phpcsFile, $stackPtr)
699
702
if (isset ($ tokens [$ scopeCloser ]['nested_parenthesis ' ]) === true
700
703
&& empty ($ tokens [$ scopeCloser ]['nested_parenthesis ' ]) === false
701
704
) {
702
- end ($ tokens [$ scopeCloser ]['nested_parenthesis ' ]);
703
- $ parens = key ($ tokens [$ scopeCloser ]['nested_parenthesis ' ]);
705
+ $ parens = $ tokens [$ scopeCloser ]['nested_parenthesis ' ];
706
+ end ($ parens );
707
+ $ parens = key ($ parens );
704
708
if ($ this ->debug === true ) {
705
709
$ line = $ tokens [$ parens ]['line ' ];
706
710
echo "\t* token has nested parenthesis $ parens on line $ line * " .PHP_EOL ;
@@ -711,8 +715,9 @@ public function process(File $phpcsFile, $stackPtr)
711
715
if (isset ($ tokens [$ scopeCloser ]['conditions ' ]) === true
712
716
&& empty ($ tokens [$ scopeCloser ]['conditions ' ]) === false
713
717
) {
714
- end ($ tokens [$ scopeCloser ]['conditions ' ]);
715
- $ condition = key ($ tokens [$ scopeCloser ]['conditions ' ]);
718
+ $ condition = $ tokens [$ scopeCloser ]['conditions ' ];
719
+ end ($ condition );
720
+ $ condition = key ($ condition );
716
721
if ($ this ->debug === true ) {
717
722
$ line = $ tokens [$ condition ]['line ' ];
718
723
$ type = $ tokens [$ condition ]['type ' ];
@@ -1227,8 +1232,9 @@ public function process(File $phpcsFile, $stackPtr)
1227
1232
if (isset ($ tokens [$ i ]['nested_parenthesis ' ]) === true
1228
1233
&& empty ($ tokens [$ i ]['nested_parenthesis ' ]) === false
1229
1234
) {
1230
- end ($ tokens [$ i ]['nested_parenthesis ' ]);
1231
- $ parens = key ($ tokens [$ i ]['nested_parenthesis ' ]);
1235
+ $ parens = $ tokens [$ i ]['nested_parenthesis ' ];
1236
+ end ($ parens );
1237
+ $ parens = key ($ parens );
1232
1238
if ($ this ->debug === true ) {
1233
1239
$ line = $ tokens [$ parens ]['line ' ];
1234
1240
echo "\t* token has nested parenthesis $ parens on line $ line * " .PHP_EOL ;
@@ -1239,8 +1245,9 @@ public function process(File $phpcsFile, $stackPtr)
1239
1245
if (isset ($ tokens [$ i ]['conditions ' ]) === true
1240
1246
&& empty ($ tokens [$ i ]['conditions ' ]) === false
1241
1247
) {
1242
- end ($ tokens [$ i ]['conditions ' ]);
1243
- $ condition = key ($ tokens [$ i ]['conditions ' ]);
1248
+ $ condition = $ tokens [$ i ]['conditions ' ];
1249
+ end ($ condition );
1250
+ $ condition = key ($ condition );
1244
1251
if ($ this ->debug === true ) {
1245
1252
$ line = $ tokens [$ condition ]['line ' ];
1246
1253
$ type = $ tokens [$ condition ]['type ' ];
0 commit comments