Total Complexity | 9 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 88.89% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class ArrayStack extends AbstractCollection implements Stack, IndexIterable |
||
14 | { |
||
15 | |||
16 | use RemoveTraverseTrait; |
||
17 | |||
18 | /** |
||
19 | * Adds element to the top of stack |
||
20 | * |
||
21 | * @param $element |
||
22 | * |
||
23 | * @return bool |
||
24 | */ |
||
25 | 1 | public function push($element): bool |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * Gets element from the top of stack |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | 2 | public function pop() |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Retrieves, but does not remove |
||
46 | * |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 3 | public function peek() |
|
56 | } |
||
57 | |||
58 | 1 | public function stream(): Stream |
|
61 | } |
||
62 | |||
63 | public function parallelStream($workersPool = null): Stream |
||
64 | { |
||
65 | return new ParallelStream($this, $workersPool); |
||
66 | } |
||
67 | |||
68 | 11 | public function toArray(): array |
|
71 | } |
||
72 | |||
73 | 5 | public function getIndexIterator(): Iterator |
|
76 | } |
||
77 | } |
||
78 |