diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index 73f8edbe52..350902a64f 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -488,8 +488,8 @@ function phpbb_realpath($path) * Determine which plural form we should use. * For some languages this is not as simple as for English. * - * @param $rule int ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html - * @param $number int|float The number we want to get the plural case for. Float numbers are floored. + * @param int $rule ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html + * @param int|float $number The number we want to get the plural case for. Float numbers are floored. * @return int The plural-case we need to use for the number plural-rule combination * * @deprecated 3.2.0-dev (To be removed: 4.0.0) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 227868fa74..1458406813 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1610,7 +1610,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99) /** * Validate Date -* @param String $string a date in the dd-mm-yyyy format +* @param string $date_string a date in the dd-mm-yyyy format * @return boolean */ function validate_date($date_string, $optional = false) diff --git a/phpBB/phpbb/config/config.php b/phpBB/phpbb/config/config.php index c619cae2fd..c40145b457 100644 --- a/phpBB/phpbb/config/config.php +++ b/phpBB/phpbb/config/config.php @@ -20,14 +20,14 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable { /** * The configuration data - * @var array(string => string) + * @var array */ protected $config; /** * Creates a configuration container with a default set of values * - * @param array(string => string) $config The configuration data. + * @param array $config The configuration data. */ public function __construct(array $config) { diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index fbc56f3db2..316df79319 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -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) diff --git a/phpBB/phpbb/error_collector.php b/phpBB/phpbb/error_collector.php index bf8efd1065..894082b938 100644 --- a/phpBB/phpbb/error_collector.php +++ b/phpBB/phpbb/error_collector.php @@ -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) diff --git a/phpBB/phpbb/feed/attachments_base.php b/phpBB/phpbb/feed/attachments_base.php index 5d3272e0d9..01d7acbad3 100644 --- a/phpBB/phpbb/feed/attachments_base.php +++ b/phpBB/phpbb/feed/attachments_base.php @@ -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) { diff --git a/phpBB/phpbb/group/helper.php b/phpBB/phpbb/group/helper.php index aa3876b325..639315c960 100644 --- a/phpBB/phpbb/group/helper.php +++ b/phpBB/phpbb/group/helper.php @@ -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 */ diff --git a/phpBB/phpbb/language/language.php b/phpBB/phpbb/language/language.php index 1f6300fb70..031f221034 100644 --- a/phpBB/phpbb/language/language.php +++ b/phpBB/phpbb/language/language.php @@ -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. */ diff --git a/phpBB/phpbb/request/deactivated_super_global.php b/phpBB/phpbb/request/deactivated_super_global.php index ab56240b14..01e038e8be 100644 --- a/phpBB/phpbb/request/deactivated_super_global.php +++ b/phpBB/phpbb/request/deactivated_super_global.php @@ -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) { diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php index 4d7bc9ea48..e31be57d65 100644 --- a/phpBB/phpbb/request/request.php +++ b/phpBB/phpbb/request/request.php @@ -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. diff --git a/phpBB/phpbb/request/request_interface.php b/phpBB/phpbb/request/request_interface.php index a1fbf0ae45..c42c309cc1 100644 --- a/phpBB/phpbb/request/request_interface.php +++ b/phpBB/phpbb/request/request_interface.php @@ -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. */ diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php index 3dc5e548e5..ceba1b1f11 100644 --- a/phpBB/phpbb/template/twig/extension.php +++ b/phpBB/phpbb/template/twig/extension.php @@ -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 */ diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php index fea5db6fb9..aa903df0db 100644 --- a/tests/mock/session_testable.php +++ b/tests/mock/session_testable.php @@ -31,8 +31,8 @@ class phpbb_mock_session_testable extends \phpbb\session /** * Checks if the cookies were set correctly. * - * @param PHPUnit\Framework\Assert test The test from which this is called - * @param array(string => mixed) cookies The cookie data to check against. + * @param PHPUnit\Framework\Assert $test The test from which this is called + * @param array $cookies The cookie data to check against. * The keys are cookie names, the values can either be null to * check only the existence of the cookie, or an array(d, t), * where d is the cookie data to check, or null to skip the