GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 14-16 lines in 2 locations

routes/activities.php 1 location

@@ 414-429 (lines=16) @@
411
            find_one();
412
}
413
414
function getAllFoldersFromActivities($orgId) {
415
    $folders = ORM::for_table('event')->
416
            select('id')->
417
            distinct()->
418
            where('organization_id', $orgId)->
419
            find_array();
420
421
    $folders = array_column($folders, 'id');
422
423
    $data = parseArray(
424
        ORM::for_table('folder')->
425
            where_id_in($folders)->
426
            find_many()
427
    );
428
    return $data;
429
}
430
431
function getProfilesForAllEvents($orgId) {
432
    $folders = ORM::for_table('event_profile')->

routes/manage.php 1 location

@@ 846-859 (lines=14) @@
843
    return $ok;
844
}
845
846
function deleteCompletedEventsForFolder($orgId, $folderId) {
847
    $events = ORM::for_table('event')->
848
        select('event.id')->
849
        where('event.organization_id', $orgId)->
850
        where('event.folder_id', $folderId)->
851
        where('event.is_automatic', 1)->
852
        find_array();
853
854
    $events = array_column($events, 'id');
855
856
    $ok = deleteEventsIn($events);
857
858
    return $ok;
859
}
860
861
function deleteAllCompletedEvents($orgId) {
862
    $events = ORM::for_table('event')->