1 | <?php |
||
12 | class DefaultFilesystem implements Filesystem |
||
13 | { |
||
14 | /** @var \Illuminate\Contracts\Filesystem\Factory */ |
||
15 | protected $filesystem; |
||
16 | |||
17 | /** @var array */ |
||
18 | protected $customRemoteHeaders = []; |
||
19 | |||
20 | public function __construct(Factory $filesystems) |
||
24 | |||
25 | /* |
||
26 | * Add a file to the mediaLibrary for the given media. |
||
27 | */ |
||
28 | public function add(string $file, Media $media, string $targetFileName = '') |
||
36 | |||
37 | /* |
||
38 | * Copy a file to the medialibrary for the given $media. |
||
39 | */ |
||
40 | public function copyToMediaLibrary(string $pathToFile, Media $media, bool $conversions = false, string $targetFileName = '') |
||
63 | |||
64 | /** |
||
65 | * Add custom remote headers on runtime. |
||
66 | * |
||
67 | * @param array $customRemoteHeaders |
||
68 | */ |
||
69 | public function addCustomRemoteHeaders(array $customRemoteHeaders) |
||
73 | |||
74 | /* |
||
75 | * Get the headers to be used when copying the |
||
76 | * given file to a remote filesytem. |
||
77 | */ |
||
78 | public function getRemoteHeadersForFile(string $file) : array |
||
86 | |||
87 | /* |
||
88 | * Copy a file from the medialibrary to the given targetFile. |
||
89 | */ |
||
90 | public function copyFromMediaLibrary(Media $media, string $targetFile): string |
||
102 | |||
103 | /* |
||
104 | * Remove all files for the given media. |
||
105 | */ |
||
106 | public function removeFiles(Media $media) |
||
117 | |||
118 | /* |
||
119 | * Rename a file for the given media. |
||
120 | */ |
||
121 | public function renameFile(Media $media, string $oldName) |
||
128 | |||
129 | /* |
||
130 | * Return the directory where all files of the given media are stored. |
||
131 | */ |
||
132 | public function getMediaDirectory(Media $media, bool $conversion = false) : string |
||
146 | |||
147 | /* |
||
148 | * Return the directory where all conversions of the given media are stored. |
||
149 | */ |
||
150 | public function getConversionDirectory(Media $media) : string |
||
154 | } |
||
155 |
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: