mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-28 19:17:37 +00:00
Fix tests and CS
This commit is contained in:
@@ -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))))
|
||||
|
||||
@@ -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,);
|
||||
|
||||
Reference in New Issue
Block a user