diff --git a/src/Tokenizers/Tokenizer.php b/src/Tokenizers/Tokenizer.php index e0bf22fb01..ac9aa20254 100644 --- a/src/Tokenizers/Tokenizer.php +++ b/src/Tokenizers/Tokenizer.php @@ -424,10 +424,10 @@ private function createPositionMap() $disabledSniffs = []; $additionalText = substr($commentText, 14); - if ($additionalText === false) { + if (empty($additionalText) === true) { $ignoring = ['.all' => true]; } else { - $parts = explode(',', substr($commentText, 13)); + $parts = explode(',', $additionalText); foreach ($parts as $sniffCode) { $sniffCode = trim($sniffCode); $disabledSniffs[$sniffCode] = true; @@ -459,10 +459,10 @@ private function createPositionMap() $enabledSniffs = []; $additionalText = substr($commentText, 13); - if ($additionalText === false) { + if (empty($additionalText) === true) { $ignoring = null; } else { - $parts = explode(',', substr($commentText, 13)); + $parts = explode(',', $additionalText); foreach ($parts as $sniffCode) { $sniffCode = trim($sniffCode); $enabledSniffs[$sniffCode] = true; @@ -520,10 +520,10 @@ private function createPositionMap() $ignoreRules = []; $additionalText = substr($commentText, 13); - if ($additionalText === false) { + if (empty($additionalText) === true) { $ignoreRules = ['.all' => true]; } else { - $parts = explode(',', substr($commentText, 13)); + $parts = explode(',', $additionalText); foreach ($parts as $sniffCode) { $ignoreRules[trim($sniffCode)] = true; }