Total Complexity | 7 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | trait ListAccessTrait |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | 1 | public function has(int $index): bool |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 6 | public function get(int $index) |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param int $index |
||
37 | * @param mixed $element |
||
38 | * @return void |
||
39 | */ |
||
40 | 1 | public function set(int $index, $element): void |
|
41 | { |
||
42 | 1 | $this->array[$index] = $element; |
|
43 | 1 | } |
|
44 | |||
45 | /** |
||
46 | * @inheritDoc |
||
47 | */ |
||
48 | 2 | public function first() |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @inheritDoc |
||
59 | */ |
||
60 | 3 | public function last() |
|
67 |