Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
87 | 1 | public function extend($data, $name = 'openimporter_cookie') |
|
88 | { |
||
89 | 1 | $cookie = $this->get($name); |
|
90 | |||
91 | 1 | if (!empty($data)) |
|
92 | { |
||
93 | 1 | if ($cookie !== false) |
|
94 | { |
||
95 | 1 | $merged = array_merge((array) $cookie, (array) $data); |
|
96 | } |
||
97 | else |
||
98 | { |
||
99 | $merged = $data; |
||
100 | } |
||
101 | |||
102 | 1 | return $this->set($merged, $name); |
|
103 | } |
||
104 | |||
105 | 1 | return false; |
|
106 | } |
||
108 |