| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| 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 | public function push(...$values) |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get and remove the last item from the collection. |
||
| 28 | * |
||
| 29 | * @return ContextNode |
||
| 30 | */ |
||
| 31 | public function pop() |
||
| 32 | { |
||
| 33 | return array_pop($this->items); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get the collection of items as JSON. |
||
| 38 | * |
||
| 39 | * @param int $options |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function toJson($options = 0) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |