| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class ApiCoursesController extends AbstractController |
||
| 15 | { |
||
| 16 | private $courseRepository; |
||
| 17 | |||
| 18 | public function __construct(CourseRepositoryInterface $courseRepository) |
||
| 19 | { |
||
| 20 | $this->courseRepository = $courseRepository; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getAll(SerializerInterface $serializer): Response |
||
| 24 | { |
||
| 25 | $courses = $this->courseRepository->getAll(); |
||
| 26 | |||
| 27 | return new Response($serializer->serialize($courses, 'json', ['groups' => ['list_courses']])); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getCourseAttachments( |
||
| 41 | } |
||
| 42 | } |
||
| 43 |