| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 24 | 
| Code Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 26 | public function compile(Twig_Compiler $compiler) | ||
| 27 |     { | ||
| 28 | $compiler | ||
| 29 | ->addDebugInfo($this) | ||
| 30 |             ->write('$restoreStrict = $this->env->isStrictVariables();' . PHP_EOL) | ||
| 31 |             ->write('$setStrict = (bool)') | ||
| 32 | ->subcompile($this->nodes['expr']) | ||
| 33 |             ->write(';'); | ||
| 34 | |||
| 35 | $compiler | ||
| 36 |             ->write('if ($setStrict) { ' . PHP_EOL) | ||
| 37 |             ->write('    $this->env->enableStrictVariables();' . PHP_EOL) | ||
| 38 |             ->write('} else {' . PHP_EOL) | ||
| 39 |             ->write('    $this->env->disableStrictVariables();' . PHP_EOL) | ||
| 40 |             ->write('}'); | ||
| 41 | |||
| 42 | $compiler->subcompile($this->nodes['body']); | ||
| 43 | |||
| 44 | $compiler | ||
| 45 |             ->write('if ($restoreStrict) { ' . PHP_EOL) | ||
| 46 |             ->write('    $this->env->enableStrictVariables();' . PHP_EOL) | ||
| 47 |             ->write('} else {' . PHP_EOL) | ||
| 48 |             ->write('    $this->env->disableStrictVariables();' . PHP_EOL) | ||
| 49 |             ->write('}'); | ||
| 50 | } | ||
| 52 |