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