Code Duplication    Length = 10-12 lines in 4 locations

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

@@ 8165-8174 (lines=10) @@
8162
     * @param array $listB
8163
     * @return int
8164
     */
8165
    private static function compareCatSessionInfo($listA, $listB)
8166
    {
8167
        if ($listA['sessionName'] == $listB['sessionName']) {
8168
            return 0;
8169
        } elseif ($listA['sessionName'] > $listB['sessionName']) {
8170
            return 1;
8171
        } else {
8172
            return -1;
8173
        }
8174
    }
8175
8176
    /**
8177
     * @param array $listA
@@ 8201-8210 (lines=10) @@
8198
     * @param array $listB
8199
     * @return int
8200
     */
8201
    private static function compareByUserCourseCat($listA, $listB)
8202
    {
8203
        if ($listA['courseInUserCategoryTitle'] == $listB['courseInUserCategoryTitle']) {
8204
            return 0;
8205
        } else if ($listA['courseInUserCategoryTitle'] > $listB['courseInUserCategoryTitle']) {
8206
            return 1;
8207
        } else {
8208
            return -1;
8209
        }
8210
    }
8211
8212
    /**
8213
     * @param array $listA
@@ 8217-8226 (lines=10) @@
8214
     * @param array $listB
8215
     * @return int
8216
     */
8217
    private static function compareByCourse($listA, $listB)
8218
    {
8219
        if ($listA['title'] == $listB['title']) {
8220
            return 0;
8221
        } else if ($listA['title'] > $listB['title']) {
8222
            return 1;
8223
        } else {
8224
            return -1;
8225
        }
8226
    }
8227
8228
    /**
8229
     * Return HTML code for displaying session_course_for_coach

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

@@ 1992-2003 (lines=12) @@
1989
     * @param $listB
1990
     * @return int
1991
     */
1992
    public static function compareListUserCategory($listA, $listB)
1993
    {
1994
        if ($listA['title'] == $listB['title']) {
1995
            return 0;
1996
        }
1997
1998
        if ($listA['title'] > $listB['title']) {
1999
            return 1;
2000
        }
2001
2002
        return -1;
2003
    }
2004
2005
    /**
2006
     * @param $view