Checks to see if the variable follows the naming convention.

@param String $text
the string containing the variable.
350698
private function _checkVariableNaming($text) {
		if ($this->_inClass || $this->_inInterface) {
			if ($this->_inFunctionStatement || $this->_inInterfaceStatement) {
				$this->_checkScopedVariableNaming($text, 'functionParameterNaming', 'FUNCTION_PARAMETER_NAMING');
			} else if ($this->_inFunction) {
				if (array_key_exists($text, $this->_functionParameters)) {
					$this->_checkScopedVariableNaming($text, 'functionParameterNaming', 'FUNCTION_PARAMETER_NAMING');
				} else {
					$this->_checkScopedVariableNaming($text, 'localVariableNaming', 'LOCAL_VARIABLE_NAMING');
				}
			} else {
				$this->_checkScopedVariableNaming($text, 'memberVariableNaming', 'MEMBER_VARIABLE_NAMING');
			}
		} else {
			$this->_checkScopedVariableNaming($text, 'topLevelVariableNaming', 'TOPLEVEL_VARIABLE_NAMING');
		}
	}
116551
public function text($var)
	{
		global $txt;

		// This should be extended by somebody else...
		if (!$this->name || empty($var))
			return false;

		// Does nothing if the file is already loaded.
		loadLanguage($this->name);

		return !empty($txt[$this->name .'_'. $var]) ? $txt[$this->name .'_'. $var] : false;
	}
939258
public function theResponseShouldNotContain($text)
    {
        $expectedRegexp = '/' . preg_quote($text) . '/';
        $actual = (string) $this->response->getBody();
        Assertions::assertNotRegExp($expectedRegexp, $actual);
    }
384341
public function th(string $text = '', array $attributes = []): void
    {
        $this->tdArray[] = Tags::th($text, $attributes);
    }
173948
private function _processFunctionCall($text) {
		if (strtolower($text) === "define") {
			$this->_constantDef = true;
		}

		if ($this->tokenizer->checkNextValidToken(T_PARENTHESIS_OPEN)) {
			// ASSUMPTION:that T_STRING followed by "(" is a function call
			$this->_inFuncCall = true;

			array_push($this->_currentFuncCall, $text);

			// Add the function name to the list of used functions
			$this->_usedFunctions[$text] = $text;

			// Check if the function call is made on an object of if it's a base PHP function.
			$isObjectCall = $this->tokenizer->checkPreviousToken(T_OBJECT_OPERATOR);

			if (!$isObjectCall) {

				// Detect prohibited functions
				$this->_checkProhibitedFunctions($text);

				// Detect deprecated functions
				$this->_checkDeprecation($text);

				// Detect aliased functions
				$this->_checkAliases($text);

				// Detect replaced functions
				$this->_checkReplacements($text);
			}

			// Detect an @ before the function call
			$this->_checkSilenced($text);

			// Detect space after function name
			if ($this->_isActive('noSpaceAfterFunctionName')) {
				if (!$this->tokenizer->checkNextToken(T_PARENTHESIS_OPEN)) {
					$msg = $this->_getMessage('NO_SPACE_AFTER_TOKEN', $text);
					$this->_writeError('noSpaceAfterFunctionName', $msg);
				}
			}
		}

		// Optimisation : Avoid using count/sizeof inside a loop
		if ($this->_isActive('functionInsideLoop')) {
			if ((strtolower($text) === 'count' || strtolower($text) === 'sizeof') && $this->_inControlStatement) {
				$loops = array(
					'do',
					'while',
					'for',
					'foreach'
				);
				if (in_array($this->_currentStatement, $loops)) {
					$msg = $this->_getMessage('FUNCTION_INSIDE_LOOP', strtolower($text));
					$this->_writeError('functionInsideLoop', $msg);
				}
			}
		}
	}
519264
private function createDateFromText($text)
    {
        try {
            $date = new \DateTime($text);
        } catch (\Exception $e) {
            $date = new \DateTime(self::DEFAULT_TO_DATE);
        }

        return $date->format('Y-m-d');
    }
66194
public static boolean isExpression(String text) {
    if (text == null) {
      return false;
    }
    text = text.trim();
    return text.startsWith("${") || text.startsWith("#{");
  }
243859
private function _checkAliases($text) {
		if ($this->_isActive('checkAliases')) {
			$key = strtolower($text);
			if (array_key_exists($key, $this->_aliasedFunctions)) {
				$msg = $this->_getMessage('ALIASED_FUNCTION', $this->_aliasedFunctions[$key]['old'], $this->_aliasedFunctions[$key]['new']);
				$this->_writeError('checkAliases', $msg);
			}
		}
	}
573516
private function _checkDeprecation($text) {
		if ($this->_isActive('checkDeprecation')) {
			$key = strtolower($text);
			if (array_key_exists($key, $this->_deprecatedFunctions)) {
				$msg = $this->_getMessage('DEPRECATED_FUNCTION', $this->_deprecatedFunctions[$key]['old'], $this->_deprecatedFunctions[$key]['version'], $this->_deprecatedFunctions[$key]['new']);
				$this->_writeError('checkDeprecation', $msg);
			}
		}
	}
