Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | final class MediaQueryController |
||
21 | { |
||
22 | private $queryBus; |
||
23 | |||
24 | public function __construct(QueryBus $queryBus) |
||
25 | { |
||
26 | $this->queryBus = $queryBus; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @OpenApi\Get( |
||
31 | * tags={"media"}, |
||
32 | * summary="Get media.", |
||
33 | * security={ |
||
34 | * {"Bearer"=""} |
||
35 | * }, |
||
36 | * @OpenApi\Response( |
||
37 | * response=200, |
||
38 | * description="Media info.", |
||
39 | * @OpenApi\Schema(ref=@Model(type=MediaDto::class)) |
||
40 | * ), |
||
41 | * @OpenApi\Response( |
||
42 | * response=404, |
||
43 | * description="Media not found." |
||
44 | * ) |
||
45 | * ) |
||
46 | * |
||
47 | * @Route("/{id}", methods={"GET"}, name="media_view") |
||
48 | * @Serialize() |
||
49 | * |
||
50 | * @throws NotFoundHttpException |
||
51 | */ |
||
52 | public function view(string $id): MediaDto |
||
58 | } |
||
59 | } |
||
61 |