Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
45 | 1 | public function uncheckValue($key): void |
|
46 | { |
||
47 | 1 | $value = $this->getValue(); |
|
48 | |||
49 | 1 | if (is_array($value) && in_array($key, $value, true)) { |
|
50 | 1 | $index = array_search($key, $value, true); |
|
51 | 1 | unset($value[$index]); |
|
52 | 1 | $this->setValue($value); |
|
53 | } else { |
||
54 | 1 | $this->setValue(null); |
|
55 | } |
||
58 |