1 | <?php |
||
2 | |||
3 | namespace Osnova\Services\Media; |
||
4 | |||
5 | class TweetMedia extends Media |
||
6 | { |
||
7 | /** |
||
8 | * Get thumbnail URL. |
||
9 | * |
||
10 | * @return string|null |
||
11 | */ |
||
12 | public function getThumbnailUrl() |
||
13 | { |
||
14 | return $this->getData('thumbnail_url'); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Get URL. |
||
19 | * |
||
20 | * @return string|null |
||
21 | */ |
||
22 | public function getUrl() |
||
23 | { |
||
24 | return $this->getData('media_url'); |
||
0 ignored issues
–
show
|
|||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Get thumbnail width. |
||
29 | * |
||
30 | * @return int |
||
31 | */ |
||
32 | public function getThumbnailWidth() |
||
33 | { |
||
34 | return intval($this->getData('thumbnail_width')); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Get thumbnail height. |
||
39 | * |
||
40 | * @return int |
||
41 | */ |
||
42 | public function getThumbnailHeight() |
||
43 | { |
||
44 | return intval($this->getData('thumbnail_height')); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get aspect ratio. |
||
49 | * |
||
50 | * @return int|float|null |
||
51 | */ |
||
52 | public function getRatio() |
||
53 | { |
||
54 | return $this->getData('ratio'); |
||
0 ignored issues
–
show
|
|||
55 | } |
||
56 | } |
||
57 |