HippoPHP\Hippo\CLI\ArgParser::extractArgValue PHP Method

extractArgValue() private method

private extractArgValue ( string $arg, string $nextArg, boolean &$hasUsedNextArg ) : mixed
$arg string
$nextArg string
$hasUsedNextArg boolean
return mixed
    private function extractArgValue($arg, $nextArg, &$hasUsedNextArg)
    {
        $hasUsedNextArg = false;
        $normalizedArg = $this->normalizeArg($arg);
        $index = strpos($arg, '=');
        if ($index !== false) {
            return $this->processStringValue($normalizedArg, substr($arg, $index + 1));
        } elseif ($this->argParserOptions->isFlag($normalizedArg)) {
            if ($this->isBool($nextArg)) {
                $hasUsedNextArg = true;
                return $this->processStringValue($normalizedArg, $nextArg);
            }
            return true;
        } elseif ($nextArg !== null && !$this->isArgument($nextArg)) {
            $hasUsedNextArg = true;
            return $this->processStringValue($normalizedArg, $nextArg);
        }
    }