| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 6 | public function compile(Compiler $compiler): void |
|
| 44 | { |
||
| 45 | 6 | if ($this->module->hasAttribute('is_embedded')) { |
|
| 46 | 1 | return; |
|
| 47 | } |
||
| 48 | |||
| 49 | 6 | $presentationModel = $this->findPresentationModel->for($this->getSourceContext()); |
|
| 50 | |||
| 51 | $compiler |
||
| 52 | 6 | ->write("\$presentationModel = new $presentationModel(\$context);\n") |
|
| 53 | 6 | ->write("\$originalContext = \$context;\n\n") |
|
| 54 | 6 | ->write("\$callback = function (array \$context) use (\$blocks, \$originalContext, \$macros) {\n") |
|
| 55 | 6 | ->indent() |
|
| 56 | 6 | ->write("\$suppressedException = null;\n\n"); |
|
| 57 | 6 | } |
|
| 59 |