diff --git a/VariableAnalysis/Lib/Helpers.php b/VariableAnalysis/Lib/Helpers.php index 97e05389..47330fc3 100644 --- a/VariableAnalysis/Lib/Helpers.php +++ b/VariableAnalysis/Lib/Helpers.php @@ -76,25 +76,6 @@ public static function findParenthesisOwner(File $phpcsFile, $stackPtr) { return self::getIntOrNull($phpcsFile->findPrevious(Tokens::$emptyTokens, $stackPtr - 1, null, true)); } - /** - * @param File $phpcsFile - * @param (int|string)[] $conditions - * - * @return bool - */ - public static function areAnyConditionsAClosure(File $phpcsFile, array $conditions) { - // self within a closure is invalid - $tokens = $phpcsFile->getTokens(); - foreach (array_reverse($conditions, true) as $scopePtr => $scopeCode) { - // Note: have to fetch code from $tokens, T_CLOSURE isn't set for conditions codes. - if ($tokens[$scopePtr]['code'] === T_CLOSURE) { - return true; - } - } - return false; - } - - /** * @param (int|string)[] $conditions *