Code Duplication    Length = 10-10 lines in 4 locations

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

@@ 1890-1899 (lines=10) @@
1887
     * @param $listB
1888
     * @return int
1889
     */
1890
    public static function compareListUserCategory($listA, $listB)
1891
    {
1892
        if ($listA['title'] == $listB['title']) {
1893
            return 0;
1894
        } else if($listA['title'] > $listB['title']) {
1895
            return 1;
1896
        } else {
1897
            return -1;
1898
        }
1899
    }
1900
1901
    /**
1902
     * @param $view

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

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