Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function compile(Compiler $compiler): void |
||
34 | { |
||
35 | $profileName = $this->getNode('profile'); |
||
36 | if ($profileName !== null) { |
||
37 | $profileName = $profileName->attributes['value'] ?? ''; |
||
38 | if (!empty($profileName)) { |
||
39 | $compiler |
||
40 | ->addDebugInfo($this) |
||
41 | ->write(TwigProfiler::class . "::\$plugin->profile->begin('" . $profileName . "');\n") |
||
42 | ->indent() |
||
43 | ->subcompile($this->getNode('body')) |
||
44 | ->outdent() |
||
45 | ->write(TwigProfiler::class . "::\$plugin->profile->end('" . $profileName . "');\n"); |
||
46 | } |
||
50 |