Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 627-631 (lines=5) @@
624
            $possiblePath .= $course->getDirectory();
625
            $possiblePath .= '/course-pic.png';
626
627
            if (file_exists($possiblePath)) {
628
                $courseItem['course_img'] = api_get_path(WEB_COURSE_PATH)
629
                    . $course->getDirectory()
630
                    . '/course-pic.png';
631
            }
632
633
            $courseCatalog[] = $courseItem;
634
        }
@@ 681-685 (lines=5) @@
678
        $possiblePath .= $course->getDirectory();
679
        $possiblePath .= '/course-pic.png';
680
681
        if (file_exists($possiblePath)) {
682
            $courseInfo['course_img'] = api_get_path(WEB_COURSE_PATH)
683
                . $course->getDirectory()
684
                . '/course-pic.png';
685
        }
686
687
        return $courseInfo;
688
    }