Total Complexity | 14 |
Total Lines | 111 |
Duplicated Lines | 0 % |
Coverage | 32.26% |
Changes | 0 |
1 | <?php |
||
7 | abstract class AbstractCollectionMutator implements \Iterator, \ArrayAccess, \Countable |
||
8 | { |
||
9 | /** |
||
10 | * @var \SplFixedArray |
||
11 | */ |
||
12 | protected $set; |
||
13 | |||
14 | /** |
||
15 | * @return array |
||
16 | */ |
||
17 | public function all(): array |
||
18 | { |
||
19 | return $this->set->toArray(); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @return bool |
||
24 | */ |
||
25 | public function isNull(): bool |
||
26 | { |
||
27 | return count($this->set) === 0; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return int |
||
32 | */ |
||
33 | public function count(): int |
||
34 | { |
||
35 | return $this->set->count(); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | */ |
||
41 | 83 | public function rewind() |
|
42 | { |
||
43 | 83 | $this->set->rewind(); |
|
44 | 83 | } |
|
45 | |||
46 | /** |
||
47 | * @return mixed |
||
48 | */ |
||
49 | public function current() |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | 83 | public function key() |
|
58 | { |
||
59 | 83 | return $this->set->key(); |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * |
||
64 | */ |
||
65 | 83 | public function next() |
|
66 | { |
||
67 | 83 | $this->set->next(); |
|
68 | 83 | } |
|
69 | |||
70 | /** |
||
71 | * @return bool |
||
72 | */ |
||
73 | 83 | public function valid() |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param int $offset |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function offsetExists($offset) |
||
83 | { |
||
84 | return $this->set->offsetExists($offset); |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * @param int $offset |
||
89 | */ |
||
90 | public function offsetUnset($offset) |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * @param int $offset |
||
101 | * @return mixed |
||
102 | */ |
||
103 | public function offsetGet($offset) |
||
109 | } |
||
110 | |||
111 | /** |
||
112 | * @param int $offset |
||
113 | * @param mixed $value |
||
114 | */ |
||
115 | public function offsetSet($offset, $value) |
||
118 | } |
||
119 | } |
||
120 |