Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
27 | public function handle($params = []) |
||
28 | { |
||
29 | $bucketName = $params['bucket']; |
||
30 | $keyName = $params['key']; |
||
31 | |||
32 | if ($this->client->hasEncoder()) { |
||
33 | $keyName = $this->client->getEncoder()->encode($keyName); |
||
34 | } |
||
35 | |||
36 | if ($this->client->hasCache() and $this->client->getCache()->has($bucketName, $keyName)) { |
||
37 | return true; |
||
38 | } |
||
39 | |||
40 | return $this->client->getConn()->doesObjectExist($bucketName, $keyName); |
||
41 | } |
||
56 |