Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ArrayProcessor implements Arrayable |
||
9 | { |
||
10 | protected $items = []; |
||
11 | |||
12 | public function of(array $items): self |
||
17 | } |
||
18 | |||
19 | public function push($value): self |
||
20 | { |
||
21 | array_push($this->items, $value); |
||
22 | |||
23 | return $this; |
||
24 | } |
||
25 | |||
26 | public function unique(): self |
||
31 | } |
||
32 | |||
33 | public function values(): self |
||
34 | { |
||
35 | $this->items = array_values($this->items); |
||
36 | |||
37 | return $this; |
||
38 | } |
||
39 | |||
40 | public function sort(): self |
||
41 | { |
||
42 | $this->items = ArrHelper::sort($this->items); |
||
43 | |||
44 | return $this; |
||
45 | } |
||
46 | |||
47 | public function filter(callable $callback): self |
||
52 | } |
||
53 | |||
54 | public function toArray(): array |
||
57 | } |
||
58 | } |
||
59 |