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);
        }
    }