Code Duplication    Length = 10-10 lines in 4 locations

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

@@ 1882-1891 (lines=10) @@
1879
     * @param $listB
1880
     * @return int
1881
     */
1882
    public static function compareListUserCategory($listA, $listB)
1883
    {
1884
        if ($listA['title'] == $listB['title']) {
1885
            return 0;
1886
        } else if($listA['title'] > $listB['title']) {
1887
            return 1;
1888
        } else {
1889
            return -1;
1890
        }
1891
    }
1892
1893
    /**
1894
     * @param $view

main/inc/lib/sessionmanager.lib.php 3 locations

@@ 7909-7918 (lines=10) @@
7906
     * @param array $listB
7907
     * @return int
7908
     */
7909
    private static function compareCatSessionInfo($listA, $listB)
7910
    {
7911
        if ($listA['sessionName'] == $listB['sessionName']) {
7912
            return 0;
7913
        } else if($listA['sessionName'] > $listB['sessionName']) {
7914
            return 1;
7915
        } else {
7916
            return -1;
7917
        }
7918
    }
7919
7920
    /**
7921
     * @param array $listA
@@ 7945-7954 (lines=10) @@
7942
     * @param array $listB
7943
     * @return int
7944
     */
7945
    private static function compareByUserCourseCat($listA, $listB)
7946
    {
7947
        if ($listA['courseInUserCategoryTitle'] == $listB['courseInUserCategoryTitle']) {
7948
            return 0;
7949
        } else if($listA['courseInUserCategoryTitle'] > $listB['courseInUserCategoryTitle']) {
7950
            return 1;
7951
        } else {
7952
            return -1;
7953
        }
7954
    }
7955
7956
    /**
7957
     * @param array $listA
@@ 7961-7970 (lines=10) @@
7958
     * @param array $listB
7959
     * @return int
7960
     */
7961
    private static function compareByCourse($listA, $listB)
7962
    {
7963
        if ($listA['title'] == $listB['title']) {
7964
            return 0;
7965
        } else if($listA['title'] > $listB['title']) {
7966
            return 1;
7967
        } else {
7968
            return -1;
7969
        }
7970
    }
7971
7972
    /**
7973
     * Return HTML code for displaying session_course_for_coach