1 | <?php |
||
7 | class MediaExporter |
||
8 | { |
||
9 | protected $media; |
||
10 | |||
11 | protected $disk; |
||
12 | |||
13 | protected $format; |
||
14 | |||
15 | protected $tmpDir; |
||
16 | |||
17 | protected $saveMethod = 'saveAudioOrVideo'; |
||
18 | |||
19 | public function __construct(Media $media) |
||
27 | |||
28 | protected function getFormat(): FormatInterface |
||
32 | |||
33 | public function inFormat(FormatInterface $format): MediaExporter |
||
39 | |||
40 | protected function getDisk(): Disk |
||
44 | |||
45 | public function toDisk($diskOrName): MediaExporter |
||
55 | |||
56 | public function setTempDir(string $tmpDir): MediaExporter |
||
62 | |||
63 | public function save(string $path): Media |
||
77 | |||
78 | protected function moveSavedFileToRemoteDisk($localSourcePath, File $fileOnRemoteDisk): bool |
||
82 | |||
83 | private function getDestinationPathForSaving(File $file): string |
||
93 | |||
94 | private function saveAudioOrVideo(string $fullPath): MediaExporter |
||
100 | } |
||
101 |
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: