Code Duplication    Length = 5-5 lines in 2 locations

plugin/buycourses/src/buy_course_plugin.class.php 2 locations

@@ 669-673 (lines=5) @@
666
            $possiblePath .= $course->getDirectory();
667
            $possiblePath .= '/course-pic.png';
668
669
            if (file_exists($possiblePath)) {
670
                $courseItem['course_img'] = api_get_path(WEB_COURSE_PATH)
671
                    . $course->getDirectory()
672
                    . '/course-pic.png';
673
            }
674
675
            $courseCatalog[] = $courseItem;
676
        }
@@ 723-727 (lines=5) @@
720
        $possiblePath .= $course->getDirectory();
721
        $possiblePath .= '/course-pic.png';
722
723
        if (file_exists($possiblePath)) {
724
            $courseInfo['course_img'] = api_get_path(WEB_COURSE_PATH)
725
                . $course->getDirectory()
726
                . '/course-pic.png';
727
        }
728
729
        return $courseInfo;
730
    }