1 | <?php |
||
15 | class Video extends BaseType implements TypeInterface |
||
16 | { |
||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | static protected $requiredParams = ['file_id', 'width', 'height', 'duration']; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | static protected $map = [ |
||
30 | 'file_id' => true, |
||
31 | 'file_unique_id' => true, |
||
32 | 'width' => true, |
||
33 | 'height' => true, |
||
34 | 'duration' => true, |
||
35 | 'thumb' => PhotoSize::class, |
||
36 | 'mime_type' => true, |
||
37 | 'file_size' => true |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * Identifier for this file, which can be used to download or reuse the file |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $fileId; |
||
46 | |||
47 | /** |
||
48 | * Unique identifier for this file, which is supposed |
||
49 | * to be thesame over time and for different bots. |
||
50 | * Can't be used to download or reuse the file. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $fileUniqueId; |
||
55 | |||
56 | /** |
||
57 | * Video width as defined by sender |
||
58 | * |
||
59 | * @var int |
||
60 | */ |
||
61 | protected $width; |
||
62 | |||
63 | /** |
||
64 | * Video height as defined by sender |
||
65 | * |
||
66 | * @var int |
||
67 | */ |
||
68 | protected $height; |
||
69 | |||
70 | /** |
||
71 | * Duration of the video in seconds as defined by sender |
||
72 | * |
||
73 | * @var int |
||
74 | */ |
||
75 | protected $duration; |
||
76 | |||
77 | /** |
||
78 | * Video thumbnail |
||
79 | * |
||
80 | * @var PhotoSize |
||
81 | */ |
||
82 | protected $thumb; |
||
83 | |||
84 | |||
85 | /** |
||
86 | * Optional. Mime type of a file as defined by sender |
||
87 | * |
||
88 | * @var string |
||
89 | */ |
||
90 | protected $mimeType; |
||
91 | |||
92 | /** |
||
93 | * Optional. File size |
||
94 | * |
||
95 | * @var int |
||
96 | */ |
||
97 | protected $fileSize; |
||
98 | |||
99 | /** |
||
100 | * @return int |
||
101 | */ |
||
102 | 1 | public function getDuration() |
|
106 | |||
107 | /** |
||
108 | * @param int $duration |
||
109 | * |
||
110 | * @throws InvalidArgumentException |
||
111 | */ |
||
112 | 6 | public function setDuration($duration) |
|
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | 1 | public function getFileId() |
|
128 | |||
129 | /** |
||
130 | * @param string $fileId |
||
131 | */ |
||
132 | 5 | public function setFileId($fileId) |
|
136 | |||
137 | /** |
||
138 | * @return string |
||
139 | */ |
||
140 | public function getFileUniqueId() |
||
144 | |||
145 | /** |
||
146 | * @param string $fileId |
||
|
|||
147 | */ |
||
148 | public function setFileUniqueId($fileUniqueId) |
||
152 | |||
153 | /** |
||
154 | * @return int |
||
155 | */ |
||
156 | 1 | public function getFileSize() |
|
160 | |||
161 | /** |
||
162 | * @param int $fileSize |
||
163 | * |
||
164 | * @throws InvalidArgumentException |
||
165 | */ |
||
166 | 6 | public function setFileSize($fileSize) |
|
174 | |||
175 | /** |
||
176 | * @return int |
||
177 | */ |
||
178 | 1 | public function getHeight() |
|
182 | |||
183 | /** |
||
184 | * @param int $height |
||
185 | * |
||
186 | * @throws InvalidArgumentException |
||
187 | */ |
||
188 | 6 | public function setHeight($height) |
|
196 | |||
197 | /** |
||
198 | * @return string |
||
199 | */ |
||
200 | 1 | public function getMimeType() |
|
204 | |||
205 | /** |
||
206 | * @param string $mimeType |
||
207 | */ |
||
208 | 5 | public function setMimeType($mimeType) |
|
212 | |||
213 | /** |
||
214 | * @return PhotoSize |
||
215 | */ |
||
216 | 2 | public function getThumb() |
|
220 | |||
221 | /** |
||
222 | * @param PhotoSize $thumb |
||
223 | */ |
||
224 | 5 | public function setThumb(PhotoSize $thumb) |
|
228 | |||
229 | /** |
||
230 | * @return int |
||
231 | */ |
||
232 | 1 | public function getWidth() |
|
236 | |||
237 | /** |
||
238 | * @param int $width |
||
239 | * |
||
240 | * @throws InvalidArgumentException |
||
241 | */ |
||
242 | 6 | public function setWidth($width) |
|
250 | } |
||
251 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.