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

processArg() private method

private processArg ( string $arg, string $nextArg ) : boolean
$arg string
$nextArg string
return boolean whether the next arg was used
    private function processArg($arg, $nextArg)
    {
        if ($arg === '--') {
            $this->stopParsing = true;
            return false;
        }
        if (!$this->stopParsing) {
            if ($this->isLongArgument($arg)) {
                $this->argContainer->setLongOption($this->normalizeArg($arg), $this->extractArgValue($arg, $nextArg, $hasUsedNextArg));
                return $hasUsedNextArg;
            }
            if ($this->isShortArgument($arg)) {
                $this->argContainer->setShortOption($this->normalizeArg($arg), $this->extractArgValue($arg, $nextArg, $hasUsedNextArg));
                return $hasUsedNextArg;
            }
        }
        $this->argContainer->addStrayArgument($arg);
        return false;
    }