Skip to content

Commit b1b9871

Browse files
committed
Fix linting errors
1 parent a792e23 commit b1b9871

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

VariableAnalysis/Lib/Helpers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PHP_CodeSniffer\Files\File;
66
use VariableAnalysis\Lib\ScopeInfo;
7+
use VariableAnalysis\Lib\Constants;
78
use VariableAnalysis\Lib\ForLoopInfo;
89
use VariableAnalysis\Lib\EnumInfo;
910
use VariableAnalysis\Lib\ScopeType;
@@ -472,7 +473,7 @@ public static function getVariablesInsideCompact(File $phpcsFile, $stackPtr, $ar
472473
$argumentFirstToken = $tokens[$argumentPtrs[0]];
473474
if ($argumentFirstToken['code'] === T_ARRAY) {
474475
// It's an array argument, recurse.
475-
$arrayArguments = Helpers::findFunctionCallArguments($phpcsFile, $argumentPtrs[0]);
476+
$arrayArguments = self::findFunctionCallArguments($phpcsFile, $argumentPtrs[0]);
476477
$variablePositionsAndNames = array_merge($variablePositionsAndNames, self::getVariablesInsideCompact($phpcsFile, $stackPtr, $arrayArguments));
477478
continue;
478479
}

VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ protected function processCompact(File $phpcsFile, $stackPtr)
18821882
Helpers::debug("processCompact at {$stackPtr}");
18831883
$arguments = Helpers::findFunctionCallArguments($phpcsFile, $stackPtr);
18841884
$variables = Helpers::getVariablesInsideCompact($phpcsFile, $stackPtr, $arguments);
1885-
foreach ( $variables as $variable ) {
1885+
foreach ($variables as $variable) {
18861886
$currScope = Helpers::findVariableScope($phpcsFile, $stackPtr, $variable->name);
18871887
if ($currScope === null) {
18881888
continue;

0 commit comments

Comments
 (0)