1 | <?php |
||
13 | class Adapter extends AbstractAdapter |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $driver = "google"; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $providerClass = Provider::class; |
||
24 | |||
25 | /** |
||
26 | * @param $user |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | protected function mapUserDetails($user) |
||
37 | |||
38 | /** |
||
39 | * @return Quota |
||
40 | */ |
||
41 | public function getQuota() |
||
47 | |||
48 | /** |
||
49 | * @return Google_Service_Drive |
||
50 | */ |
||
51 | protected function makeService() |
||
70 | |||
71 | /** |
||
72 | * @param $sourcePath |
||
73 | * @param $destinationPath |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public function upload( $sourcePath, $destinationPath ) |
||
92 | |||
93 | /** |
||
94 | * @param $destinationPath |
||
95 | * |
||
96 | * @return Google_Service_Drive_DriveFile |
||
97 | */ |
||
98 | protected function prepareFile( $destinationPath ) |
||
107 | |||
108 | /** |
||
109 | * @param $sourcePath |
||
110 | * |
||
111 | * @return array |
||
112 | */ |
||
113 | protected function stat( $sourcePath ) |
||
122 | |||
123 | /** |
||
124 | * @param $path |
||
125 | * |
||
126 | * @return mixed |
||
127 | */ |
||
128 | protected function getFolderIdForPath( $path ) |
||
134 | |||
135 | /** |
||
136 | * @param $sourcePath |
||
137 | * @param Google_Service_Drive_DriveFile $file |
||
138 | * @param $filesize |
||
139 | * |
||
140 | * @return string |
||
141 | */ |
||
142 | protected function uploadChunked( $sourcePath, Google_Service_Drive_DriveFile $file, $filesize ) |
||
172 | |||
173 | /** |
||
174 | * @param array $folders |
||
175 | * @param string $parentFolderId |
||
176 | * |
||
177 | * @return mixed |
||
178 | */ |
||
179 | protected function prepareFolderTree( array $folders, $parentFolderId = 'root' ) |
||
199 | |||
200 | /** |
||
201 | * @param $name |
||
202 | * @param string $parentFolderId |
||
203 | * |
||
204 | * @return mixed |
||
205 | */ |
||
206 | protected function folderExists( $name, $parentFolderId = 'root' ) |
||
216 | } |
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: