Skip to content

Commit 4040cd5

Browse files
committed
magento#142: [New Rule] No imports from static tests namespaces
1 parent 199057a commit 4040cd5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Magento2/Sniffs/Namespaces/ImportsFromTestNamespaceSniff.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515
class ImportsFromTestNamespaceSniff implements Sniff
1616
{
17-
1817
/**
1918
* @var string
2019
*/
@@ -53,7 +52,7 @@ public function process(File $phpcsFile, $stackPtr)
5352
&& $tokens[$next]['code'] !== T_SEMICOLON
5453
&& $tokens[$next]['code'] !== T_CLOSE_TAG
5554
) {
56-
$baseUse = rtrim($phpcsFile->getTokensAsString($stackPtr, ($next - $stackPtr)));
55+
$baseUse = rtrim($phpcsFile->getTokensAsString($stackPtr, ($next - $stackPtr)));
5756
$baseUse = str_replace('use \\', '', $baseUse);
5857
$closingCurly = $phpcsFile->findNext(T_CLOSE_USE_GROUP, ($next + 1));
5958
do {
@@ -64,7 +63,7 @@ public function process(File $phpcsFile, $stackPtr)
6463
$phpcsFile->addWarning($this->warningMessage, $stackPtr, $this->warningCode);
6564
return;
6665
}
67-
} while ($next != false);
66+
} while ($next !== false);
6867
}
6968
}
7069
}

0 commit comments

Comments
 (0)