You are here

public function Twig_Compiler::addIndentation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Compiler.php \Twig_Compiler::addIndentation()

Appends an indentation to the current PHP code after compilation.

Return value

Twig_Compiler The current compiler instance

2 calls to Twig_Compiler::addIndentation()
Twig_Compiler::subcompile in vendor/twig/twig/lib/Twig/Compiler.php
Twig_Compiler::write in vendor/twig/twig/lib/Twig/Compiler.php
Writes a string to the compiled code by adding indentation.

File

vendor/twig/twig/lib/Twig/Compiler.php, line 137

Class

Twig_Compiler
Compiles a node to PHP code.

Code

public function addIndentation() {
  $this->source .= str_repeat(' ', $this->indentation * 4);
  return $this;
}