1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-12 17:31:33 +02:00

[ticket/12715] Cleanup comments in \phpbb\template\*

PHPBB3-12715
This commit is contained in:
Tristan Darricau
2014-06-15 15:05:51 +02:00
parent e6b422517b
commit 0d0113e6da
19 changed files with 132 additions and 124 deletions

@ -55,6 +55,7 @@ class context
*
* @param string $varname Variable name
* @param string $varval Value to assign to variable
* @return true
*/
public function assign_var($varname, $varval)
{
@ -70,6 +71,7 @@ class context
*
* @param string $varname Variable name
* @param string $varval Value to append to variable
* @return true
*/
public function append_var($varname, $varval)
{
@ -117,6 +119,7 @@ class context
*
* @param string $blockname Name of block to assign $vararray to
* @param array $vararray A hash of variable name => value pairs
* @return true
*/
public function assign_block_vars($blockname, array $vararray)
{
@ -206,6 +209,7 @@ class context
*
* @param string $blockname Name of block to assign $block_vars_array to
* @param array $block_vars_array An array of hashes of variable name => value pairs
* @return true
*/
public function assign_block_vars_array($blockname, array $block_vars_array)
{
@ -374,6 +378,7 @@ class context
* Reset/empty complete block
*
* @param string $blockname Name of block to destroy
* @return true
*/
public function destroy_block_vars($blockname)
{

@ -175,6 +175,7 @@ interface template
/**
* Get path to template for handle (required for BBCode parser)
*
* @param string $handle Handle to retrieve the source file
* @return string
*/
public function get_source_file_for_handle($handle);

@ -40,7 +40,7 @@ class environment extends \Twig_Environment
* @param \phpbb\path_helper
* @param \phpbb\extension\manager
* @param string $phpbb_root_path
* @param Twig_LoaderInterface $loader
* @param \Twig_LoaderInterface $loader
* @param array $options Array of options to pass to Twig
*/
public function __construct($phpbb_config, \phpbb\path_helper $path_helper, \phpbb\extension\manager $extension_manager = null, \Twig_LoaderInterface $loader = null, $options = array())
@ -122,7 +122,7 @@ class environment extends \Twig_Environment
* Set the namespace look up order to load templates from
*
* @param array $namespace
* @return Twig_Environment
* @return \Twig_Environment
*/
public function setNamespaceLookUpOrder($namespace)
{
@ -132,12 +132,13 @@ class environment extends \Twig_Environment
}
/**
* Loads a template by name.
*
* @param string $name The template name
* @param integer $index The index if it is an embedded template
* @return Twig_TemplateInterface A template instance representing the given template name
*/
* Loads a template by name.
*
* @param string $name The template name
* @param integer $index The index if it is an embedded template
* @return \Twig_TemplateInterface A template instance representing the given template name
* @throws \Twig_Error_Loader
*/
public function loadTemplate($name, $index = null)
{
if (strpos($name, '@') === false)
@ -168,11 +169,12 @@ class environment extends \Twig_Environment
}
/**
* Finds a template by name.
*
* @param string $name The template name
* @return string
*/
* Finds a template by name.
*
* @param string $name The template name
* @return string
* @throws \Twig_Error_Loader
*/
public function findTemplate($name)
{
if (strpos($name, '@') === false)
@ -188,7 +190,7 @@ class environment extends \Twig_Environment
return parent::getLoader()->getCacheKey('@' . $namespace . '/' . $name);
}
catch (Twig_Error_Loader $e)
catch (\Twig_Error_Loader $e)
{
}
}

@ -127,7 +127,7 @@ class extension extends \Twig_Extension
/**
* Grabs a subset of a loop
*
* @param Twig_Environment $env A Twig_Environment instance
* @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

@ -24,7 +24,7 @@ class loader extends \Twig_Loader_Filesystem
* Set safe directories
*
* @param array $directories Array of directories that are safe (empty to clear)
* @return Twig_Loader_Filesystem
* @return \Twig_Loader_Filesystem
*/
public function setSafeDirectories($directories = array())
{
@ -45,7 +45,7 @@ class loader extends \Twig_Loader_Filesystem
* Add safe directory
*
* @param string $directory Directory that should be added
* @return Twig_Loader_Filesystem
* @return \Twig_Loader_Filesystem
*/
public function addSafeDirectory($directory)
{
@ -110,7 +110,7 @@ class loader extends \Twig_Loader_Filesystem
// Try validating the name (which may throw an exception)
parent::validateName($name);
}
catch (Twig_Error_Loader $e)
catch (\Twig_Error_Loader $e)
{
if (strpos($e->getRawMessage(), 'Looks like you try to load a template outside configured directories') === 0)
{

@ -23,10 +23,10 @@ class definenode extends \Twig_Node
}
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);

@ -17,12 +17,12 @@ namespace phpbb\template\twig\node;
class event extends \Twig_Node
{
/**
* The subdirectory in which all template listener files must be placed
* @var string
*/
* The subdirectory in which all template listener files must be placed
* @var string
*/
protected $listener_directory = 'event/';
/** @var Twig_Environment */
/** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@ -33,10 +33,10 @@ class event extends \Twig_Node
}
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);

@ -15,7 +15,7 @@ namespace phpbb\template\twig\node;
abstract class includeasset extends \Twig_Node
{
/** @var Twig_Environment */
/** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@ -25,10 +25,10 @@ abstract class includeasset extends \Twig_Node
parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
}
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
@ -74,7 +74,7 @@ abstract class includeasset extends \Twig_Node
/**
* Append the output code for the asset
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
* @return null
*/
abstract protected function append_asset(\Twig_Compiler $compiler);

@ -17,10 +17,10 @@ namespace phpbb\template\twig\node;
class includenode extends \Twig_Node_Include
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);

@ -17,7 +17,7 @@ namespace phpbb\template\twig\node;
class includephp extends \Twig_Node
{
/** @var Twig_Environment */
/** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
@ -28,10 +28,10 @@ class includephp extends \Twig_Node
}
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);

@ -16,7 +16,7 @@ namespace phpbb\template\twig\node;
class php extends \Twig_Node
{
/** @var Twig_Environment */
/** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Text $text, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@ -27,10 +27,10 @@ class php extends \Twig_Node
}
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
*/
* Compiles the node to PHP.
*
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);

@ -18,12 +18,14 @@ namespace phpbb\template\twig\tokenparser;
class defineparser extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
* @throws \Twig_Error_Syntax
* @throws \phpbb\template\twig\node\definenode
*/
public function parse(\Twig_Token $token)
{
$lineno = $token->getLine();
@ -61,10 +63,10 @@ class defineparser extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'DEFINE';

@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class event extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@ -34,10 +34,10 @@ class event extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'EVENT';

@ -16,12 +16,12 @@ namespace phpbb\template\twig\tokenparser;
class includecss extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@ -33,10 +33,10 @@ class includecss extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'INCLUDECSS';

@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class includejs extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@ -34,10 +34,10 @@ class includejs extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'INCLUDEJS';

@ -18,12 +18,12 @@ namespace phpbb\template\twig\tokenparser;
class includeparser extends \Twig_TokenParser_Include
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@ -34,10 +34,10 @@ class includeparser extends \Twig_TokenParser_Include
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'INCLUDE';

@ -18,12 +18,12 @@ namespace phpbb\template\twig\tokenparser;
class includephp extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@ -44,10 +44,10 @@ class includephp extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'INCLUDEPHP';

@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class php extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
* Parses a token and returns a node.
*
* @param \Twig_Token $token A Twig_Token instance
*
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{
$stream = $this->parser->getStream();
@ -42,10 +42,10 @@ class php extends \Twig_TokenParser
}
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag()
{
return 'PHP';

@ -67,7 +67,7 @@ class twig extends \phpbb\template\base
/**
* Twig Environment
*
* @var Twig_Environment
* @var \Twig_Environment
*/
protected $twig;
@ -347,9 +347,7 @@ class twig extends \phpbb\template\base
}
/**
* Get path to template for handle (required for BBCode parser)
*
* @return string
* {@inheritdoc}
*/
public function get_source_file_for_handle($handle)
{