| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 1 | public function collect($option) |
|
| 33 | { |
||
| 34 | /** @var OptionFilterIterator|OptionIterator $options */ |
||
| 35 | 1 | $options = new OptionFilterIterator($this->args, $option); |
|
| 36 | 1 | $consume = array(); |
|
| 37 | 1 | foreach ($options as $index => $option) { |
|
| 38 | 1 | $this->arguments[] = $option; |
|
| 39 | 1 | $consume[] = $index; |
|
| 40 | 1 | $this->arguments[] = $options->getArgument(); |
|
| 41 | 1 | $consume[] = $index + 1; |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | foreach ($consume as $index) { |
|
| 45 | 1 | unset($this->args->arguments[$index]); |
|
| 46 | } |
||
| 57 |