Fix tests and CS

This commit is contained in:
Fabien Potencier
2023-11-21 14:57:52 +01:00
parent 9f42a76306
commit 4be326aeeb
2 changed files with 33 additions and 9 deletions
+9 -9
View File
@@ -355,9 +355,9 @@ final class ModuleNode extends Node
protected function compileGetTemplateName(Compiler $compiler)
{
$compiler
->write("/**")
->write(" * @codeCoverageIgnore")
->write(" */")
->write("/**\n")
->write(" * @codeCoverageIgnore\n")
->write(" */\n")
->write("public function getTemplateName()\n", "{\n")
->indent()
->write('return ')
@@ -412,9 +412,9 @@ final class ModuleNode extends Node
}
$compiler
->write("/**")
->write(" * @codeCoverageIgnore")
->write(" */")
->write("/**\n")
->write(" * @codeCoverageIgnore\n")
->write(" */\n")
->write("public function isTraitable()\n", "{\n")
->indent()
->write(sprintf("return %s;\n", $traitable ? 'true' : 'false'))
@@ -426,9 +426,9 @@ final class ModuleNode extends Node
protected function compileDebugInfo(Compiler $compiler)
{
$compiler
->write("/**")
->write(" * @codeCoverageIgnore")
->write(" */")
->write("/**\n")
->write(" * @codeCoverageIgnore\n")
->write(" */\n")
->write("public function getDebugInfo()\n", "{\n")
->indent()
->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true))))
+24
View File
@@ -97,11 +97,17 @@ class __TwigTemplate_%x extends Template
echo "foo";
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "foo.twig";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 37 => 1,);
@@ -168,16 +174,25 @@ class __TwigTemplate_%x extends Template
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "foo.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 43 => 1, 41 => 2, 34 => 1,);
@@ -248,16 +263,25 @@ class __TwigTemplate_%x extends Template
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "foo.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 43 => 2, 41 => 4, 34 => 2,);