Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 647-651 (lines=5) @@
644
            $possiblePath .= $course->getDirectory();
645
            $possiblePath .= '/course-pic.png';
646
647
            if (file_exists($possiblePath)) {
648
                $courseItem['course_img'] = api_get_path(WEB_COURSE_PATH)
649
                    . $course->getDirectory()
650
                    . '/course-pic.png';
651
            }
652
653
            $courseCatalog[] = $courseItem;
654
        }
@@ 701-705 (lines=5) @@
698
        $possiblePath .= $course->getDirectory();
699
        $possiblePath .= '/course-pic.png';
700
701
        if (file_exists($possiblePath)) {
702
            $courseInfo['course_img'] = api_get_path(WEB_COURSE_PATH)
703
                . $course->getDirectory()
704
                . '/course-pic.png';
705
        }
706
707
        return $courseInfo;
708
    }