Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 614-618 (lines=5) @@
611
            $possiblePath .= $course->getDirectory();
612
            $possiblePath .= '/course-pic.png';
613
614
            if (file_exists($possiblePath)) {
615
                $courseItem['course_img'] = api_get_path(WEB_COURSE_PATH)
616
                    . $course->getDirectory()
617
                    . '/course-pic.png';
618
            }
619
620
            $courseCatalog[] = $courseItem;
621
        }
@@ 667-671 (lines=5) @@
664
        $possiblePath .= $course->getDirectory();
665
        $possiblePath .= '/course-pic.png';
666
667
        if (file_exists($possiblePath)) {
668
            $courseInfo['course_img'] = api_get_path(WEB_COURSE_PATH)
669
                . $course->getDirectory()
670
                . '/course-pic.png';
671
        }
672
673
        return $courseInfo;
674
    }