| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 1 | public function compile(Twig_Compiler $compiler): Twig_Compiler |
|
| 32 | { |
||
| 33 | 1 | $setting = "'" . $this->getAttribute('name') . "'"; |
|
| 34 | |||
| 35 | return $compiler |
||
| 36 | 1 | ->addDebugInfo($this) |
|
| 37 | 1 | ->raw('if (!array_key_exists(' . $setting . ', $context)) {') |
|
| 38 | 1 | ->raw('$context[' . $setting . '] = [];') |
|
| 39 | 1 | ->raw('}') |
|
| 40 | 1 | ->raw('$context[' . $setting . '] = array_replace_recursive(') |
|
| 41 | 1 | ->subcompile($this->getNode('value')) |
|
| 42 | 1 | ->raw(', $context[' . $setting . ']);'); |
|
| 43 | } |
||
| 45 | } |