protected function processVariableInString(PHP_CodeSniffer_File $phpcsfile, $stackptr) {
        $tokens = $phpcsfile->getTokens();

        if (preg_match('/\$([A-Za-z0-9_]+)(\-\>([A-Za-z0-9_]+))?/i',
                $tokens[$stackptr]['content'], $matches)) {
            $firstvar = $matches[1];

            $this->validate_moodle_variable_name($firstvar, $phpcsfile, $stackptr);
        }
    }
protected function processVariableInString(PHP_CodeSniffer_File $phpcsfile, $stackptr) {
        $tokens = $phpcsfile->getTokens();

        if (preg_match('/\$([A-Za-z0-9_]+)(\-\>([A-Za-z0-9_]+))?/i',
                $tokens[$stackptr]['content'], $matches)) {
            $firstvar = $matches[1];

            $this->validate_moodle_variable_name($firstvar, $phpcsfile, $stackptr);
        }
    }
protected function processVariableInString ( PHP_CodeSniffer_File $ phpcsfile , $ stackptr ) { $ tokens = $ phpcsfile -> getTokens ( ) ; if ( preg_match ( '/\$([A-Za-z0-9_]+)(\-\>([A-Za-z0-9_]+))?/i' , $ tokens [ $ stackptr ] [ 'content' ] , $ matches ) ) { $ firstvar = $ matches [ 1 ] ; $ this -> validate_moodle_variable_name ( $ firstvar , $ phpcsfile , $ stackptr ) ; } }
Processes variables in double quoted strings.

@param PHP_CodeSniffer_File $phpcsfile The file where this token was found.
@param int                  $stackptr  The position where the token was found.

@return void
Processes variables in double quoted strings .