protected function process_sql_as_keyword(PHP_CodeSniffer_File $phpcsFile, $stackPtr) {
        $tokens = $phpcsFile->getTokens();
        $token = $tokens[$stackPtr];
        $text = trim($token['content'], "'\"");
        if (preg_match('~\b(FROM|JOIN)\b.*\{\w+\}\s*\bAS\b~im', $text)) {
            $error = 'The use of the AS keyword to alias tables is bad for cross-db';
            $phpcsFile->addError($error, $stackPtr, 'Found');
        }
    }
protected function process_sql_as_keyword(PHP_CodeSniffer_File $phpcsFile, $stackPtr) {
        $tokens = $phpcsFile->getTokens();
        $token = $tokens[$stackPtr];
        $text = trim($token['content'], "'\"");
        if (preg_match('~\b(FROM|JOIN)\b.*\{\w+\}\s*\bAS\b~im', $text)) {
            $error = 'The use of the AS keyword to alias tables is bad for cross-db';
            $phpcsFile->addError($error, $stackPtr, 'Found');
        }
    }
protected function process_sql_as_keyword ( PHP_CodeSniffer_File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; $ token = $ tokens [ $ stackPtr ] ; $ text = trim ( $ token [ 'content' ] , "'\"" ) ; if ( preg_match ( '~\b(FROM|JOIN)\b.*\{\w+\}\s*\bAS\b~im' , $ text ) ) { $ error = 'The use of the AS keyword to alias tables is bad for cross-db' ; $ phpcsFile -> addError ( $ error , $ stackPtr , 'Found' ) ; } }
Detect strings using the AS keyword to aliase tables.

@param PHP_CodeSniffer_File $phpcsFile The file being scanned.
@param int                  $stackPtr  The position of the current token in
the stack passed in $tokens.

@return void
Detect strings using the AS keyword to aliase tables .