Code Duplication    Length = 10-10 lines in 4 locations

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

@@ 7713-7722 (lines=10) @@
7710
     * @param array $listB
7711
     * @return int
7712
     */
7713
    private static function compareCatSessionInfo($listA, $listB)
7714
    {
7715
        if ($listA['sessionName'] == $listB['sessionName']) {
7716
            return 0;
7717
        } else if($listA['sessionName'] > $listB['sessionName']) {
7718
            return 1;
7719
        } else {
7720
            return -1;
7721
        }
7722
    }
7723
7724
    /**
7725
     * @param array $listA
@@ 7749-7758 (lines=10) @@
7746
     * @param array $listB
7747
     * @return int
7748
     */
7749
    private static function compareByUserCourseCat($listA, $listB)
7750
    {
7751
        if ($listA['courseInUserCategoryTitle'] == $listB['courseInUserCategoryTitle']) {
7752
            return 0;
7753
        } else if($listA['courseInUserCategoryTitle'] > $listB['courseInUserCategoryTitle']) {
7754
            return 1;
7755
        } else {
7756
            return -1;
7757
        }
7758
    }
7759
7760
    /**
7761
     * @param array $listA
@@ 7765-7774 (lines=10) @@
7762
     * @param array $listB
7763
     * @return int
7764
     */
7765
    private static function compareByCourse($listA, $listB)
7766
    {
7767
        if ($listA['title'] == $listB['title']) {
7768
            return 0;
7769
        } else if($listA['title'] > $listB['title']) {
7770
            return 1;
7771
        } else {
7772
            return -1;
7773
        }
7774
    }
7775
7776
    /**
7777
     * Return HTML code for displaying session_course_for_coach

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

@@ 1770-1779 (lines=10) @@
1767
     * @param $listB
1768
     * @return int
1769
     */
1770
    public static function compareListUserCategory($listA, $listB)
1771
    {
1772
        if ($listA['title'] == $listB['title']) {
1773
            return 0;
1774
        } else if($listA['title'] > $listB['title']) {
1775
            return 1;
1776
        } else {
1777
            return -1;
1778
        }
1779
    }
1780
1781
    /**
1782
     * @param $view