Chris@0: getTokens(); Chris@0: // Get the second argument passed to watchdog(). Chris@0: $argument = $this->getArgument(2); Chris@0: if ($argument === false) { Chris@0: $error = 'The second argument to watchdog() is missing'; Chris@0: $phpcsFile->addError($error, $stackPtr, 'WatchdogArgument'); Chris@0: return; Chris@0: } Chris@0: Chris@0: if ($tokens[$argument['start']]['code'] === T_STRING Chris@0: && $tokens[$argument['start']]['content'] === 't' Chris@0: ) { Chris@0: $error = 'The second argument to watchdog() should not be enclosed with t()'; Chris@0: $phpcsFile->addError($error, $argument['start'], 'WatchdogT'); Chris@0: } Chris@0: Chris@0: $concatFound = $phpcsFile->findNext(T_STRING_CONCAT, $argument['start'], $argument['end']); Chris@0: if ($concatFound !== false) { Chris@0: $error = 'Concatenating translatable strings is not allowed, use placeholders instead and only one string literal'; Chris@0: $phpcsFile->addError($error, $concatFound, 'Concat'); Chris@0: } Chris@0: Chris@0: }//end processFunctionCall() Chris@0: Chris@0: Chris@0: }//end class