aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/template/twig/extension.php18
-rw-r--r--phpBB/includes/template/twig/twig.php4
2 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/includes/template/twig/extension.php b/phpBB/includes/template/twig/extension.php
index a54c2b2509..f73b99a4c1 100644
--- a/phpBB/includes/template/twig/extension.php
+++ b/phpBB/includes/template/twig/extension.php
@@ -59,9 +59,9 @@ class phpbb_template_twig_extension extends Twig_Extension
*/
public function getFilters()
{
- return array(
- new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
- new Twig_SimpleFilter('addslashes', 'addslashes'),
+ return array(
+ new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
+ new Twig_SimpleFilter('addslashes', 'addslashes'),
);
}
@@ -72,8 +72,8 @@ class phpbb_template_twig_extension extends Twig_Extension
*/
public function getFunctions()
{
- return array(
- new Twig_SimpleFunction('lang', array($this, 'lang')),
+ return array(
+ new Twig_SimpleFunction('lang', array($this, 'lang')),
);
}
@@ -86,7 +86,7 @@ class phpbb_template_twig_extension extends Twig_Extension
{
return array(
array(
- '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
+ '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
),
array(
// precedence settings are copied from similar operators in Twig core extension
@@ -109,9 +109,9 @@ class phpbb_template_twig_extension extends Twig_Extension
'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
- 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
- ),
- );
+ 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+ ),
+ );
}
/**
diff --git a/phpBB/includes/template/twig/twig.php b/phpBB/includes/template/twig/twig.php
index dd2c1a4023..621bfe0f4f 100644
--- a/phpBB/includes/template/twig/twig.php
+++ b/phpBB/includes/template/twig/twig.php
@@ -102,7 +102,9 @@ class phpbb_template_twig implements phpbb_template
* Constructor.
*
* @param string $phpbb_root_path phpBB root path
- * @param user $user current user
+ * @param string $php_ext php extension (typically 'php')
+ * @param phpbb_config $config
+ * @param phpbb_user $user
* @param phpbb_template_context $context template context
* @param phpbb_extension_manager $extension_manager extension manager, if null then template events will not be invoked
* @param string $adm_relative_path relative path to adm directory