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) |
||
23 | |||
24 | protected function getFormat(): FormatInterface |
||
28 | |||
29 | public function inFormat(FormatInterface $format): MediaExporter |
||
35 | |||
36 | protected function getDisk(): Disk |
||
40 | |||
41 | public function toDisk($diskOrName): MediaExporter |
||
51 | |||
52 | public function save(string $path): Media |
||
66 | |||
67 | protected function moveSavedFileToRemoteDisk($localSourcePath, File $fileOnRemoteDisk): bool |
||
71 | |||
72 | private function getDestinationPathForSaving(File $file): string |
||
82 | |||
83 | private function saveAudioOrVideo(string $fullPath): MediaExporter |
||
89 | } |
||
90 |
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: