Code Duplication    Length = 8-8 lines in 2 locations

src/Parser/CommandInfo.php 2 locations

@@ 201-208 (lines=8) @@
198
            'example_usages' => $this->getExampleUsages(),
199
            'return_type' => $this->getReturnType(),
200
        ] + $this->defaultSerializationData();
201
        foreach ($this->arguments()->getValues() as $key => $val) {
202
            $info['arguments'][$key] = [
203
                'description' => $this->arguments()->getDescription($key),
204
            ];
205
            if ($this->arguments()->hasDefault($key)) {
206
                $info['arguments'][$key]['default'] = $val;
207
            }
208
        }
209
        foreach ($this->options()->getValues() as $key => $val) {
210
            $info['options'][$key] = [
211
                'description' => $this->options()->getDescription($key),
@@ 209-216 (lines=8) @@
206
                $info['arguments'][$key]['default'] = $val;
207
            }
208
        }
209
        foreach ($this->options()->getValues() as $key => $val) {
210
            $info['options'][$key] = [
211
                'description' => $this->options()->getDescription($key),
212
            ];
213
            if ($this->options()->hasDefault($key)) {
214
                $info['options'][$key]['default'] = $val;
215
            }
216
        }
217
        foreach ($this->getParameters() as $i => $parameter) {
218
            // TODO: Also cache input/output params
219
        }