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