public function Twig_Compiler::outdent in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/Compiler.php \Twig_Compiler::outdent()
Outdents the generated code.
Parameters
int $step The number of indentation to remove:
Return value
Twig_Compiler The current compiler instance
Throws
LogicException When trying to outdent too much so the indentation would become negative
File
- vendor/
twig/ twig/ lib/ Twig/ Compiler.php, line 261
Class
- Twig_Compiler
- Compiles a node to PHP code.
Code
public function outdent($step = 1) {
// can't outdent by more steps than the current indentation level
if ($this->indentation < $step) {
throw new LogicException('Unable to call outdent() as the indentation would become negative');
}
$this->indentation -= $step;
return $this;
}