[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

View file

@ -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)
{

View file

@ -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);

View file

@ -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)
{
@ -136,7 +136,8 @@ class environment extends \Twig_Environment
*
* @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
* @return \Twig_TemplateInterface A template instance representing the given template name
* @throws \Twig_Error_Loader
*/
public function loadTemplate($name, $index = null)
{
@ -172,6 +173,7 @@ class environment extends \Twig_Environment
*
* @param string $name The template name
* @return string
* @throws \Twig_Error_Loader
*/
public function findTemplate($name)
{
@ -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)
{
}
}

View file

@ -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

View file

@ -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)
{

View file

@ -25,7 +25,7 @@ class definenode extends \Twig_Node
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{

View file

@ -22,7 +22,7 @@ class event extends \Twig_Node
*/
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)
@ -35,7 +35,7 @@ class event extends \Twig_Node
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{

View file

@ -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)
@ -27,7 +27,7 @@ abstract class includeasset extends \Twig_Node
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{
@ -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);

View file

@ -19,7 +19,7 @@ class includenode extends \Twig_Node_Include
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{

View file

@ -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)
@ -30,7 +30,7 @@ class includephp extends \Twig_Node
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{

View file

@ -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)
@ -29,7 +29,7 @@ class php extends \Twig_Node
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler A Twig_Compiler instance
* @param \Twig_Compiler A Twig_Compiler instance
*/
public function compile(\Twig_Compiler $compiler)
{

View file

@ -20,9 +20,11 @@ class defineparser extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
* @throws \Twig_Error_Syntax
* @throws \phpbb\template\twig\node\definenode
*/
public function parse(\Twig_Token $token)
{

View file

@ -19,9 +19,9 @@ class event extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -18,9 +18,9 @@ class includecss extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -19,9 +19,9 @@ class includejs extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -20,9 +20,9 @@ class includeparser extends \Twig_TokenParser_Include
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -20,9 +20,9 @@ class includephp extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -19,9 +19,9 @@ class php extends \Twig_TokenParser
/**
* Parses a token and returns a node.
*
* @param Twig_Token $token A Twig_Token instance
* @param \Twig_Token $token A Twig_Token instance
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
* @return \Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(\Twig_Token $token)
{

View file

@ -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)
{