mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16587] Fix phpdoc errors reported by Doctum
PHPBB3-16587
This commit is contained in:
@@ -20,14 +20,14 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* The configuration data
|
||||
* @var array(string => string)
|
||||
* @var array<string,string>
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Creates a configuration container with a default set of values
|
||||
*
|
||||
* @param array(string => string) $config The configuration data.
|
||||
* @param array<string,string> $config The configuration data.
|
||||
*/
|
||||
public function __construct(array $config)
|
||||
{
|
||||
|
@@ -818,7 +818,7 @@ class content_visibility
|
||||
* Add post to topic and forum statistics
|
||||
*
|
||||
* @param $data array Contains information from the topics table about given topic
|
||||
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
|
||||
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||
* @return null
|
||||
*/
|
||||
public function add_post_to_statistic($data, &$sql_data)
|
||||
@@ -839,7 +839,7 @@ class content_visibility
|
||||
* Remove post from topic and forum statistics
|
||||
*
|
||||
* @param $data array Contains information from the topics table about given topic
|
||||
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
|
||||
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||
* @return null
|
||||
*/
|
||||
public function remove_post_from_statistic($data, &$sql_data)
|
||||
@@ -872,7 +872,7 @@ class content_visibility
|
||||
* Remove topic from forum statistics
|
||||
*
|
||||
* @param $data array Post and topic data
|
||||
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
|
||||
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||
* @return null
|
||||
*/
|
||||
public function remove_topic_from_statistic($data, &$sql_data)
|
||||
|
@@ -26,7 +26,7 @@ class error_collector
|
||||
* the error_reporting() function will be used to determine which errors
|
||||
* the collector will keep.
|
||||
*
|
||||
* @see PHPBB3-13306
|
||||
* @see https://tracker.phpbb.com/browse/PHPBB3-13306
|
||||
* @param int|null $error_types
|
||||
*/
|
||||
function __construct($error_types = null)
|
||||
|
@@ -87,8 +87,8 @@ abstract class attachments_base extends base
|
||||
/**
|
||||
* Get attachments related to a given post
|
||||
*
|
||||
* @param $post_id int Post id
|
||||
* @return mixed Attachments related to $post_id
|
||||
* @param int $post_id Post id
|
||||
* @return mixed Attachments related to $post_id
|
||||
*/
|
||||
public function get_attachments($post_id)
|
||||
{
|
||||
|
@@ -84,7 +84,7 @@ class helper
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $group_name string The stored group name
|
||||
* @param string $group_name The stored group name
|
||||
*
|
||||
* @return string Group name or translated group name if it exists
|
||||
*/
|
||||
|
@@ -194,7 +194,7 @@ class language
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key array|string The language key we want to know more about. Can be string or array.
|
||||
* @param array|string $key The language key we want to know more about. Can be string or array.
|
||||
*
|
||||
* @return bool Returns whether the language key is set.
|
||||
*/
|
||||
|
@@ -25,7 +25,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE Super global constant.
|
||||
* @var string (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) Super global constant.
|
||||
*/
|
||||
private $super_global;
|
||||
|
||||
@@ -39,7 +39,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
*
|
||||
* @param \phpbb\request\request_interface $request A request class instance holding the real super global data.
|
||||
* @param string $name Name of the super global this is a replacement for - e.g. '_GET'.
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
|
||||
* @param string $super_global The variable's super global constant (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE).
|
||||
*/
|
||||
public function __construct(\phpbb\request\request_interface $request, $name, $super_global)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ class request implements \phpbb\request\request_interface
|
||||
protected $original_request = null;
|
||||
|
||||
/**
|
||||
* @var
|
||||
* @var bool
|
||||
*/
|
||||
protected $super_globals_disabled = false;
|
||||
|
||||
@@ -137,11 +137,11 @@ class request implements \phpbb\request\request_interface
|
||||
* other methods this class provides. Using this function should be avoided if possible! It will
|
||||
* consume twice the the amount of memory of the value
|
||||
*
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global shall be changed
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global shall be changed
|
||||
*/
|
||||
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
|
||||
{
|
||||
@@ -173,16 +173,16 @@ class request implements \phpbb\request\request_interface
|
||||
* Central type safe input handling function.
|
||||
* All variables in GET or POST requests should be retrieved through this function to maximise security.
|
||||
*
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global should be used
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
@@ -197,16 +197,16 @@ class request implements \phpbb\request\request_interface
|
||||
* Same functionality as variable(), except does not run trim() on strings.
|
||||
* This method should be used when handling passwords.
|
||||
*
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global should be used
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
@@ -334,11 +334,11 @@ class request implements \phpbb\request\request_interface
|
||||
* Checks whether a certain variable is set in one of the super global
|
||||
* arrays.
|
||||
*
|
||||
* @param string $var Name of the variable
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies the super global which shall be checked
|
||||
* @param string $var Name of the variable
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies the super global which shall be checked
|
||||
*
|
||||
* @return bool True if the variable was sent as input
|
||||
* @return bool True if the variable was sent as input
|
||||
*/
|
||||
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST)
|
||||
{
|
||||
@@ -370,8 +370,8 @@ class request implements \phpbb\request\request_interface
|
||||
/**
|
||||
* Returns all variable names for a given super global
|
||||
*
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global from which names shall be taken
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* The super global from which names shall be taken
|
||||
*
|
||||
* @return array All variable names that are set for the super global.
|
||||
* Pay attention when using these, they are unsanitised!
|
||||
@@ -389,17 +389,17 @@ class request implements \phpbb\request\request_interface
|
||||
/**
|
||||
* Helper function used by variable() and untrimmed_variable().
|
||||
*
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param bool $trim Indicates whether trim() should be applied to string values.
|
||||
* @param string|array $var_name The form variable's name from which data shall be retrieved.
|
||||
* If the value is an array this may be an array of indizes which will give
|
||||
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global should be used
|
||||
* @param bool $trim Indicates whether trim() should be applied to string values.
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
|
@@ -36,11 +36,11 @@ interface request_interface
|
||||
* other methods this class provides. Using this function should be avoided if possible! It will
|
||||
* consume twice the the amount of memory of the value
|
||||
*
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global shall be changed
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global shall be changed
|
||||
*/
|
||||
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
|
||||
|
||||
@@ -56,8 +56,8 @@ interface request_interface
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global shall be changed
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
@@ -78,8 +78,8 @@ interface request_interface
|
||||
* then specifying array("var", 1) as the name will return "a".
|
||||
* @param mixed $default A default value that is returned if the variable was not set.
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global shall be changed
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
@@ -122,11 +122,11 @@ interface request_interface
|
||||
* Checks whether a certain variable is set in one of the super global
|
||||
* arrays.
|
||||
*
|
||||
* @param string $var Name of the variable
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies the super global which shall be checked
|
||||
* @param string $var Name of the variable
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* Specifies which super global shall be changed
|
||||
*
|
||||
* @return bool True if the variable was sent as input
|
||||
* @return bool True if the variable was sent as input
|
||||
*/
|
||||
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
|
||||
|
||||
@@ -147,8 +147,8 @@ interface request_interface
|
||||
/**
|
||||
* Returns all variable names for a given super global
|
||||
*
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global from which names shall be taken
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* The super global from which names shall be taken
|
||||
*
|
||||
* @return array All variable names that are set for the super global.
|
||||
* Pay attention when using these, they are unsanitised!
|
||||
@@ -158,8 +158,8 @@ interface request_interface
|
||||
/**
|
||||
* Returns the original array of the requested super global
|
||||
*
|
||||
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global which will be returned
|
||||
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
|
||||
* The super global which will be returned
|
||||
*
|
||||
* @return array The original array of the requested super global.
|
||||
*/
|
||||
|
@@ -138,7 +138,7 @@ class extension extends \Twig\Extension\AbstractExtension
|
||||
* @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)
|
||||
* @param boolean $preserveKeys Whether to preserve key or not (when the input is an array)
|
||||
*
|
||||
* @return mixed The sliced variable
|
||||
*/
|
||||
|
Reference in New Issue
Block a user