Skip to content

Commit 31335a0

Browse files
committed
AC-3520: Removed unneeded if
1 parent 24dc367 commit 31335a0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Magento2/Sniffs/Less/ColonSpacingSniff.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ private function needValidateSpaces(File $phpcsFile, $stackPtr, $tokens)
6161
}
6262

6363
// Avoid false positives when parsing pseudo-classes
64-
if ($tokens[$stackPtr]['code'] === T_COLON) {
65-
$next = $phpcsFile->findNext([T_SEMICOLON, T_OPEN_CURLY_BRACKET], $stackPtr + 1);
66-
if ($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET) {
67-
return false;
68-
}
64+
$next = $phpcsFile->findNext([T_SEMICOLON, T_OPEN_CURLY_BRACKET], $stackPtr + 1);
65+
if ($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET) {
66+
return false;
6967
}
7068

7169
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);

0 commit comments

Comments
 (0)