Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
22 | class VideoResponse extends AbstractMediaResponse { |
||
23 | |||
24 | /** |
||
25 | * Get the video. |
||
26 | * |
||
27 | * @return Video|null Returns the video. |
||
28 | */ |
||
29 | public function getVideo(): ?Video { |
||
30 | |||
31 | /** @var Video[] $medias */ |
||
32 | $medias = $this->getMedias(); |
||
33 | |||
34 | return 1 === count($medias) ? $medias[0] : null; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Set the video. |
||
39 | * |
||
40 | * @param Video $video The video. |
||
41 | * @return VideoResponse Returns this video response. |
||
42 | */ |
||
43 | public function setVideo(Video $video): VideoResponse { |
||
45 | } |
||
46 | } |
||
47 |