| Total Complexity | 8 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class LockerManager |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var LockerStoreInterface |
||
| 20 | */ |
||
| 21 | private $store; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * LockerManager constructor. |
||
| 25 | * @param LockerStoreInterface $store |
||
| 26 | */ |
||
| 27 | public function __construct(LockerStoreInterface $store) |
||
| 28 | { |
||
| 29 | $this->store = $store; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Lock $lock |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | public function acquire(Lock $lock) |
||
| 37 | { |
||
| 38 | return $this->store->acquire($lock); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | public function clear() |
||
| 45 | { |
||
| 46 | return $this->store->clear(); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param $key |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function delete($key) |
||
| 54 | { |
||
| 55 | return $this->store->delete($key); |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param $key |
||
| 60 | * @return mixed |
||
| 61 | */ |
||
| 62 | public function exists($key) |
||
| 63 | { |
||
| 64 | return $this->store->exists($key); |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param $key |
||
| 69 | * @return mixed |
||
| 70 | */ |
||
| 71 | public function get($key) |
||
| 72 | { |
||
| 73 | return $this->store->get($key); |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return mixed |
||
| 78 | */ |
||
| 79 | public function getAll() |
||
| 80 | { |
||
| 81 | return $this->store->getAll(); |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param $key |
||
| 86 | * @param $payload |
||
| 87 | * @return mixed |
||
| 88 | */ |
||
| 89 | public function update($key, $payload) |
||
| 92 | } |
||
| 93 | } |
||
| 94 |