Skip to content

Commit 3ad0f16

Browse files
committed
Merge branch '3.3.x'
2 parents bd0e8e0 + d606121 commit 3ad0f16

10 files changed

+73
-73
lines changed

config/config.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
2020
{
2121
/**
2222
* The configuration data
23-
* @var array(string => string)
23+
* @var array<string,string>
2424
*/
2525
protected $config;
2626

2727
/**
2828
* Creates a configuration container with a default set of values
2929
*
30-
* @param array(string => string) $config The configuration data.
30+
* @param array<string,string> $config The configuration data.
3131
*/
3232
public function __construct(array $config)
3333
{

content_visibility.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ public function set_topic_visibility($visibility, $topic_id, $forum_id, $user_id
838838
* Add post to topic and forum statistics
839839
*
840840
* @param $data array Contains information from the topics table about given topic
841-
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
841+
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
842842
* @return null
843843
*/
844844
public function add_post_to_statistic($data, &$sql_data)
@@ -859,7 +859,7 @@ public function add_post_to_statistic($data, &$sql_data)
859859
* Remove post from topic and forum statistics
860860
*
861861
* @param $data array Contains information from the topics table about given topic
862-
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
862+
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
863863
* @return null
864864
*/
865865
public function remove_post_from_statistic($data, &$sql_data)
@@ -892,7 +892,7 @@ public function remove_post_from_statistic($data, &$sql_data)
892892
* Remove topic from forum statistics
893893
*
894894
* @param $data array Post and topic data
895-
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
895+
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
896896
* @return null
897897
*/
898898
public function remove_topic_from_statistic($data, &$sql_data)

error_collector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class error_collector
2626
* the error_reporting() function will be used to determine which errors
2727
* the collector will keep.
2828
*
29-
* @see PHPBB3-13306
29+
* @see https://tracker.phpbb.com/browse/PHPBB3-13306
3030
* @param int|null $error_types
3131
*/
3232
function __construct($error_types = null)

feed/attachments_base.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ protected function fetch_attachments($post_ids = array(), $topic_ids = array())
8787
/**
8888
* Get attachments related to a given post
8989
*
90-
* @param $post_id int Post id
91-
* @return mixed Attachments related to $post_id
90+
* @param int $post_id Post id
91+
* @return mixed Attachments related to $post_id
9292
*/
9393
public function get_attachments($post_id)
9494
{

group/helper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function __construct(auth $auth, cache $cache, config $config, language $
8484
}
8585

8686
/**
87-
* @param $group_name string The stored group name
87+
* @param string $group_name The stored group name
8888
*
8989
* @return string Group name or translated group name if it exists
9090
*/

language/language.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function add_lang($component, $extension_name = null)
194194
}
195195

196196
/**
197-
* @param $key array|string The language key we want to know more about. Can be string or array.
197+
* @param array|string $key The language key we want to know more about. Can be string or array.
198198
*
199199
* @return bool Returns whether the language key is set.
200200
*/

request/deactivated_super_global.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
2525
private $name;
2626

2727
/**
28-
* @var \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE Super global constant.
28+
* @var string (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) Super global constant.
2929
*/
3030
private $super_global;
3131

@@ -39,7 +39,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
3939
*
4040
* @param \phpbb\request\request_interface $request A request class instance holding the real super global data.
4141
* @param string $name Name of the super global this is a replacement for - e.g. '_GET'.
42-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
42+
* @param string $super_global The variable's super global constant (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE).
4343
*/
4444
public function __construct(\phpbb\request\request_interface $request, $name, $super_global)
4545
{

request/request.php

+43-43
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class request implements \phpbb\request\request_interface
3939
protected $original_request = null;
4040

4141
/**
42-
* @var
42+
* @var bool
4343
*/
4444
protected $super_globals_disabled = false;
4545

@@ -137,11 +137,11 @@ public function enable_super_globals()
137137
* other methods this class provides. Using this function should be avoided if possible! It will
138138
* consume twice the the amount of memory of the value
139139
*
140-
* @param string $var_name The name of the variable that shall be overwritten
141-
* @param mixed $value The value which the variable shall contain.
142-
* If this is null the variable will be unset.
143-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
144-
* Specifies which super global shall be changed
140+
* @param string $var_name The name of the variable that shall be overwritten
141+
* @param mixed $value The value which the variable shall contain.
142+
* If this is null the variable will be unset.
143+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
144+
* Specifies which super global shall be changed
145145
*/
146146
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
147147
{
@@ -173,16 +173,16 @@ public function overwrite($var_name, $value, $super_global = \phpbb\request\requ
173173
* Central type safe input handling function.
174174
* All variables in GET or POST requests should be retrieved through this function to maximise security.
175175
*
176-
* @param string|array $var_name The form variable's name from which data shall be retrieved.
177-
* If the value is an array this may be an array of indizes which will give
178-
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
179-
* then specifying array("var", 1) as the name will return "a".
180-
* @param mixed $default A default value that is returned if the variable was not set.
181-
* This function will always return a value of the same type as the default.
182-
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
183-
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
184-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
185-
* Specifies which super global should be used
176+
* @param string|array $var_name The form variable's name from which data shall be retrieved.
177+
* If the value is an array this may be an array of indizes which will give
178+
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
179+
* then specifying array("var", 1) as the name will return "a".
180+
* @param mixed $default A default value that is returned if the variable was not set.
181+
* This function will always return a value of the same type as the default.
182+
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
183+
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
184+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
185+
* Specifies which super global should be used
186186
*
187187
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
188188
* the same as that of $default. If the variable is not set $default is returned.
@@ -197,16 +197,16 @@ public function variable($var_name, $default, $multibyte = false, $super_global
197197
* Same functionality as variable(), except does not run trim() on strings.
198198
* This method should be used when handling passwords.
199199
*
200-
* @param string|array $var_name The form variable's name from which data shall be retrieved.
201-
* If the value is an array this may be an array of indizes which will give
202-
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
203-
* then specifying array("var", 1) as the name will return "a".
204-
* @param mixed $default A default value that is returned if the variable was not set.
205-
* This function will always return a value of the same type as the default.
206-
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
207-
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
208-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
209-
* Specifies which super global should be used
200+
* @param string|array $var_name The form variable's name from which data shall be retrieved.
201+
* If the value is an array this may be an array of indizes which will give
202+
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
203+
* then specifying array("var", 1) as the name will return "a".
204+
* @param mixed $default A default value that is returned if the variable was not set.
205+
* This function will always return a value of the same type as the default.
206+
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
207+
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
208+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
209+
* Specifies which super global should be used
210210
*
211211
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
212212
* the same as that of $default. If the variable is not set $default is returned.
@@ -334,11 +334,11 @@ public function is_set_post($name)
334334
* Checks whether a certain variable is set in one of the super global
335335
* arrays.
336336
*
337-
* @param string $var Name of the variable
338-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
339-
* Specifies the super global which shall be checked
337+
* @param string $var Name of the variable
338+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
339+
* Specifies the super global which shall be checked
340340
*
341-
* @return bool True if the variable was sent as input
341+
* @return bool True if the variable was sent as input
342342
*/
343343
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST)
344344
{
@@ -370,8 +370,8 @@ public function is_secure()
370370
/**
371371
* Returns all variable names for a given super global
372372
*
373-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
374-
* The super global from which names shall be taken
373+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
374+
* The super global from which names shall be taken
375375
*
376376
* @return array All variable names that are set for the super global.
377377
* Pay attention when using these, they are unsanitised!
@@ -389,17 +389,17 @@ public function variable_names($super_global = \phpbb\request\request_interface:
389389
/**
390390
* Helper function used by variable() and untrimmed_variable().
391391
*
392-
* @param string|array $var_name The form variable's name from which data shall be retrieved.
393-
* If the value is an array this may be an array of indizes which will give
394-
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
395-
* then specifying array("var", 1) as the name will return "a".
396-
* @param mixed $default A default value that is returned if the variable was not set.
397-
* This function will always return a value of the same type as the default.
398-
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
399-
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
400-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
401-
* Specifies which super global should be used
402-
* @param bool $trim Indicates whether trim() should be applied to string values.
392+
* @param string|array $var_name The form variable's name from which data shall be retrieved.
393+
* If the value is an array this may be an array of indizes which will give
394+
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
395+
* then specifying array("var", 1) as the name will return "a".
396+
* @param mixed $default A default value that is returned if the variable was not set.
397+
* This function will always return a value of the same type as the default.
398+
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
399+
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
400+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
401+
* Specifies which super global should be used
402+
* @param bool $trim Indicates whether trim() should be applied to string values.
403403
*
404404
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
405405
* the same as that of $default. If the variable is not set $default is returned.

request/request_interface.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ interface request_interface
3636
* other methods this class provides. Using this function should be avoided if possible! It will
3737
* consume twice the the amount of memory of the value
3838
*
39-
* @param string $var_name The name of the variable that shall be overwritten
40-
* @param mixed $value The value which the variable shall contain.
41-
* If this is null the variable will be unset.
42-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
43-
* Specifies which super global shall be changed
39+
* @param string $var_name The name of the variable that shall be overwritten
40+
* @param mixed $value The value which the variable shall contain.
41+
* If this is null the variable will be unset.
42+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
43+
* Specifies which super global shall be changed
4444
*/
4545
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
4646

@@ -56,8 +56,8 @@ public function overwrite($var_name, $value, $super_global = \phpbb\request\requ
5656
* This function will always return a value of the same type as the default.
5757
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
5858
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
59-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
60-
* Specifies which super global should be used
59+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
60+
* Specifies which super global shall be changed
6161
*
6262
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
6363
* the same as that of $default. If the variable is not set $default is returned.
@@ -78,8 +78,8 @@ public function variable($var_name, $default, $multibyte = false, $super_global
7878
* then specifying array("var", 1) as the name will return "a".
7979
* @param mixed $default A default value that is returned if the variable was not set.
8080
* This function will always return a value of the same type as the default.
81-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
82-
* Specifies which super global should be used
81+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
82+
* Specifies which super global shall be changed
8383
*
8484
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
8585
* the same as that of $default. If the variable is not set $default is returned.
@@ -122,11 +122,11 @@ public function is_set_post($name);
122122
* Checks whether a certain variable is set in one of the super global
123123
* arrays.
124124
*
125-
* @param string $var Name of the variable
126-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
127-
* Specifies the super global which shall be checked
125+
* @param string $var Name of the variable
126+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
127+
* Specifies which super global shall be changed
128128
*
129-
* @return bool True if the variable was sent as input
129+
* @return bool True if the variable was sent as input
130130
*/
131131
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
132132

@@ -147,8 +147,8 @@ public function is_secure();
147147
/**
148148
* Returns all variable names for a given super global
149149
*
150-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
151-
* The super global from which names shall be taken
150+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
151+
* The super global from which names shall be taken
152152
*
153153
* @return array All variable names that are set for the super global.
154154
* Pay attention when using these, they are unsanitised!
@@ -158,8 +158,8 @@ public function variable_names($super_global = \phpbb\request\request_interface:
158158
/**
159159
* Returns the original array of the requested super global
160160
*
161-
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
162-
* The super global which will be returned
161+
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
162+
* The super global which will be returned
163163
*
164164
* @return array The original array of the requested super global.
165165
*/

template/twig/extension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function getOperators()
138138
* @param mixed $item A variable
139139
* @param integer $start Start of the subset
140140
* @param integer $end End of the subset
141-
* @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
141+
* @param boolean $preserveKeys Whether to preserve key or not (when the input is an array)
142142
*
143143
* @return mixed The sliced variable
144144
*/

0 commit comments

Comments
 (0)