| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 2 | public function mergeApplicationDefinition($mergeArgs = true) |
|
| 24 | { |
||
| 25 | 2 | $originalOptions = $this->getApplication()->getDefinition()->getOptions(); |
|
| 26 | 2 | $this->getApplication()->getDefinition()->setOptions([]); |
|
| 27 | |||
| 28 | 2 | parent::mergeApplicationDefinition($mergeArgs); |
|
| 29 | |||
| 30 | 2 | foreach ($originalOptions as $option) { |
|
| 31 | try { |
||
| 32 | 2 | $this->getDefinition()->addOption($option); |
|
| 33 | 2 | } catch (LogicException $e) { |
|
| 34 | //option already defined by command itself |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | 2 | $this->getDefinition()->addOption(new InputOption('--driver', '', InputOption::VALUE_REQUIRED, 'which driver to use', Http::class)); |
|
| 39 | |||
| 40 | 2 | $this->getApplication()->getDefinition()->setOptions($originalOptions); |
|
| 41 | 2 | } |
|
| 42 | } |
||
| 43 |