* enhanced error messages when an unexpected token is parsed in an expression
* fixed filename not being added to syntax error messages
* added the autoescape option to enable/disable autoescaping
- * removed the newline after a comment (mimicks PHP behavior)
+ * removed the newline after a comment (mimics PHP behavior)
* added a syntax error exception when parent block is used on a template that does not extend another one
* made the Escaper extension enabled by default
* fixed sandbox extension when used with auto output escaping
*/
/**
- * Evaluates an expression, disgarding the returned value.
+ * Evaluates an expression, discarding the returned value.
*/
class Twig_TokenParser_Do extends Twig_TokenParser
{
$stream->expect(Twig_Token::BLOCK_END_TYPE);
if (count($names) !== count($values)) {
- throw new Twig_Error_Syntax("When using set, you must have the same number of variables and assignements.", $stream->getCurrent()->getLine(), $stream->getFilename());
+ throw new Twig_Error_Syntax("When using set, you must have the same number of variables and assignments.", $stream->getCurrent()->getLine(), $stream->getFilename());
}
} else {
$capture = true;
2. Conditional expression with only literals
{{ true ? "<br />" : "<br>" }}
-3. Conditonal expression with a variable
+3. Conditional expression with a variable
{{ true ? "<br />" : someVar }}
4. Nested conditionals with only literals
2. Conditional expression with only literals
<br />
-3. Conditonal expression with a variable
+3. Conditional expression with a variable
<br />
4. Nested conditionals with only literals
* @expectedException Twig_Error_Syntax
* @expectedExceptionMessage Unknown tag name "foo". Did you mean "for" at line 1
*/
- public function testUnkownTag()
+ public function testUnknownTag()
{
$stream = new Twig_TokenStream(array(
new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1),
public function testGetAttributeWithSandbox($object, $item, $allowed, $useExt)
{
$twig = new Twig_Environment();
- $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(/*methid*/), array(/*peop*/), array());
+ $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(/*method*/), array(/*prop*/), array());
$twig->addExtension(new Twig_Extension_Sandbox($policy, !$allowed));
$template = new Twig_TemplateTest($twig, $useExt);
'.' => '.',
'-' => '-',
'_' => '_',
- /* Basic alnums exluded */
+ /* Basic alnums excluded */
'a' => 'a',
'A' => 'A',
'z' => 'z',
',' => ',',
'.' => '.',
'_' => '_',
- /* Basic alnums exluded */
+ /* Basic alnums excluded */
'a' => 'a',
'A' => 'A',
'z' => 'z',
',' => '\\2C ',
'.' => '\\2E ',
'_' => '\\5F ',
- /* Basic alnums exluded */
+ /* Basic alnums excluded */
'a' => 'a',
'A' => 'A',
'z' => 'z',