Chris@0: getTokens(); Chris@0: $functionName = $tokens[$stackPtr]['content']; Chris@0: if (strpos($functionName, 'theme_') !== 0 Chris@0: || in_array($functionName, $this->reservedFunctions) === true Chris@0: || $this->isFunctionCall($phpcsFile, $stackPtr) === false Chris@0: ) { Chris@0: return; Chris@0: } Chris@0: Chris@0: $themeName = substr($functionName, 6); Chris@0: $warning = "Do not call theme functions directly, use theme('%s', ...) instead"; Chris@0: $phpcsFile->addWarning($warning, $stackPtr, 'ThemeFunctionDirect', array($themeName)); Chris@0: Chris@0: }//end process() Chris@0: Chris@0: Chris@0: }//end class