Code Duplication    Length = 5-5 lines in 2 locations

src/Composer.php 2 locations

@@ 291-295 (lines=5) @@
288
        $result = array();
289
        foreach ($list as $k=>$v) {
290
            $module = is_array($v)?$k:$v;
291
            if (!in_array($module, $ignoreList)) {
292
                $result[] = $module;
293
                $moduleList = $this->getReqList($this->packagesList[$module]);
294
                $result = array_merge($result, $moduleList);
295
            }
296
        }
297
        return array_values(array_unique($result));
298
    }
@@ 311-315 (lines=5) @@
308
        $return = array();
309
        if (is_array($list)) {
310
            foreach ($list as $module) {
311
                if (!in_array($module, $result)) {
312
                    $getList = $this->getReqList($this->packagesList[$module], $return);
313
                    $return[] = $module;
314
                    $return = array_merge($return, $getList);
315
                }
316
            }
317
        }
318
        return $return;