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

@@ 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