1 | <?php |
||
22 | class ArrayList extends AbstractList |
||
23 | { |
||
24 | /** |
||
25 | * @var ValueType[] |
||
26 | */ |
||
27 | protected $data = []; |
||
28 | |||
29 | /** |
||
30 | * {@inheritDoc} |
||
31 | */ |
||
32 | 5 | public function add($item) |
|
33 | { |
||
34 | 5 | $this->data[] = $item; |
|
35 | 5 | } |
|
36 | |||
37 | /** |
||
38 | * {@inheritDoc} |
||
39 | */ |
||
40 | 1 | public function get(int $index) |
|
44 | |||
45 | /** |
||
46 | * {@inheritDoc} |
||
47 | */ |
||
48 | 1 | public function splice |
|
57 | |||
58 | /** |
||
59 | * {@inheritDoc} |
||
60 | */ |
||
61 | 3 | public function getIterator() |
|
65 | |||
66 | /** |
||
67 | * {@inheritDoc} |
||
68 | */ |
||
69 | 3 | public function size() : int |
|
73 | } |
||
74 | |||
75 |