1 | <?php |
||
7 | class MediaExporter |
||
8 | { |
||
9 | protected $media; |
||
10 | |||
11 | protected $disk; |
||
12 | |||
13 | protected $format; |
||
14 | |||
15 | protected $saveMethod = 'saveAudioOrVideo'; |
||
16 | |||
17 | public function __construct(Media $media) |
||
22 | |||
23 | protected function getFormat(): FormatInterface |
||
27 | |||
28 | public function inFormat(FormatInterface $format): MediaExporter |
||
34 | |||
35 | protected function getDisk(): Disk |
||
39 | |||
40 | public function toDisk($diskOrName): MediaExporter |
||
50 | |||
51 | public function save(string $path): Media |
||
65 | |||
66 | protected function moveSavedFileToRemoteDisk($localSourcePath, File $fileOnRemoteDisk): bool |
||
70 | |||
71 | private function getDestinationPathForSaving(File $file): string |
||
81 | |||
82 | private function saveAudioOrVideo(string $fullPath): MediaExporter |
||
88 | } |
||
89 |
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: