fixed CS
This commit is contained in:
parent
11f9497e50
commit
17d7186cf8
|
@ -36,7 +36,7 @@ class TransNode extends \Twig_Node
|
|||
$defaults = $this->getNode('vars');
|
||||
$vars = null;
|
||||
}
|
||||
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, (boolean) $vars);
|
||||
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, (bool) $vars);
|
||||
|
||||
$method = null === $this->getNode('count') ? 'trans' : 'transChoice';
|
||||
|
||||
|
|
|
@ -14,22 +14,17 @@ namespace Symfony\Bridge\Twig\Tests\Node;
|
|||
use Symfony\Bridge\Twig\Node\TransNode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Asmir Mustafic <goetas@gmail.com>
|
||||
*
|
||||
*/
|
||||
class TransNodeTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testCompileStrict()
|
||||
{
|
||||
$body = new \Twig_Node_Text('trans %var%', 0);
|
||||
$vars = new \Twig_Node_Expression_Name('foo', 0);
|
||||
$node = new TransNode($body, null, null, $vars);
|
||||
|
||||
$env = new \Twig_Environment(null, array(
|
||||
'strict_variables' => true,
|
||||
));
|
||||
$env = new \Twig_Environment(null, array('strict_variables' => true));
|
||||
$compiler = new \Twig_Compiler($env);
|
||||
|
||||
$this->assertEquals(
|
||||
|
@ -49,6 +44,7 @@ class TransNodeTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
return sprintf('$this->getContext($context, "%s", true)', $name);
|
||||
}
|
||||
|
||||
protected function getVariableGetterWithStrictCheck($name)
|
||||
{
|
||||
if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
|
||||
|
|
Reference in New Issue