diff options
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r-- | phpBB/phpbb/template/twig/extension.php | 74 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/event.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/tokenparser/php.php | 2 |
3 files changed, 43 insertions, 43 deletions
diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php index c9d2ab5799..6847dbd9f8 100644 --- a/phpBB/phpbb/template/twig/extension.php +++ b/phpBB/phpbb/template/twig/extension.php @@ -40,11 +40,11 @@ class extension extends \Twig_Extension return 'phpbb'; } - /** - * Returns the token parser instance to add to the existing list. - * - * @return array An array of Twig_TokenParser instances - */ + /** + * Returns the token parser instance to add to the existing list. + * + * @return array An array of Twig_TokenParser instances + */ public function getTokenParsers() { return array( @@ -58,36 +58,36 @@ class extension extends \Twig_Extension ); } - /** - * Returns a list of filters to add to the existing list. - * - * @return array An array of filters - */ - public function getFilters() - { + /** + * Returns a list of filters to add to the existing list. + * + * @return array An array of filters + */ + public function getFilters() + { return array( new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)), new \Twig_SimpleFilter('addslashes', 'addslashes'), ); - } - - /** - * Returns a list of global functions to add to the existing list. - * - * @return array An array of global functions - */ - public function getFunctions() - { + } + + /** + * Returns a list of global functions to add to the existing list. + * + * @return array An array of global functions + */ + public function getFunctions() + { return array( new \Twig_SimpleFunction('lang', array($this, 'lang')), ); } - /** - * Returns a list of operators to add to the existing list. - * - * @return array An array of operators - */ + /** + * Returns a list of operators to add to the existing list. + * + * @return array An array of operators + */ public function getOperators() { return array( @@ -118,19 +118,19 @@ class extension extends \Twig_Extension 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT), ), ); - } + } /** - * Grabs a subset of a loop - * - * @param Twig_Environment $env A Twig_Environment instance - * @param mixed $item A variable - * @param integer $start Start of the subset - * @param integer $end End of the subset - * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array) - * - * @return mixed The sliced variable - */ + * Grabs a subset of a loop + * + * @param Twig_Environment $env A Twig_Environment instance + * @param mixed $item A variable + * @param integer $start Start of the subset + * @param integer $end End of the subset + * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array) + * + * @return mixed The sliced variable + */ function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false) { // We do almost the same thing as Twig's slice (array_slice), except when $end is positive diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index a8d4d06333..7a1181a866 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -49,10 +49,10 @@ class event extends \Twig_Node // templates on page load rather than at compile. This is // slower, but makes developing extensions easier (no need to // purge the cache when a new event template file is added) - $compiler - ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n") - ->indent() - ; + $compiler + ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n") + ->indent() + ; } if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) @@ -71,7 +71,7 @@ class event extends \Twig_Node { $compiler ->outdent() - ->write("}\n\n") + ->write("}\n\n") ; } } diff --git a/phpBB/phpbb/template/twig/tokenparser/php.php b/phpBB/phpbb/template/twig/tokenparser/php.php index 13688af2f6..b427969e2d 100644 --- a/phpBB/phpbb/template/twig/tokenparser/php.php +++ b/phpBB/phpbb/template/twig/tokenparser/php.php @@ -45,5 +45,5 @@ class php extends \Twig_TokenParser public function getTag() { return 'PHP'; - } + } } |