Code Duplication    Length = 5-5 lines in 2 locations

src/Composer.php 2 locations

@@ 302-306 (lines=5) @@
299
        $result = array();
300
        foreach ($list as $k=>$v) {
301
            $module = is_array($v)?$k:$v;
302
            if (!in_array($module, $ignoreList)) {
303
                $result[] = $module;
304
                $moduleList = $this->getReqList($this->packagesList[$module]);
305
                $result = array_merge($result, $moduleList);
306
            }
307
        }
308
        return array_values(array_unique($result));
309
    }
@@ 322-326 (lines=5) @@
319
        $return = array();
320
        if (is_array($list)) {
321
            foreach ($list as $module) {
322
                if (!in_array($module, $result)) {
323
                    $getList = $this->getReqList($this->packagesList[$module], $return);
324
                    $return[] = $module;
325
                    $return = array_merge($return, $getList);
326
                }
327
            }
328
        }
329
        return $return;