Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
57 | 3 | public function clear(): bool |
|
58 | { |
||
59 | 3 | if (!$this->cache->has($this->key)) { |
|
60 | 1 | return true; |
|
61 | } |
||
62 | 2 | $result = $this->cache->delete($this->key); |
|
63 | 2 | if ($result === false) { |
|
64 | 1 | throw new SchemaProviderException(\sprintf('Unable to delete `%s` from cache.', $this->key)); |
|
65 | } |
||
66 | 1 | return true; |
|
67 | } |
||
74 |