1122221
public function parse(string $text) : \stdClass
    {
        $items = Text::split($text, $this->separator);
        $itemsCount = count($items);
        $itemIndex = 0;
        $names = array_keys($this->fields);
        $namesCount = count($names);
        $nameIndex = 0;
        $index = 0;
        $separatorLength = strlen($this->separator);
        $itemsLeft = false;
        $this->clearValues();
        try {
            while ($itemIndex < $itemsCount && $nameIndex < $namesCount) {
                $syntax = $this->fields[$names[$nameIndex]];
                $this->values[$names[$nameIndex]]->value = $syntax->parse($items[$itemIndex]);
                $this->values[$names[$nameIndex]]->error = null;
                $index += strlen($items[$itemIndex]) + $separatorLength;
                $nameIndex ++;
                $itemIndex ++;
                if ($syntax instanceof OptionalSyntax && !$syntax->success()) {
                    $itemIndex --;
                }
            }
            // if items are left
            if ($itemIndex < $itemsCount)
                $itemsLeft = true;
            // if fields are left
            while ($nameIndex < $namesCount) {
                $syntax = $this->fields[$names[$nameIndex]];
                $this->values[$names[$nameIndex]]->value = $syntax->parse('');
                $this->values[$names[$nameIndex]]->error = null;
                $nameIndex ++;
            }
        } catch (ParseException $e) {
            if ($itemIndex < $itemsCount) {
                $this->values[$names[$nameIndex]]->error = static::INVALID_FIELD;
                $error = "Unable to parse the item '{$items[$itemIndex]}' for field '{$names[$nameIndex]}'";
                $extra = [
                    'type'  => 'invalid-field',
                    'field' => $names[$nameIndex],
                    'text'  => $items[$itemIndex]
                ];
            } else {
                $this->values[$names[$nameIndex]]->error = static::MISSING_FIELD;
                $error = "No item left for field '{$names[$nameIndex]}'";
                $extra = [
                    'type'  => 'missing-field',
                    'field' => $names[$nameIndex],
                    'position' => $e->position()
                ];
            }
            throw new ParseException($this, $text, $index + $e->position(), $error, $extra, $e);
        }

        if ($itemsLeft) {
            $extra = [
                'type'  => 'additional-items',
                'items' => array_slice($items, $itemIndex)
            ];
            throw new ParseException($this, $text, $index - $separatorLength,
                "Additional items with no corresponding fields", $extra);
        }

        return (object) array_map(function(\stdClass $field) {
            return $field->value;
        }, $this->values);
    }
1200219
public static function ctype_cntrl($text)
    {
        $text = self::convert_int_to_char_for_ctype($text);

        return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
    }
407268
private function tag_get_type(string $text){
    if (
      ($this->mode === 'js') ||
      ($this->mode === 'vue')
    ){
      preg_match('/(?:\{)(.+)(?:\})/', $text, $type, PREG_OFFSET_CAPTURE);
    }
    else if ( $this->mode === 'php' ){
      preg_match('/(?:\@[a-z]+\s{1})(.+)(?:\s{1}\$)/', $text, $type, PREG_OFFSET_CAPTURE);
      $type[0] = $type[1];
    }
    return $type;
  }
800342
protected function error($text)
    {
        if($this->console) {
            $this->console->error($text);
        }

        if($this->logger) {
            $this->logger->error($text);
        }
    }
56963
public function setText(string $text): void
    {
        $this->text = $text;

        if ( ! is_null($this->encode)) {
            $text = $this->encode->convert($text);

            // remember the conversion
            $this->convertedText = $text;
        }
    }
633509
private function _checkReplacements($text) {
		if ($this->_isActive('checkReplacements')) {
			$key = strtolower($text);
			if (array_key_exists($key, $this->_replacements)) {
				$msg = $this->_getMessage('REPLACED', $this->_replacements[$key]['old'], $this->_replacements[$key]['new']);
				$this->_writeError('checkReplacements', $msg);
			}
		}
	}
930783
protected static function removeTrailingNewline($text)
    {
        return substr($text, - 1) === "\n" ? substr($text, - 2, 1) === "\r" ? substr($text, 0, - 2) : substr($text, 0, - 1) : $text;
    }
853507
protected function parseShortnames($text)
	{
		$matchPos = strpos($text, ':');
		if ($matchPos === false)
		{
			return;
		}
		preg_match_all($this->shortnameRegexp, $text, $matches, PREG_OFFSET_CAPTURE, $matchPos);
		foreach ($matches[0] as list($alias, $tagPos))
		{
			$alias .= ':';
			$tagLen = strlen($alias);
			if (isset($this->parser->registeredVars['Emoji.aliases'][$alias]))
			{
				$hex = $this->getHexSequence($this->parser->registeredVars['Emoji.aliases'][$alias]);
				$this->addTag($tagPos, $tagLen, $hex);
			}
			elseif (preg_match('/^:[0-3][0-9a-f]{3,4}(?:-[0-9a-f]{4,5})*:$/', $alias))
			{
				$this->addTag($tagPos, $tagLen, substr($alias, 1, -1));
			}
		}
	}