public function Twig_Compiler::outdent in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/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/ Compiler.php, line 260
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;
}