| Total Complexity | 9 |
| Total Lines | 86 |
| Duplicated Lines | 0 % |
| Coverage | 60.87% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class ProxyService implements ArrayAccess |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $data = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $key |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | public function has(string $key): bool |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritDoc |
||
| 33 | */ |
||
| 34 | public function offsetExists($offset): bool |
||
| 35 | { |
||
| 36 | return array_key_exists($offset, $this->data); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $key |
||
| 41 | * @return int |
||
| 42 | */ |
||
| 43 | public function get(string $key): int |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @inheritDoc |
||
| 50 | */ |
||
| 51 | 1 | public function offsetGet($offset): int |
|
| 52 | { |
||
| 53 | 1 | return $this->data[$offset] ?? 0; |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $key |
||
| 58 | * @param int $value |
||
| 59 | * @return static |
||
| 60 | */ |
||
| 61 | public function set(string $key, int $value): self |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @inheritDoc |
||
| 69 | */ |
||
| 70 | 1 | public function offsetSet($offset, $value): void |
|
| 71 | { |
||
| 72 | 1 | $this->data[$offset] = $value; |
|
| 73 | 1 | } |
|
| 74 | |||
| 75 | /** |
||
| 76 | * @param string $key |
||
| 77 | * @return static |
||
| 78 | */ |
||
| 79 | 1 | public function remove(string $key): self |
|
| 80 | { |
||
| 81 | 1 | $this->offsetUnset($key); |
|
| 82 | 1 | return $this; |
|
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @inheritDoc |
||
| 87 | */ |
||
| 88 | 1 | public function offsetUnset($offset): void |
|
| 91 | 1 | } |
|
| 92 | |||
| 93 | /** |
||
| 94 | * @return void |
||
| 95 | */ |
||
| 96 | 89 | public function fresh(): void |
|
| 103 |