Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
33 | 6 | } |
|
34 | |||
35 | 6 | public function setAttr(array $name, array &$context, mixed $value): static |
|
36 | { |
||
37 | 6 | $current = array_shift($name); |
|
38 | 1 | ||
39 | if (count($name) === 0) { |
||
40 | $this->setValueToContext($current, $context, $value); |
||
41 | 6 | return $this; |
|
42 | 5 | } |
|
43 | 6 | ||
44 | if (!array_key_exists($current, $context) || !is_array($context[$current])) { |
||
45 | $context[$current] = []; |
||
62 |