Skip to content

Commit

Permalink
various cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
cordoval authored and fabpot committed Nov 12, 2013
1 parent 10da58c commit cb651e8
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/Twig/ExistsLoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface Twig_ExistsLoaderInterface
*
* @param string $name The name of the template to check if we can load
*
* @return boolean If the template source code is handled by this loader or not
* @return Boolean If the template source code is handled by this loader or not
*/
public function exists($name);
}
2 changes: 1 addition & 1 deletion lib/Twig/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getTokenParsers()
/**
* Returns the node visitor instances to add to the existing list.
*
* @return array An array of Twig_NodeVisitorInterface instances
* @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
*/
public function getNodeVisitors()
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Twig/Extension/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function getNumberFormat()
/**
* Returns the token parser instance to add to the existing list.
*
* @return array An array of Twig_TokenParser instances
* @return Twig_TokenParser[] An array of Twig_TokenParser instances
*/
public function getTokenParsers()
{
Expand Down Expand Up @@ -562,7 +562,7 @@ function twig_number_format_filter(Twig_Environment $env, $number, $decimal = nu
* URL encodes a string as a path segment or an array as a query string.
*
* @param string|array $url A URL or an array of query parameters
* @param bool $raw true to use rawurlencode() instead of urlencode
* @param Boolean $raw true to use rawurlencode() instead of urlencode
*
* @return string The URL encoded value
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Twig/Extension/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getTokenParsers()
/**
* Returns the node visitor instances to add to the existing list.
*
* @return array An array of Twig_NodeVisitorInterface instances
* @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
*/
public function getNodeVisitors()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Twig/Extension/Sandbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getTokenParsers()
/**
* Returns the node visitor instances to add to the existing list.
*
* @return array An array of Twig_NodeVisitorInterface instances
* @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
*/
public function getNodeVisitors()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Twig/ExtensionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getTokenParsers();
/**
* Returns the node visitor instances to add to the existing list.
*
* @return array An array of Twig_NodeVisitorInterface instances
* @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
*/
public function getNodeVisitors();

Expand Down
1 change: 0 additions & 1 deletion lib/Twig/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ protected function lexString()
$this->moveCursor($match[0]);

} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {

list($expect, $lineno) = array_pop($this->brackets);
if ($this->code[$this->cursor] != '"') {
throw new Twig_Error_Syntax(sprintf('Unclosed "%s"', $expect), $lineno, $this->filename);
Expand Down
6 changes: 3 additions & 3 deletions lib/Twig/NodeTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Twig_NodeTraverser is a node traverser.
*
* It visits all nodes and their children and call the given visitor for each.
* It visits all nodes and their children and calls the given visitor for each.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
Expand All @@ -24,8 +24,8 @@ class Twig_NodeTraverser
/**
* Constructor.
*
* @param Twig_Environment $env A Twig_Environment instance
* @param array $visitors An array of Twig_NodeVisitorInterface instances
* @param Twig_Environment $env A Twig_Environment instance
* @param Twig_NodeVisitorInterface[] $visitors An array of Twig_NodeVisitorInterface instances
*/
public function __construct(Twig_Environment $env, array $visitors = array())
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Twig/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ protected function filterBodyNodes(Twig_NodeInterface $node)
}

foreach ($node as $k => $n) {
if (null !== $n && null === $n = $this->filterBodyNodes($n)) {
if (null !== $n && null === $this->filterBodyNodes($n)) {
$node->removeNode($k);
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Twig/TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function look($number = 1)
/**
* Tests the current token
*
* @return bool
* @return Boolean
*/
public function test($primary, $secondary = null)
{
Expand All @@ -115,7 +115,7 @@ public function test($primary, $secondary = null)
/**
* Checks if end of stream was reached
*
* @return bool
* @return Boolean
*/
public function isEOF()
{
Expand Down

0 comments on commit cb651e8

Please sign in to comment.