1 | <?php |
||
15 | class Animation 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 | 'file_name' => true, |
||
37 | 'mime_type' => true, |
||
38 | 'file_size' => true |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * Identifier for this file, which can be used to download or reuse the file |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $fileId; |
||
47 | |||
48 | /** |
||
49 | * Unique identifier for this file, which is supposed |
||
50 | * to be thesame over time and for different bots. |
||
51 | * Can't be used to download or reuse the file. |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $fileUniqueId; |
||
56 | |||
57 | /** |
||
58 | * Video width as defined by sender |
||
59 | * |
||
60 | * @var int |
||
61 | */ |
||
62 | protected $width; |
||
63 | |||
64 | /** |
||
65 | * Video height as defined by sender |
||
66 | * |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $height; |
||
70 | |||
71 | /** |
||
72 | * Duration of the video in seconds as defined by sender |
||
73 | * |
||
74 | * @var int |
||
75 | */ |
||
76 | protected $duration; |
||
77 | |||
78 | /** |
||
79 | * Video thumbnail |
||
80 | * |
||
81 | * @var PhotoSize |
||
82 | */ |
||
83 | protected $thumb; |
||
84 | |||
85 | /** |
||
86 | * Optional. Animation thumbnail as defined by sender |
||
87 | * |
||
88 | * @var PhotoSize |
||
89 | */ |
||
90 | protected $fileName; |
||
91 | |||
92 | /** |
||
93 | * Optional. Mime type of a file as defined by sender |
||
94 | * |
||
95 | * @var string |
||
96 | */ |
||
97 | protected $mimeType; |
||
98 | |||
99 | /** |
||
100 | * Optional. File size |
||
101 | * |
||
102 | * @var int |
||
103 | */ |
||
104 | protected $fileSize; |
||
105 | |||
106 | /** |
||
107 | * @return int |
||
108 | */ |
||
109 | public function getDuration() |
||
113 | |||
114 | /** |
||
115 | * @param int $duration |
||
116 | * |
||
117 | * @throws InvalidArgumentException |
||
118 | */ |
||
119 | public function setDuration($duration) |
||
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getFileId() |
||
135 | |||
136 | /** |
||
137 | * @param string $fileId |
||
138 | */ |
||
139 | public function setFileId($fileId) |
||
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | public function getFileUniqueId() |
||
151 | |||
152 | /** |
||
153 | * @param string $fileId |
||
|
|||
154 | */ |
||
155 | public function setFileUniqueId($fileUniqueId) |
||
159 | |||
160 | /** |
||
161 | * @return int |
||
162 | */ |
||
163 | public function getFileSize() |
||
167 | |||
168 | /** |
||
169 | * @param int $fileSize |
||
170 | * |
||
171 | * @throws InvalidArgumentException |
||
172 | */ |
||
173 | public function setFileSize($fileSize) |
||
181 | |||
182 | /** |
||
183 | * @return int |
||
184 | */ |
||
185 | public function getHeight() |
||
189 | |||
190 | /** |
||
191 | * @param int $height |
||
192 | * |
||
193 | * @throws InvalidArgumentException |
||
194 | */ |
||
195 | public function setHeight($height) |
||
203 | |||
204 | /** |
||
205 | * @return string |
||
206 | */ |
||
207 | public function getMimeType() |
||
211 | |||
212 | /** |
||
213 | * @param string $mimeType |
||
214 | */ |
||
215 | public function setMimeType($mimeType) |
||
219 | |||
220 | /** |
||
221 | * @return PhotoSize |
||
222 | */ |
||
223 | public function getThumb() |
||
227 | |||
228 | /** |
||
229 | * @param PhotoSize $thumb |
||
230 | */ |
||
231 | public function setThumb(PhotoSize $thumb) |
||
235 | |||
236 | /** |
||
237 | * @return string $fileName |
||
238 | */ |
||
239 | public function getFileName() |
||
243 | |||
244 | /** |
||
245 | * @param string $fileName |
||
246 | */ |
||
247 | public function setFileName($fileName) |
||
251 | |||
252 | /** |
||
253 | * @return int |
||
254 | */ |
||
255 | public function getWidth() |
||
259 | |||
260 | /** |
||
261 | * @param int $width |
||
262 | * |
||
263 | * @throws InvalidArgumentException |
||
264 | */ |
||
265 | public function setWidth($width) |
||
273 | } |
||
274 |
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.