Code Duplication    Length = 8-10 lines in 2 locations

main/inc/lib/tracking.lib.php 2 locations

@@ 1320-1329 (lines=10) @@
1317
                DRH
1318
            );
1319
1320
            if ($getCount) {
1321
                $drhCount = $humanResources;
1322
            } else {
1323
                $humanResourcesList = array();
1324
                if (is_array($humanResources)) {
1325
                    foreach ($humanResources as $item) {
1326
                        $humanResourcesList[] = $item['user_id'];
1327
                    }
1328
                }
1329
            }
1330
1331
            $platformCourses = SessionManager::getAllCoursesFollowedByUser(
1332
                $userId,
@@ 1443-1450 (lines=8) @@
1440
                COURSEMANAGER
1441
            );
1442
1443
            if ($getCount) {
1444
                $drhCount = $humanResources;
1445
            } else {
1446
                $humanResourcesList = array();
1447
                foreach ($humanResources as $item) {
1448
                    $humanResourcesList[] = $item['user_id'];
1449
                }
1450
            }
1451
1452
            $platformCourses = CourseManager::getCoursesFollowedByUser(
1453
                $userId,