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 05ce3d0aef
commit fb746bf39d
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -84,10 +84,12 @@ trait ClassnameCheckerTrait
{
$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;
}