Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpathItem.class.php 1 location

@@ 1656-1663 (lines=8) @@
1653
1654
        $checked_files_list = array();
1655
        $checked_array_list = array();
1656
        foreach ($files_list as $idx => $file) {
1657
            if (!empty($file[0])) {
1658
                if (!in_array($file[0], $checked_files_list)) {
1659
                    $checked_files_list[] = $files_list[$idx][0];
1660
                    $checked_array_list[] = $files_list[$idx];
1661
                }
1662
            }
1663
        }
1664
        return $checked_array_list;
1665
    }
1666

main/inc/lib/document.lib.php 1 location

@@ 2374-2381 (lines=8) @@
2371
        $checked_array_list = array();
2372
2373
        if (count($files_list) > 0) {
2374
            foreach ($files_list as $idx => $file) {
2375
                if (!empty($file[0])) {
2376
                    if (!in_array($file[0], $checked_files_list)) {
2377
                        $checked_files_list[] = $files_list[$idx][0];
2378
                        $checked_array_list[] = $files_list[$idx];
2379
                    }
2380
                }
2381
            }
2382
        }
2383
        return $checked_array_list;
2384
    }