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