7
7
use Google \Cloud \Storage \Bucket ;
8
8
use Google \Cloud \Storage \StorageClient ;
9
9
use Google \Cloud \Storage \StorageObject ;
10
- use League \Flysystem \AdapterInterface ;
11
10
use League \Flysystem \Adapter \AbstractAdapter ;
11
+ use League \Flysystem \AdapterInterface ;
12
12
use League \Flysystem \Config ;
13
13
use League \Flysystem \Util ;
14
14
@@ -83,6 +83,7 @@ public function setStorageApiUri($uri)
83
83
* Return the storage api uri.
84
84
*
85
85
* @param string $uri
86
+ *
86
87
* @return string
87
88
*/
88
89
public function getStorageApiUri ()
@@ -130,6 +131,7 @@ public function updateStream($path, $resource, Config $config)
130
131
* Returns an array of options from the config.
131
132
*
132
133
* @param Config $config
134
+ *
133
135
* @return array
134
136
*/
135
137
protected function getOptionsFromConfig (Config $ config )
@@ -143,7 +145,7 @@ protected function getOptionsFromConfig(Config $config)
143
145
// we therefore default to private
144
146
$ options ['predefinedAcl ' ] = $ this ->getPredefinedAclForVisibility (AdapterInterface::VISIBILITY_PRIVATE );
145
147
}
146
-
148
+
147
149
if ($ metadata = $ config ->get ('metadata ' )) {
148
150
$ options ['metadata ' ] = $ metadata ;
149
151
}
@@ -157,6 +159,7 @@ protected function getOptionsFromConfig(Config $config)
157
159
* @param string $path
158
160
* @param string|resource $contents
159
161
* @param Config $config
162
+ *
160
163
* @return array
161
164
*/
162
165
protected function upload ($ path , $ contents , Config $ config )
@@ -175,6 +178,7 @@ protected function upload($path, $contents, Config $config)
175
178
* Returns a dictionary of object metadata from an object.
176
179
*
177
180
* @param StorageObject $object
181
+ *
178
182
* @return array
179
183
*/
180
184
protected function normaliseObject (StorageObject $ object )
@@ -258,6 +262,7 @@ public function createDir($dirname, Config $config)
258
262
* Returns a normalised directory name from the given path.
259
263
*
260
264
* @param string $dirname
265
+ *
261
266
* @return string
262
267
*/
263
268
protected function normaliseDirName ($ dirname )
@@ -274,7 +279,7 @@ public function setVisibility($path, $visibility)
274
279
275
280
if ($ visibility === AdapterInterface::VISIBILITY_PRIVATE ) {
276
281
$ object ->acl ()->delete ('allUsers ' );
277
- } else if ($ visibility === AdapterInterface::VISIBILITY_PUBLIC ) {
282
+ } elseif ($ visibility === AdapterInterface::VISIBILITY_PUBLIC ) {
278
283
$ object ->acl ()->add ('allUsers ' , Acl::ROLE_READER );
279
284
}
280
285
@@ -375,7 +380,7 @@ public function getTimestamp($path)
375
380
public function getVisibility ($ path )
376
381
{
377
382
return [
378
- 'visibility ' => $ this ->getRawVisibility ($ path )
383
+ 'visibility ' => $ this ->getRawVisibility ($ path ),
379
384
];
380
385
}
381
386
@@ -385,6 +390,7 @@ public function getVisibility($path)
385
390
* Note: The file must have `AdapterInterface::VISIBILITY_PUBLIC` visibility.
386
391
*
387
392
* @param string $path
393
+ *
388
394
* @return string
389
395
*/
390
396
public function getUrl ($ path )
@@ -396,6 +402,7 @@ public function getUrl($path)
396
402
397
403
/**
398
404
* @param string $path
405
+ *
399
406
* @return string
400
407
*/
401
408
protected function getRawVisibility ($ path )
@@ -415,6 +422,7 @@ protected function getRawVisibility($path)
415
422
* Returns a storage object for the given path.
416
423
*
417
424
* @param string $path
425
+ *
418
426
* @return \Google\Cloud\Storage\StorageObject
419
427
*/
420
428
protected function getObject ($ path )
@@ -425,6 +433,7 @@ protected function getObject($path)
425
433
426
434
/**
427
435
* @param string $visibility
436
+ *
428
437
* @return string
429
438
*/
430
439
protected function getPredefinedAclForVisibility ($ visibility )
0 commit comments