mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 09:32:24 -04:00
Update composer packages
This commit is contained in:
parent
58cc098058
commit
415aed8b31
59 changed files with 3352 additions and 2347 deletions
21
vendor/symfony/console/Input/ArgvInput.php
vendored
21
vendor/symfony/console/Input/ArgvInput.php
vendored
|
@ -257,8 +257,27 @@ class ArgvInput extends Input
|
|||
*/
|
||||
public function getFirstArgument()
|
||||
{
|
||||
foreach ($this->tokens as $token) {
|
||||
$isOption = false;
|
||||
foreach ($this->tokens as $i => $token) {
|
||||
if ($token && '-' === $token[0]) {
|
||||
if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If it's a long option, consider that everything after "--" is the option name.
|
||||
// Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator)
|
||||
$name = '-' === $token[1] ? substr($token, 2) : substr($token, -1);
|
||||
if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) {
|
||||
// noop
|
||||
} elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) {
|
||||
$isOption = true;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($isOption) {
|
||||
$isOption = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue