Skip to content

Commit 47b9cbb

Browse files
committed
Micro-optimize array_reverse call
1 parent d027abb commit 47b9cbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function process(File $phpcsFile, $stackPtr)
4646
return;
4747
}
4848

49-
$reversedConditions = array_reverse($tokens[$stackPtr]['conditions'], true);
49+
$conditions = $tokens[$stackPtr]['conditions'];
50+
$reversedConditions = array_reverse($conditions, true);
5051

5152
$outerFuncToken = null;
5253
foreach ($reversedConditions as $condToken => $condition) {

0 commit comments

Comments
 (0)