Commit 3980b1e9 authored by Klaus Purer's avatar Klaus Purer
Browse files

fix(UseLeadingBackslash): variable can be false, not null (#3104477)

parent 3d05983b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ class UseLeadingBackslashSniff implements Sniff
            true
        );

        if ($startPtr !== null && $tokens[$startPtr]['code'] === T_NS_SEPARATOR) {
        if ($startPtr !== false && $tokens[$startPtr]['code'] === T_NS_SEPARATOR) {
            $error = 'When importing a class with "use", do not include a leading \\';
            $fix   = $phpcsFile->addFixableError($error, $startPtr, 'SeparatorStart');
            if ($fix === true) {