mirror of
https://github.com/phpbb/phpbb.git
synced 2025-10-11 23:14:34 +02:00
[feature/twig] Fix indentation
PHPBB3-11598
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
|
||||
class phpbb_template_twig_node_include extends Twig_Node_Include
|
||||
{
|
||||
/**
|
||||
* Compiles the node to PHP.
|
||||
*
|
||||
* @param Twig_Compiler A Twig_Compiler instance
|
||||
*/
|
||||
public function compile(Twig_Compiler $compiler)
|
||||
{
|
||||
$compiler->addDebugInfo($this);
|
||||
/**
|
||||
* Compiles the node to PHP.
|
||||
*
|
||||
* @param Twig_Compiler A Twig_Compiler instance
|
||||
*/
|
||||
public function compile(Twig_Compiler $compiler)
|
||||
{
|
||||
$compiler->addDebugInfo($this);
|
||||
|
||||
$compiler
|
||||
->write("\$location = ")
|
||||
@@ -26,15 +26,15 @@ class phpbb_template_twig_node_include extends Twig_Node_Include
|
||||
->write("if (strpos(\$location, '@') === 0) {\n")
|
||||
->indent()
|
||||
->write("\$namespace = substr(\$location, 1, strpos(\$location, '/') - 1);\n")
|
||||
->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n")
|
||||
->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n")
|
||||
|
||||
// We set the namespace lookup order to be this namespace first, then the main path
|
||||
->write("\$this->env->setNamespaceLookUpOrder(array(\$namespace, '__main__'));\n")
|
||||
// We set the namespace lookup order to be this namespace first, then the main path
|
||||
->write("\$this->env->setNamespaceLookUpOrder(array(\$namespace, '__main__'));\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
;
|
||||
|
||||
parent::compile($compiler);
|
||||
parent::compile($compiler);
|
||||
|
||||
$compiler
|
||||
->write("if (\$namespace) {\n")
|
||||
@@ -42,6 +42,6 @@ class phpbb_template_twig_node_include extends Twig_Node_Include
|
||||
->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
;
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user