Conditions | 4 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 4 | public function merge($array, array $options = []): self |
|
26 | { |
||
27 | 4 | $options = array_merge(['recursive' => false], $options); |
|
28 | |||
29 | 4 | if ($options['recursive']) { |
|
30 | 2 | $this->array = array_merge_recursive($this->array, $array instanceof Chain ? $array->array : $array); |
|
31 | } else { |
||
32 | 2 | $this->array = array_merge($this->array, $array instanceof Chain ? $array->array : $array); |
|
33 | } |
||
34 | |||
35 | 4 | return $this; |
|
36 | } |
||
38 |