Selaa lähdekoodia

Simplify conditional block

Antoine Hérault 14 vuotta sitten
vanhempi
commit
d9f00ca7be
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      src/Symfony/Component/Console/Input/ArgvInput.php

+ 1 - 3
src/Symfony/Component/Console/Input/ArgvInput.php

@@ -229,10 +229,8 @@ class ArgvInput extends Input
             $value = $option->isValueOptional() ? $option->getDefault() : true;
         }
 
-        if ($option->isArray() && isset($this->options[$name])) {
+        if ($option->isArray()) {
             $this->options[$name][] = $value;
-        } else if ($option->isArray()) {
-            $this->options[$name] = array($value);
         } else {
             $this->options[$name] = $value;
         }