| Conditions | 4 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.7691 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 1 | public function handle($params = []) |
|
| 31 | { |
||
| 32 | 1 | $bucketName = $params['bucket']; |
|
| 33 | |||
| 34 | try { |
||
| 35 | 1 | $result = $this->client->getConn()->getBucketLifecycle([ |
|
| 36 | 1 | 'Bucket' => $bucketName |
|
| 37 | ]); |
||
| 38 | |||
| 39 | 1 | if (null !== $this->commandHandlerLogger) { |
|
| 40 | 1 | $this->commandHandlerLogger->log($this, sprintf('LifeCycleConfiguration of \'%s\' bucket was successfully obtained', $bucketName)); |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | return $result; |
|
| 44 | } catch (S3Exception $e) { |
||
| 45 | if (null !== $this->commandHandlerLogger) { |
||
| 46 | $this->commandHandlerLogger->logExceptionAndReturnFalse($e); |
||
| 47 | } |
||
| 48 | |||
| 49 | throw $e; |
||
| 50 | } |
||
| 63 |