TASK: According to PR, use else instead of default

This commit is contained in:
Daniel Siepmann 2017-03-23 08:41:06 +01:00
parent 0d985ef42a
commit f91d3240e5
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -100,10 +100,12 @@ abstract class AbstractClassnameChecker implements PhpCsSniff
{
$tokens = $phpcsFile->getTokens();
$classnamePosition = $phpcsFile->findNext(T_STRING, $stackPtr);
if ($this->shouldLookBefore()) {
$classnamePosition = $phpcsFile->findPrevious(T_STRING, $stackPtr);
} else {
$classnamePosition = $phpcsFile->findNext(T_STRING, $stackPtr);
}
if ($classnamePosition === false) {
return;
}