Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 81.25% |
Changes | 0 |
1 | <?php |
||
8 | class ContextNodeCollection extends Collection |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Push one or more items onto the end of the collection. |
||
13 | * |
||
14 | * @param ContextNode|ContextNode[] $values [optional] |
||
15 | * @return $this |
||
16 | */ |
||
17 | 1 | public function push(...$values) |
|
18 | { |
||
19 | 1 | foreach ($values as $value) { |
|
20 | 1 | $this->items[] = $value; |
|
21 | } |
||
22 | |||
23 | 1 | return $this; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * Get and remove the last item from the collection. |
||
28 | * |
||
29 | * @return ContextNode |
||
30 | */ |
||
31 | public function pop() |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Get the collection of items as JSON. |
||
38 | * |
||
39 | * @param int $options |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function toJson($options = 0) |
|
61 |