simplified code

This commit is contained in:
Fabien Potencier
2019-04-12 12:19:21 +02:00
parent a6dd76d5a0
commit c576797ebc
+1 -5
View File
@@ -193,6 +193,7 @@ class ModuleNode extends Node
$node = $trait->getNode('template');
$compiler
->addDebugInfo($node)
->write(sprintf('$_trait_%s = $this->loadTemplate(', $i))
->subcompile($node)
->raw(', ')
@@ -200,11 +201,6 @@ class ModuleNode extends Node
->raw(', ')
->repr($node->getTemplateLine())
->raw(");\n")
;
$node = $trait->getNode('template');
$compiler
->addDebugInfo($node)
->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i))
->indent()
->write("throw new RuntimeError('Template \"'.")