Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 0 |
1 | <?php |
||
12 | class StaticBufferCollection extends StaticCollection |
||
|
|||
13 | { |
||
14 | /** |
||
15 | * @var BufferInterface[] |
||
16 | */ |
||
17 | protected $set = []; |
||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $position = 0; |
||
23 | |||
24 | /** |
||
25 | * StaticBufferCollection constructor. |
||
26 | * @param BufferInterface ...$values |
||
27 | */ |
||
28 | 362 | public function __construct(BufferInterface... $values) |
|
31 | 362 | } |
|
32 | |||
33 | /** |
||
34 | * @return BufferInterface |
||
35 | */ |
||
36 | 24 | public function bottom(): BufferInterface |
|
37 | { |
||
38 | 24 | return parent::bottom(); |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return BufferInterface |
||
43 | */ |
||
44 | public function top(): BufferInterface |
||
45 | { |
||
46 | return parent::top(); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return BufferInterface |
||
51 | */ |
||
52 | 339 | public function current(): BufferInterface |
|
53 | { |
||
54 | 339 | return $this->set[$this->position]; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param int $offset |
||
59 | * @return BufferInterface |
||
60 | */ |
||
61 | 264 | public function offsetGet($offset) |
|
68 | } |
||
69 | } |
||
70 |