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