mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +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)
|
protected function compileGetTemplateName(Compiler $compiler)
|
||||||
{
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->write("/**")
|
->write("/**\n")
|
||||||
->write(" * @codeCoverageIgnore")
|
->write(" * @codeCoverageIgnore\n")
|
||||||
->write(" */")
|
->write(" */\n")
|
||||||
->write("public function getTemplateName()\n", "{\n")
|
->write("public function getTemplateName()\n", "{\n")
|
||||||
->indent()
|
->indent()
|
||||||
->write('return ')
|
->write('return ')
|
||||||
@@ -412,9 +412,9 @@ final class ModuleNode extends Node
|
|||||||
}
|
}
|
||||||
|
|
||||||
$compiler
|
$compiler
|
||||||
->write("/**")
|
->write("/**\n")
|
||||||
->write(" * @codeCoverageIgnore")
|
->write(" * @codeCoverageIgnore\n")
|
||||||
->write(" */")
|
->write(" */\n")
|
||||||
->write("public function isTraitable()\n", "{\n")
|
->write("public function isTraitable()\n", "{\n")
|
||||||
->indent()
|
->indent()
|
||||||
->write(sprintf("return %s;\n", $traitable ? 'true' : 'false'))
|
->write(sprintf("return %s;\n", $traitable ? 'true' : 'false'))
|
||||||
@@ -426,9 +426,9 @@ final class ModuleNode extends Node
|
|||||||
protected function compileDebugInfo(Compiler $compiler)
|
protected function compileDebugInfo(Compiler $compiler)
|
||||||
{
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->write("/**")
|
->write("/**\n")
|
||||||
->write(" * @codeCoverageIgnore")
|
->write(" * @codeCoverageIgnore\n")
|
||||||
->write(" */")
|
->write(" */\n")
|
||||||
->write("public function getDebugInfo()\n", "{\n")
|
->write("public function getDebugInfo()\n", "{\n")
|
||||||
->indent()
|
->indent()
|
||||||
->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true))))
|
->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";
|
echo "foo";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getTemplateName()
|
public function getTemplateName()
|
||||||
{
|
{
|
||||||
return "foo.twig";
|
return "foo.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getDebugInfo()
|
public function getDebugInfo()
|
||||||
{
|
{
|
||||||
return array ( 37 => 1,);
|
return array ( 37 => 1,);
|
||||||
@@ -168,16 +174,25 @@ class __TwigTemplate_%x extends Template
|
|||||||
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
|
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getTemplateName()
|
public function getTemplateName()
|
||||||
{
|
{
|
||||||
return "foo.twig";
|
return "foo.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function isTraitable()
|
public function isTraitable()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getDebugInfo()
|
public function getDebugInfo()
|
||||||
{
|
{
|
||||||
return array ( 43 => 1, 41 => 2, 34 => 1,);
|
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));
|
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getTemplateName()
|
public function getTemplateName()
|
||||||
{
|
{
|
||||||
return "foo.twig";
|
return "foo.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function isTraitable()
|
public function isTraitable()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
public function getDebugInfo()
|
public function getDebugInfo()
|
||||||
{
|
{
|
||||||
return array ( 43 => 2, 41 => 4, 34 => 2,);
|
return array ( 43 => 2, 41 => 4, 34 => 2,);
|
||||||
|
|||||||
Reference in New Issue
Block a user