@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | try{ |
| 272 | 272 | $this->client->deleteObject($bucket, $object); |
| 273 | - }catch (OssException $e) { |
|
| 273 | + } catch (OssException $e) { |
|
| 274 | 274 | $this->logErr(__FUNCTION__, $e); |
| 275 | 275 | return false; |
| 276 | 276 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | $result['objects'][] = $object; |
| 363 | 363 | } |
| 364 | - }else{ |
|
| 364 | + } else{ |
|
| 365 | 365 | $result["objects"] = []; |
| 366 | 366 | } |
| 367 | 367 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | foreach ($prefixList as $prefixInfo) { |
| 370 | 370 | $result['prefix'][] = $prefixInfo->getPrefix(); |
| 371 | 371 | } |
| 372 | - }else{ |
|
| 372 | + } else{ |
|
| 373 | 373 | $result['prefix'] = []; |
| 374 | 374 | } |
| 375 | 375 | |
@@ -525,8 +525,9 @@ discard block |
||
| 525 | 525 | */ |
| 526 | 526 | public function getMimetype($path) |
| 527 | 527 | { |
| 528 | - if( $object = $this->getMetadata($path)) |
|
| 529 | - $object['mimetype'] = $object['content-type']; |
|
| 528 | + if( $object = $this->getMetadata($path)) { |
|
| 529 | + $object['mimetype'] = $object['content-type']; |
|
| 530 | + } |
|
| 530 | 531 | return $object; |
| 531 | 532 | } |
| 532 | 533 | |
@@ -535,8 +536,9 @@ discard block |
||
| 535 | 536 | */ |
| 536 | 537 | public function getTimestamp($path) |
| 537 | 538 | { |
| 538 | - if( $object = $this->getMetadata($path)) |
|
| 539 | - $object['timestamp'] = strtotime( $object['last-modified'] ); |
|
| 539 | + if( $object = $this->getMetadata($path)) { |
|
| 540 | + $object['timestamp'] = strtotime( $object['last-modified'] ); |
|
| 541 | + } |
|
| 540 | 542 | return $object; |
| 541 | 543 | } |
| 542 | 544 | |
@@ -555,7 +557,7 @@ discard block |
||
| 555 | 557 | |
| 556 | 558 | if ($acl == OssClient::OSS_ACL_TYPE_PUBLIC_READ ){ |
| 557 | 559 | $res['visibility'] = AdapterInterface::VISIBILITY_PUBLIC; |
| 558 | - }else{ |
|
| 560 | + } else{ |
|
| 559 | 561 | $res['visibility'] = AdapterInterface::VISIBILITY_PRIVATE; |
| 560 | 562 | } |
| 561 | 563 | |
@@ -570,7 +572,9 @@ discard block |
||
| 570 | 572 | */ |
| 571 | 573 | public function getUrl( $path ) |
| 572 | 574 | { |
| 573 | - if (!$this->has($path)) throw new FileNotFoundException($path.' not found'); |
|
| 575 | + if (!$this->has($path)) { |
|
| 576 | + throw new FileNotFoundException($path.' not found'); |
|
| 577 | + } |
|
| 574 | 578 | return ( $this->ssl ? 'https://' : 'http://' ) . ( $this->isCname ? ( $this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain ) : $this->bucket . '.' . $this->endPoint ) . '/' . ltrim($path, '/'); |
| 575 | 579 | } |
| 576 | 580 | |
@@ -584,8 +588,9 @@ discard block |
||
| 584 | 588 | * @throws OssException |
| 585 | 589 | */ |
| 586 | 590 | public function getTemporaryUrl($path, $expire, $options) { |
| 587 | - if (!$this->has($path)) |
|
| 588 | - throw new FileNotFoundException($path.' not found'); |
|
| 591 | + if (!$this->has($path)) { |
|
| 592 | + throw new FileNotFoundException($path.' not found'); |
|
| 593 | + } |
|
| 589 | 594 | $method = OssClient::OSS_HTTP_GET; |
| 590 | 595 | if (Arr::has($options, OssClient::OSS_METHOD)) { |
| 591 | 596 | $method = $options['method']; |