getTokens(); $tokenCode = $tokens[$stackPtr]['code']; $tokenContent = $tokens[$stackPtr]['content']; $nextToken = $tokens[$stackPtr + 1]; if (T_LNUMBER === $tokenCode && "0" === $tokenContent && T_STRING === $nextToken['code'] && in_array($nextToken['content'], $this->units) ) { $phpcsFile->addError('Units specified for "0" value', $stackPtr, 'ZeroUnitFound'); } if ((T_DNUMBER === $tokenCode) && 0 === strpos($tokenContent, "0") && ((float)$tokenContent < 1) ) { $phpcsFile->addError('Values starts from "0"', $stackPtr, 'ZeroUnitFound'); } } }