Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 564-568 (lines=5) @@
561
            $possiblePath .= $course->getDirectory();
562
            $possiblePath .= '/course-pic.png';
563
564
            if (file_exists($possiblePath)) {
565
                $courseItem['course_img'] = api_get_path(WEB_COURSE_PATH)
566
                    . $course->getDirectory()
567
                    . '/course-pic.png';
568
            }
569
570
            $courseCatalog[] = $courseItem;
571
        }
@@ 617-621 (lines=5) @@
614
        $possiblePath .= $course->getDirectory();
615
        $possiblePath .= '/course-pic.png';
616
617
        if (file_exists($possiblePath)) {
618
            $courseInfo['course_img'] = api_get_path(WEB_COURSE_PATH)
619
                . $course->getDirectory()
620
                . '/course-pic.png';
621
        }
622
623
        return $courseInfo;
624
    }