Skip to content
Snippets Groups Projects
Commit 3980b1e9 authored by Klaus Purer's avatar Klaus Purer
Browse files

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

parent 3d05983b
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment