fixed CS
This commit is contained in:
parent
f39ed5706d
commit
bbad387e4b
@ -62,10 +62,8 @@ class StopwatchExtensionTest extends TestCase
|
||||
return array(
|
||||
array('{% stopwatch foo %}something{% endstopwatch %}', 'foo'),
|
||||
array('{% stopwatch foo %}symfony2 is fun{% endstopwatch %}{% stopwatch bar %}something{% endstopwatch %}', array('foo', 'bar')),
|
||||
|
||||
array('{% stopwatch foo %}something{% endstopwatch foo %}', 'foo'),
|
||||
|
||||
array("{% stopwatch 'foo.bar' %}something{% endstopwatch %}", 'foo.bar'),
|
||||
array('{% stopwatch "foo.bar" %}something{% endstopwatch %}', 'foo.bar'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class StopwatchTokenParser extends \Twig_TokenParser
|
||||
}
|
||||
|
||||
if (in_array($name, $this->_events)) {
|
||||
throw new \Twig_Error_Syntax(sprintf("The stopwatch event '%s' has already been defined", $name));
|
||||
throw new \Twig_Error_Syntax(sprintf('The stopwatch event "%s" has already been defined.', $name));
|
||||
}
|
||||
$this->_events[] = $name;
|
||||
|
||||
@ -53,7 +53,7 @@ class StopwatchTokenParser extends \Twig_TokenParser
|
||||
$value = $stream->next()->getValue();
|
||||
|
||||
if ($name != $value) {
|
||||
throw new \Twig_Error_Syntax(sprintf("Expected endstopwatch for event '%s' (but %s given)", $name, $value));
|
||||
throw new \Twig_Error_Syntax(sprintf('Expected endstopwatch for event "%s" (but "%s" given).', $name, $value));
|
||||
}
|
||||
}
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
|
Reference in New Issue
Block a user