private function _checkScopedVariableNaming($variableText, $ruleName, $msgName) {
		if ($this->_isActive($ruleName) || $this->_isActive('variableNaming')) {
			$texttoTest = ltrim($variableText, "\"'"); // remove the quotes
			$texttoTest = rtrim($texttoTest, "\"'");
			if (strpos($texttoTest, "$") === 0) {
				// remove the "&"
				$texttoTest = substr($texttoTest, 1);
			}
			// If the variable is not listed as an exception
			if (!$this->_config->isException($ruleName, $texttoTest)) {

				if ($this->_isActive($ruleName)) {
					// Scoped variable
					$ret = preg_match($this->_config->getTestRegExp($ruleName), $texttoTest);
				} else {
					// Default case
					$ret = preg_match($this->_config->getTestRegExp('variableNaming'), $texttoTest);
				}
				if (!$ret) {
					if ($this->_isActive($ruleName)) {
						$msg = $this->_getMessage($msgName, $variableText, $this->_config->getTestRegExp($ruleName));
					} else {
						$msg = $this->_getMessage('VARIABLE_NAMING', $variableText, $this->_config->getTestRegExp('variableNaming'));
					}
					$this->_writeError($ruleName, $msg);
				}
			}
		}
	}