1 | <?php |
||
7 | class Display |
||
8 | { |
||
9 | |||
10 | protected $mediaFile; |
||
11 | |||
12 | /** |
||
13 | * Display constructor. |
||
14 | * @param MediaFile $mediaFile |
||
15 | */ |
||
16 | public function __construct(MediaFile $mediaFile) |
||
20 | |||
21 | /** |
||
22 | * Get the HTML to display a preview image if possible, otherwise show an icon |
||
23 | * |
||
24 | * @param int $w bounding box width to resize pixel based images to |
||
25 | * @param int $h bounding box height to resize pixel based images to |
||
26 | * @return string |
||
27 | */ |
||
28 | public function getPreviewHtml($w, $h) |
||
38 | |||
39 | /** |
||
40 | * Return the URL to the icon for this file |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getIconUrl() |
||
50 | |||
51 | /** @return string */ |
||
52 | protected function formatDate() |
||
56 | |||
57 | /** |
||
58 | * Output the image dimension if any |
||
59 | * |
||
60 | * @param string $empty what to show when no dimensions are available |
||
61 | * @return string |
||
62 | */ |
||
63 | protected function formatDimensions($empty = ' ') |
||
73 | |||
74 | /** @return string */ |
||
75 | protected function formatFileSize() |
||
79 | } |
||
80 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: