Code Duplication    Length = 10-10 lines in 4 locations

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

@@ 1738-1747 (lines=10) @@
1735
     * @param $listB
1736
     * @return int
1737
     */
1738
    public static function compareListUserCategory($listA, $listB)
1739
    {
1740
        if ($listA['title'] == $listB['title']) {
1741
            return 0;
1742
        } else if($listA['title'] > $listB['title']) {
1743
            return 1;
1744
        } else {
1745
            return -1;
1746
        }
1747
    }
1748
1749
    /**
1750
     * @param $view

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

@@ 7704-7713 (lines=10) @@
7701
     * @param array $listB
7702
     * @return int
7703
     */
7704
    private static function compareCatSessionInfo($listA, $listB)
7705
    {
7706
        if ($listA['sessionName'] == $listB['sessionName']) {
7707
            return 0;
7708
        } else if($listA['sessionName'] > $listB['sessionName']) {
7709
            return 1;
7710
        } else {
7711
            return -1;
7712
        }
7713
    }
7714
7715
    /**
7716
     * @param array $listA
@@ 7740-7749 (lines=10) @@
7737
     * @param array $listB
7738
     * @return int
7739
     */
7740
    private static function compareByUserCourseCat($listA, $listB)
7741
    {
7742
        if ($listA['courseInUserCategoryTitle'] == $listB['courseInUserCategoryTitle']) {
7743
            return 0;
7744
        } else if($listA['courseInUserCategoryTitle'] > $listB['courseInUserCategoryTitle']) {
7745
            return 1;
7746
        } else {
7747
            return -1;
7748
        }
7749
    }
7750
7751
    /**
7752
     * @param array $listA
@@ 7756-7765 (lines=10) @@
7753
     * @param array $listB
7754
     * @return int
7755
     */
7756
    private static function compareByCourse($listA, $listB)
7757
    {
7758
        if ($listA['title'] == $listB['title']) {
7759
            return 0;
7760
        } else if($listA['title'] > $listB['title']) {
7761
            return 1;
7762
        } else {
7763
            return -1;
7764
        }
7765
    }
7766
7767
    /**
7768
     * Return HTML code for displaying session_course_for_coach