Skip to content

Commit

Permalink
Revert "Cleanup"
Browse files Browse the repository at this point in the history
This reverts commit d0d2417.
  • Loading branch information
kukulich committed Aug 24, 2018
1 parent 8053559 commit 51be382
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -159,15 +159,17 @@ private function isInSameScope(File $phpcsFile, int $parameterPointer, int $poin
$tokens = $phpcsFile->getTokens();

$functionScopeLevel = $tokens[$parameterPointer]['level'];
$isInSameScope = false;
foreach (array_reverse($tokens[$pointer]['conditions'], true) as $conditionPointer => $conditionTokenCode) {
if (!in_array($conditionTokenCode, TokenHelper::$functionTokenCodes, true)) {
continue;
}

return $tokens[$conditionPointer]['level'] === $functionScopeLevel;
$isInSameScope = $tokens[$conditionPointer]['level'] === $functionScopeLevel;
break;
}

return false;
return $isInSameScope;
}

private function getSniffName(string $sniffName): string
Expand Down

0 comments on commit 51be382

Please sign in to comment.