|
@@ 297-299 (lines=3) @@
|
| 294 |
|
if ($required) { |
| 295 |
|
$mode |= InputOption::VALUE_REQUIRED; |
| 296 |
|
} |
| 297 |
|
if (in_array('array', explode('|', $config['type']), true)) { |
| 298 |
|
$mode |= InputOption::VALUE_IS_ARRAY; |
| 299 |
|
} |
| 300 |
|
if (preg_match('/(^|\|)bool(ean)?($|\|)/', $config['type'])) { |
| 301 |
|
if (strpos($config['type'], '|')) { |
| 302 |
|
$mode |= InputOption::VALUE_NONE; |
|
@@ 321-323 (lines=3) @@
|
| 318 |
|
if ($required) { |
| 319 |
|
$mode |= InputArgument::REQUIRED; |
| 320 |
|
} |
| 321 |
|
if (in_array('array', explode('|', $config['type']), true)) { |
| 322 |
|
$mode |= InputArgument::IS_ARRAY; |
| 323 |
|
} |
| 324 |
|
$definition->addArgument( |
| 325 |
|
new InputArgument($from, $mode, $config['label'], array_key_exists('default', $config) ? $config['default'] : null) |
| 326 |
|
); |