1 | <?php namespace Nord\Lumen\FileManager\Adapters; |
||
7 | abstract class DiskAdapter implements AdapterContract |
||
8 | { |
||
9 | const DEFAULT_DIRECTORY = 'files'; |
||
10 | |||
11 | /** |
||
12 | * @var Filesystem |
||
13 | */ |
||
14 | private $filesystem; |
||
15 | |||
16 | /** |
||
17 | * @var null|string |
||
18 | */ |
||
19 | private $directory; |
||
20 | |||
21 | |||
22 | /** |
||
23 | * @inheritdoc |
||
24 | */ |
||
25 | abstract public function getName(); |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @inheritdoc |
||
30 | */ |
||
31 | abstract public function getFileUrl(File $file, array $options); |
||
32 | |||
33 | |||
34 | /** |
||
35 | * FilesystemAdapter constructor. |
||
36 | * |
||
37 | * @param array $config |
||
38 | */ |
||
39 | public function __construct(array $config) |
||
43 | |||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | public function saveFile($path, $contents, array $options) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function fileExists(File $file, array $options) |
||
61 | |||
62 | |||
63 | /** |
||
64 | * @inheritdoc |
||
65 | */ |
||
66 | public function deleteFile(File $file, array $options) |
||
70 | |||
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | public function getFilePath(File $file, array $options) |
||
79 | |||
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | public function setFilesystem(Filesystem $filesystem) |
||
88 | |||
89 | |||
90 | /** |
||
91 | * @param array $config |
||
92 | */ |
||
93 | protected function configure(array $config) |
||
97 | |||
98 | |||
99 | /** |
||
100 | * @param File $file |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | protected function createFilePath(File $file) |
||
108 | } |
||
109 |
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: