mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-14 05:36:30 +02:00
[ticket/16955] Fix most return types in phpdoc
PHPBB3-16955
This commit is contained in:
@ -1349,7 +1349,7 @@ class acp_attachments
|
|||||||
* Set config attachment stat values
|
* Set config attachment stat values
|
||||||
*
|
*
|
||||||
* @param $stats array Array of config key => value pairs to set.
|
* @param $stats array Array of config key => value pairs to set.
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set_attachment_stats($stats)
|
public function set_attachment_stats($stats)
|
||||||
{
|
{
|
||||||
@ -1392,7 +1392,7 @@ class acp_attachments
|
|||||||
/**
|
/**
|
||||||
* Handle stats resync.
|
* Handle stats resync.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function handle_stats_resync()
|
public function handle_stats_resync()
|
||||||
{
|
{
|
||||||
|
@ -767,7 +767,7 @@ class acp_extensions
|
|||||||
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
|
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
|
||||||
* @param array $managed_packages List of managed packages
|
* @param array $managed_packages List of managed packages
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
|
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
|
||||||
{
|
{
|
||||||
@ -850,7 +850,7 @@ class acp_extensions
|
|||||||
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
|
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
|
||||||
* @param array $managed_packages List of managed packages
|
* @param array $managed_packages List of managed packages
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
|
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
|
||||||
{
|
{
|
||||||
@ -930,7 +930,7 @@ class acp_extensions
|
|||||||
*
|
*
|
||||||
* @param array $managed_packages List of managed packages
|
* @param array $managed_packages List of managed packages
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function list_available_exts(array $managed_packages)
|
public function list_available_exts(array $managed_packages)
|
||||||
{
|
{
|
||||||
@ -1026,7 +1026,7 @@ class acp_extensions
|
|||||||
* Outputs extension metadata into the template
|
* Outputs extension metadata into the template
|
||||||
*
|
*
|
||||||
* @param array $metadata Array with all metadata for the extension
|
* @param array $metadata Array with all metadata for the extension
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function output_metadata_to_template($metadata)
|
public function output_metadata_to_template($metadata)
|
||||||
{
|
{
|
||||||
|
@ -224,7 +224,7 @@ class acp_language
|
|||||||
}
|
}
|
||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
{
|
{
|
||||||
return array();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($iterator as $file_info)
|
foreach ($iterator as $file_info)
|
||||||
|
@ -356,8 +356,8 @@ class acp_storage
|
|||||||
*
|
*
|
||||||
* @param string $storage_name Storage name
|
* @param string $storage_name Storage name
|
||||||
* @param array $options Storage provider configuration keys
|
* @param array $options Storage provider configuration keys
|
||||||
* @param array $messages Error messages array
|
* @param array $messages Reference to error messages array
|
||||||
* @return array $messages Reference to messages array
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function validate_path($storage_name, $options, &$messages)
|
protected function validate_path($storage_name, $options, &$messages)
|
||||||
{
|
{
|
||||||
|
@ -658,7 +658,7 @@ class bbcode
|
|||||||
*
|
*
|
||||||
* Accepts variable number of parameters
|
* Accepts variable number of parameters
|
||||||
*
|
*
|
||||||
* @return mixed Second pass result
|
* @return bool Second pass result
|
||||||
*
|
*
|
||||||
* @deprecated 3.2.10 (To be removed 4.0.0)
|
* @deprecated 3.2.10 (To be removed 4.0.0)
|
||||||
*/
|
*/
|
||||||
|
@ -544,7 +544,7 @@ class diff3 extends diff
|
|||||||
* @param string $label2 the cvs file version/label from the new set of lines
|
* @param string $label2 the cvs file version/label from the new set of lines
|
||||||
* @param string $label_sep the explanation between label1 and label2 - more of a helper for the user
|
* @param string $label_sep the explanation between label1 and label2 - more of a helper for the user
|
||||||
*
|
*
|
||||||
* @return mixed the merged output
|
* @return array the merged output
|
||||||
*/
|
*/
|
||||||
function get_conflicts_content($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN')
|
function get_conflicts_content($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN')
|
||||||
{
|
{
|
||||||
@ -582,7 +582,7 @@ class diff3 extends diff
|
|||||||
/**
|
/**
|
||||||
* Return merged output (used by the renderer)
|
* Return merged output (used by the renderer)
|
||||||
*
|
*
|
||||||
* @return mixed the merged output
|
* @return array the merged output
|
||||||
*/
|
*/
|
||||||
function merged_output()
|
function merged_output()
|
||||||
{
|
{
|
||||||
|
@ -793,7 +793,7 @@ class diff_renderer_side_by_side extends diff_renderer
|
|||||||
{
|
{
|
||||||
if ($this->state == 'empty')
|
if ($this->state == 'empty')
|
||||||
{
|
{
|
||||||
return '';
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is just an addition line.
|
// This is just an addition line.
|
||||||
|
@ -118,11 +118,11 @@ function phpbb_gmgetdate($time = false)
|
|||||||
* @param mixed $value filesize in bytes
|
* @param mixed $value filesize in bytes
|
||||||
* (non-negative number; int, float or string)
|
* (non-negative number; int, float or string)
|
||||||
* @param bool $string_only true if language string should be returned
|
* @param bool $string_only true if language string should be returned
|
||||||
* @param array $allowed_units only allow these units (data array indexes)
|
* @param array|null $allowed_units only allow these units (data array indexes)
|
||||||
*
|
*
|
||||||
* @return mixed data array if $string_only is false
|
* @return array|string data array if $string_only is false
|
||||||
*/
|
*/
|
||||||
function get_formatted_filesize($value, $string_only = true, $allowed_units = false)
|
function get_formatted_filesize($value, bool $string_only = true, array $allowed_units = null)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ function get_formatted_filesize($value, $string_only = true, $allowed_units = fa
|
|||||||
|
|
||||||
foreach ($available_units as $si_identifier => $unit_info)
|
foreach ($available_units as $si_identifier => $unit_info)
|
||||||
{
|
{
|
||||||
if (!empty($allowed_units) && $si_identifier != 'b' && !in_array($si_identifier, $allowed_units))
|
if (is_array($allowed_units) && $si_identifier != 'b' && !in_array($si_identifier, $allowed_units))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -240,12 +240,12 @@ function still_on_time($extra_time = 15)
|
|||||||
*
|
*
|
||||||
* @param string $version1 First version number
|
* @param string $version1 First version number
|
||||||
* @param string $version2 Second version number
|
* @param string $version2 Second version number
|
||||||
* @param string $operator Comparison operator (optional)
|
* @param string|null $operator Comparison operator (optional)
|
||||||
*
|
*
|
||||||
* @return mixed Boolean (true, false) if comparison operator is specified.
|
* @return mixed Boolean (true, false) if comparison operator is specified.
|
||||||
* Integer (-1, 0, 1) otherwise.
|
* Integer (-1, 0, 1) otherwise.
|
||||||
*/
|
*/
|
||||||
function phpbb_version_compare($version1, $version2, $operator = null)
|
function phpbb_version_compare(string $version1, string $version2, string $operator = null)
|
||||||
{
|
{
|
||||||
$version1 = strtolower($version1);
|
$version1 = strtolower($version1);
|
||||||
$version2 = strtolower($version2);
|
$version2 = strtolower($version2);
|
||||||
@ -447,7 +447,7 @@ function phpbb_get_timezone_identifiers($selected_timezone)
|
|||||||
* @param string $default A timezone to select
|
* @param string $default A timezone to select
|
||||||
* @param boolean $truncate Shall we truncate the options text
|
* @param boolean $truncate Shall we truncate the options text
|
||||||
*
|
*
|
||||||
* @return array Returns an array containing the options for the time selector.
|
* @return string Returns an array containing the options for the time selector.
|
||||||
*/
|
*/
|
||||||
function phpbb_timezone_select($template, $user, $default = '', $truncate = false)
|
function phpbb_timezone_select($template, $user, $default = '', $truncate = false)
|
||||||
{
|
{
|
||||||
@ -1908,7 +1908,7 @@ function meta_refresh($time, $url, $disable_cd_check = false)
|
|||||||
*
|
*
|
||||||
* @param int $code HTTP status code
|
* @param int $code HTTP status code
|
||||||
* @param string $message Message for the status code
|
* @param string $message Message for the status code
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function send_status_line($code, $message)
|
function send_status_line($code, $message)
|
||||||
{
|
{
|
||||||
@ -2893,7 +2893,7 @@ function short_ipv6($ip, $length)
|
|||||||
*
|
*
|
||||||
* @param string $address IP address
|
* @param string $address IP address
|
||||||
*
|
*
|
||||||
* @return mixed false if specified address is not valid,
|
* @return string|false false if specified address is not valid,
|
||||||
* string otherwise
|
* string otherwise
|
||||||
*/
|
*/
|
||||||
function phpbb_ip_normalise(string $address)
|
function phpbb_ip_normalise(string $address)
|
||||||
@ -2922,8 +2922,9 @@ function phpbb_ip_normalise(string $address)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Error and message handler, call with trigger_error if read
|
* Error and message handler, call with trigger_error if read
|
||||||
|
* @return bool true to bypass internal error handler, false otherwise
|
||||||
*/
|
*/
|
||||||
function msg_handler($errno, $msg_text, $errfile, $errline)
|
function msg_handler($errno, $msg_text, $errfile, $errline): bool
|
||||||
{
|
{
|
||||||
global $cache, $db, $auth, $template, $config, $user, $request;
|
global $cache, $db, $auth, $template, $config, $user, $request;
|
||||||
global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
||||||
@ -2932,7 +2933,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||||||
// Do not display notices if we suppress them via @
|
// Do not display notices if we suppress them via @
|
||||||
if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
|
if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Message handler is stripping text. In case we need it, we are possible to define long text...
|
// Message handler is stripping text. In case we need it, we are possible to define long text...
|
||||||
@ -2950,7 +2951,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||||||
// If DEBUG is defined the default level is E_ALL
|
// If DEBUG is defined the default level is E_ALL
|
||||||
if (($errno & ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
if (($errno & ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
|
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
|
||||||
@ -2968,7 +2969,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||||||
// echo '<br /><br />BACKTRACE<br />' . get_backtrace() . '<br />' . "\n";
|
// echo '<br /><br />BACKTRACE<br />' . get_backtrace() . '<br />' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -761,6 +761,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove topic(s)
|
* Remove topic(s)
|
||||||
|
* @return array with topics and posts affected
|
||||||
*/
|
*/
|
||||||
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
|
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
|
||||||
{
|
{
|
||||||
@ -1202,7 +1203,7 @@ function delete_topic_shadows($forum_id, $sql_more = '', $auto_sync = true)
|
|||||||
if (!$forum_id)
|
if (!$forum_id)
|
||||||
{
|
{
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
return;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set of affected forums we have to resync
|
// Set of affected forums we have to resync
|
||||||
@ -2325,6 +2326,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prune function
|
* Prune function
|
||||||
|
* @return array with topics and posts affected
|
||||||
*/
|
*/
|
||||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true, $prune_limit = 0)
|
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true, $prune_limit = 0)
|
||||||
{
|
{
|
||||||
@ -2337,7 +2339,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
|||||||
|
|
||||||
if (!count($forum_id))
|
if (!count($forum_id))
|
||||||
{
|
{
|
||||||
return;
|
return ['topics' => 0, 'posts' => 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_and = '';
|
$sql_and = '';
|
||||||
@ -2697,7 +2699,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
|||||||
* @param \phpbb\auth\auth $auth Authentication object
|
* @param \phpbb\auth\auth $auth Authentication object
|
||||||
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
||||||
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||||
{
|
{
|
||||||
@ -3116,7 +3118,7 @@ function add_permission_language()
|
|||||||
* @param int $flag The binary flag which is OR-ed with the current column value
|
* @param int $flag The binary flag which is OR-ed with the current column value
|
||||||
* @param string $sql_more This string is attached to the sql query generated to update the table.
|
* @param string $sql_more This string is attached to the sql query generated to update the table.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more = '')
|
function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more = '')
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ function cache_moderators()
|
|||||||
* @deprecated 3.1.0 (To be removed: 4.0.0)
|
* @deprecated 3.1.0 (To be removed: 4.0.0)
|
||||||
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
||||||
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function update_foes($group_id = false, $user_id = false)
|
function update_foes($group_id = false, $user_id = false)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ if (!defined('IN_PHPBB'))
|
|||||||
* @param string $column Column whose values to change
|
* @param string $column Column whose values to change
|
||||||
* @param array $from_values An array of values that should be changed
|
* @param array $from_values An array of values that should be changed
|
||||||
* @param int $to_value The new value
|
* @param int $to_value The new value
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver_interface $db, $table, $column, $from_values, $to_value)
|
function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver_interface $db, $table, $column, $from_values, $to_value)
|
||||||
{
|
{
|
||||||
|
@ -695,7 +695,7 @@ function phpbb_mcp_sorting($mode, &$sort_days_val, &$sort_key_val, &$sort_dir_va
|
|||||||
* @param array|false $acl_list A list of permissions the user need to have
|
* @param array|false $acl_list A list of permissions the user need to have
|
||||||
* @param mixed $single_forum Limit to one forum id (int) or the first forum found (true)
|
* @param mixed $single_forum Limit to one forum id (int) or the first forum found (true)
|
||||||
*
|
*
|
||||||
* @return mixed False if no ids were able to be retrieved, true if at least one id left.
|
* @return bool|int False if no ids were able to be retrieved, true if at least one id left.
|
||||||
* Additionally, this value can be the forum_id assigned if $single_forum was set.
|
* Additionally, this value can be the forum_id assigned if $single_forum was set.
|
||||||
* Therefore checking the result for with !== false is the best method.
|
* Therefore checking the result for with !== false is the best method.
|
||||||
*/
|
*/
|
||||||
|
@ -1570,6 +1570,8 @@ class smtp_class
|
|||||||
unset($response[0]);
|
unset($response[0]);
|
||||||
$this->commands[$response_code] = implode(' ', $response);
|
$this->commands[$response_code] = implode(' ', $response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -253,6 +253,7 @@ function generate_smilies($mode, $forum_id)
|
|||||||
* @param string $type Can be forum|topic
|
* @param string $type Can be forum|topic
|
||||||
* @param mixed $ids topic/forum ids
|
* @param mixed $ids topic/forum ids
|
||||||
* @param bool $return_update_sql true: SQL query shall be returned, false: execute SQL
|
* @param bool $return_update_sql true: SQL query shall be returned, false: execute SQL
|
||||||
|
* @return array|null SQL query, null otherwise
|
||||||
*/
|
*/
|
||||||
function update_post_information($type, $ids, $return_update_sql = false)
|
function update_post_information($type, $ids, $return_update_sql = false)
|
||||||
{
|
{
|
||||||
@ -412,7 +413,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2780,7 +2781,7 @@ function phpbb_upload_popup($forum_style = 0)
|
|||||||
* @param bool $is_soft The flag indicating whether it is the soft delete mode
|
* @param bool $is_soft The flag indicating whether it is the soft delete mode
|
||||||
* @param string $delete_reason Description for the post deletion reason
|
* @param string $delete_reason Description for the post deletion reason
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $delete_reason = '')
|
function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $delete_reason = '')
|
||||||
{
|
{
|
||||||
|
@ -1727,7 +1727,7 @@ function phpbb_validate_timezone($timezone)
|
|||||||
* @param string $username The username to check
|
* @param string $username The username to check
|
||||||
* @param string $allowed_username An allowed username, default being $user->data['username']
|
* @param string $allowed_username An allowed username, default being $user->data['username']
|
||||||
*
|
*
|
||||||
* @return mixed Either false if validation succeeded or a string which will be
|
* @return string|false Either false if validation succeeded or a string which will be
|
||||||
* used as the error message (with the variable name appended)
|
* used as the error message (with the variable name appended)
|
||||||
*/
|
*/
|
||||||
function validate_username($username, $allowed_username = false, $allow_all_names = false)
|
function validate_username($username, $allowed_username = false, $allow_all_names = false)
|
||||||
@ -2723,7 +2723,7 @@ function group_delete($group_id, $group_name = false)
|
|||||||
/**
|
/**
|
||||||
* Add user(s) to group
|
* Add user(s) to group
|
||||||
*
|
*
|
||||||
* @return mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
|
* @return string|false false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
|
||||||
*/
|
*/
|
||||||
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
|
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
|
||||||
{
|
{
|
||||||
@ -3073,6 +3073,7 @@ function remove_default_avatar($group_id, $user_ids)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the group rank of the default group from the users in user_ids who have that group as default.
|
* Removes the group rank of the default group from the users in user_ids who have that group as default.
|
||||||
|
* @return bool true if successful, false if not
|
||||||
*/
|
*/
|
||||||
function remove_default_rank($group_id, $user_ids)
|
function remove_default_rank($group_id, $user_ids)
|
||||||
{
|
{
|
||||||
@ -3107,6 +3108,8 @@ function remove_default_rank($group_id, $user_ids)
|
|||||||
AND user_rank = ' . (int) $row['group_rank'] . '
|
AND user_rank = ' . (int) $row['group_rank'] . '
|
||||||
AND ' . $db->sql_in_set('user_id', $user_ids);
|
AND ' . $db->sql_in_set('user_id', $user_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -677,7 +677,7 @@ class mcp_queue
|
|||||||
* @param $post_id_list array IDs of the posts to approve/restore
|
* @param $post_id_list array IDs of the posts to approve/restore
|
||||||
* @param $id mixed Category of the current active module
|
* @param $id mixed Category of the current active module
|
||||||
* @param $mode string Active module
|
* @param $mode string Active module
|
||||||
* @return null
|
* @return void|never
|
||||||
*/
|
*/
|
||||||
public static function approve_posts($action, $post_id_list, $id, $mode)
|
public static function approve_posts($action, $post_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
@ -937,7 +937,7 @@ class mcp_queue
|
|||||||
* @param $topic_id_list array IDs of the topics to approve/restore
|
* @param $topic_id_list array IDs of the topics to approve/restore
|
||||||
* @param $id mixed Category of the current active module
|
* @param $id mixed Category of the current active module
|
||||||
* @param $mode string Active module
|
* @param $mode string Active module
|
||||||
* @return null
|
* @return void|never
|
||||||
*/
|
*/
|
||||||
public static function approve_topics($action, $topic_id_list, $id, $mode)
|
public static function approve_topics($action, $topic_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
@ -1136,7 +1136,7 @@ class mcp_queue
|
|||||||
* @param $post_id_list array IDs of the posts to disapprove/delete
|
* @param $post_id_list array IDs of the posts to disapprove/delete
|
||||||
* @param $id mixed Category of the current active module
|
* @param $id mixed Category of the current active module
|
||||||
* @param $mode string Active module
|
* @param $mode string Active module
|
||||||
* @return null
|
* @return void|never
|
||||||
*/
|
*/
|
||||||
public static function disapprove_posts($post_id_list, $id, $mode)
|
public static function disapprove_posts($post_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
|
@ -1902,7 +1902,7 @@ class parse_message extends bbcode_firstpass
|
|||||||
* Remove nested quotes at given depth in current parsed message
|
* Remove nested quotes at given depth in current parsed message
|
||||||
*
|
*
|
||||||
* @param integer $max_depth Depth limit
|
* @param integer $max_depth Depth limit
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function remove_nested_quotes($max_depth)
|
public function remove_nested_quotes($max_depth)
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ class phpbb_questionnaire_data_collector
|
|||||||
/**
|
/**
|
||||||
* Collect info into the data property.
|
* Collect info into the data property.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
function collect()
|
function collect()
|
||||||
{
|
{
|
||||||
|
@ -1317,7 +1317,7 @@ function phpbb_get_files_dir()
|
|||||||
{
|
{
|
||||||
if (!defined('MOD_ATTACHMENT'))
|
if (!defined('MOD_ATTACHMENT'))
|
||||||
{
|
{
|
||||||
return;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
global $src_db, $same_db, $convert, $user;
|
global $src_db, $same_db, $convert, $user;
|
||||||
|
@ -47,7 +47,7 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
function installer_msg_handler($errno, $msg_text, $errfile, $errline): bool
|
||||||
{
|
{
|
||||||
global $phpbb_installer_container, $msg_long_text;
|
global $phpbb_installer_container, $msg_long_text;
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
|||||||
print($msg);
|
print($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return false;
|
||||||
break;
|
break;
|
||||||
case E_USER_ERROR:
|
case E_USER_ERROR:
|
||||||
$msg = '<b>General Error:</b><br>' . $msg_text . '<br> in file ' . $errfile . ' on line ' . $errline . '<br><br>';
|
$msg = '<b>General Error:</b><br>' . $msg_text . '<br> in file ' . $errfile . ' on line ' . $errline . '<br><br>';
|
||||||
|
@ -75,7 +75,7 @@ abstract class captcha_abstract
|
|||||||
if (!$this->load_code())
|
if (!$this->load_code())
|
||||||
{
|
{
|
||||||
// invalid request, bail out
|
// invalid request, bail out
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$generator = $this->get_generator_class();
|
$generator = $this->get_generator_class();
|
||||||
|
@ -48,7 +48,7 @@ class db_text
|
|||||||
* @param string $key The configuration option's name
|
* @param string $key The configuration option's name
|
||||||
* @param string $value New configuration value
|
* @param string $value New configuration value
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set($key, $value)
|
public function set($key, $value)
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ class db_text
|
|||||||
*
|
*
|
||||||
* @param string $key The configuration option's name
|
* @param string $key The configuration option's name
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function delete($key)
|
public function delete($key)
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@ class db_text
|
|||||||
*
|
*
|
||||||
* @param array $map Map from configuration names to values
|
* @param array $map Map from configuration names to values
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set_array(array $map)
|
public function set_array(array $map)
|
||||||
{
|
{
|
||||||
@ -147,7 +147,7 @@ class db_text
|
|||||||
*
|
*
|
||||||
* @param array $keys Set of configuration option names
|
* @param array $keys Set of configuration option names
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function delete_array(array $keys)
|
public function delete_array(array $keys)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ class config_php_file
|
|||||||
/**
|
/**
|
||||||
* Load the config file and store the information.
|
* Load the config file and store the information.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function load_config_file()
|
protected function load_config_file()
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ class run extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ class install extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ class list_available extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ class manage extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ class remove extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ class update extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ class list_all extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ class reparse extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ class delete extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ class generate extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ class recreate extends \phpbb\console\command\command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ class check extends \phpbb\console\command\command
|
|||||||
*
|
*
|
||||||
* Sets the name and description of the command.
|
* Sets the name and description of the command.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ class activate extends command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@ class activate extends command
|
|||||||
*
|
*
|
||||||
* @param array $user_row The user data array
|
* @param array $user_row The user data array
|
||||||
* @param InputInterface $input The input stream used to get the options
|
* @param InputInterface $input The input stream used to get the options
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function send_notification($user_row, InputInterface $input)
|
protected function send_notification($user_row, InputInterface $input)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ class add extends command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ class add extends command
|
|||||||
* Validate the submitted user data
|
* Validate the submitted user data
|
||||||
*
|
*
|
||||||
* @throws runtime_exception if any data fails validation
|
* @throws runtime_exception if any data fails validation
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function validate_user_data()
|
protected function validate_user_data()
|
||||||
{
|
{
|
||||||
@ -283,7 +283,7 @@ class add extends command
|
|||||||
* Send account activation email
|
* Send account activation email
|
||||||
*
|
*
|
||||||
* @param int $user_id The new user's id
|
* @param int $user_id The new user's id
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function send_activation_email($user_id)
|
protected function send_activation_email($user_id)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ class delete extends command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ class reclean extends command
|
|||||||
/**
|
/**
|
||||||
* Sets the command name and description
|
* Sets the command name and description
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
|
@ -839,7 +839,7 @@ class content_visibility
|
|||||||
*
|
*
|
||||||
* @param $data array Contains information from the topics table about given topic
|
* @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 (by reference)
|
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function add_post_to_statistic($data, &$sql_data)
|
public function add_post_to_statistic($data, &$sql_data)
|
||||||
{
|
{
|
||||||
@ -860,7 +860,7 @@ class content_visibility
|
|||||||
*
|
*
|
||||||
* @param $data array Contains information from the topics table about given topic
|
* @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 (by reference)
|
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function remove_post_from_statistic($data, &$sql_data)
|
public function remove_post_from_statistic($data, &$sql_data)
|
||||||
{
|
{
|
||||||
@ -893,7 +893,7 @@ class content_visibility
|
|||||||
*
|
*
|
||||||
* @param $data array Post and topic data
|
* @param $data array Post and topic data
|
||||||
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function remove_topic_from_statistic($data, &$sql_data)
|
public function remove_topic_from_statistic($data, &$sql_data)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ class resolver implements ControllerResolverInterface
|
|||||||
* Load a controller callable
|
* Load a controller callable
|
||||||
*
|
*
|
||||||
* @param Request $request Symfony Request object
|
* @param Request $request Symfony Request object
|
||||||
* @return bool|Callable Callable or false
|
* @return false|Callable Callable or false (fixme: method is returning an array)
|
||||||
* @throws \phpbb\controller\exception
|
* @throws \phpbb\controller\exception
|
||||||
*/
|
*/
|
||||||
public function getController(Request $request)
|
public function getController(Request $request)
|
||||||
|
@ -46,7 +46,7 @@ class prune_all_forums extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\para
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\para
|
|||||||
*
|
*
|
||||||
* @param \phpbb\request\request_interface $request Request object.
|
* @param \phpbb\request\request_interface $request Request object.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function parse_parameters(\phpbb\request\request_interface $request)
|
public function parse_parameters(\phpbb\request\request_interface $request)
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ class queue extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ class tidy_cache extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ class tidy_database extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ class tidy_search extends base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ class tidy_sessions extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@ class tidy_warnings extends \phpbb\cron\task\base
|
|||||||
/**
|
/**
|
||||||
* Runs this cron task.
|
* Runs this cron task.
|
||||||
*
|
*
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ class mysql_extractor extends base_extractor
|
|||||||
* Extracts data from database table (for MySQLi driver)
|
* Extracts data from database table (for MySQLi driver)
|
||||||
*
|
*
|
||||||
* @param string $table_name name of the database table
|
* @param string $table_name name of the database table
|
||||||
* @return null
|
* @return void
|
||||||
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
||||||
*/
|
*/
|
||||||
protected function write_data_mysqli($table_name)
|
protected function write_data_mysqli($table_name)
|
||||||
@ -176,7 +176,7 @@ class mysql_extractor extends base_extractor
|
|||||||
* Extracts database table structure (for MySQLi or MySQL 3.23.20+)
|
* Extracts database table structure (for MySQLi or MySQL 3.23.20+)
|
||||||
*
|
*
|
||||||
* @param string $table_name name of the database table
|
* @param string $table_name name of the database table
|
||||||
* @return null
|
* @return void
|
||||||
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
||||||
*/
|
*/
|
||||||
protected function new_write_table($table_name)
|
protected function new_write_table($table_name)
|
||||||
@ -201,7 +201,7 @@ class mysql_extractor extends base_extractor
|
|||||||
* Extracts database table structure (for MySQL versions older than 3.23.20)
|
* Extracts database table structure (for MySQL versions older than 3.23.20)
|
||||||
*
|
*
|
||||||
* @param string $table_name name of the database table
|
* @param string $table_name name of the database table
|
||||||
* @return null
|
* @return void
|
||||||
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
* @throws extractor_not_initialized_exception when calling this function before init_extractor()
|
||||||
*/
|
*/
|
||||||
protected function old_write_table($table_name)
|
protected function old_write_table($table_name)
|
||||||
|
@ -184,7 +184,7 @@ abstract class profilefield_base_migration extends container_aware_migration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $start Start of staggering step
|
* @param int $start Start of staggering step
|
||||||
* @return mixed int start of the next step, null if the end was reached
|
* @return int|null int start of the next step, null if the end was reached
|
||||||
*/
|
*/
|
||||||
public function convert_user_field_to_custom_field($start)
|
public function convert_user_field_to_custom_field($start)
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ abstract class profilefield_base_migration extends container_aware_migration
|
|||||||
if ($converted_users < $limit)
|
if ($converted_users < $limit)
|
||||||
{
|
{
|
||||||
// No more users left, we are done...
|
// No more users left, we are done...
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $start + $limit;
|
return $start + $limit;
|
||||||
|
@ -63,7 +63,7 @@ class config_text implements \phpbb\db\migration\tool\tool_interface
|
|||||||
* @param string $config_name The name of the config_text setting you would
|
* @param string $config_name The name of the config_text setting you would
|
||||||
* like to update
|
* like to update
|
||||||
* @param mixed $config_value The value of the config_text setting
|
* @param mixed $config_value The value of the config_text setting
|
||||||
* @return null
|
* @return void
|
||||||
* @throws \phpbb\db\migration\exception
|
* @throws \phpbb\db\migration\exception
|
||||||
*/
|
*/
|
||||||
public function update($config_name, $config_value)
|
public function update($config_name, $config_value)
|
||||||
|
@ -732,7 +732,7 @@ class migrator
|
|||||||
|
|
||||||
if ($callable_and_parameters === false)
|
if ($callable_and_parameters === false)
|
||||||
{
|
{
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$callable = $callable_and_parameters[0];
|
$callable = $callable_and_parameters[0];
|
||||||
|
@ -27,7 +27,7 @@ class collection_pass implements CompilerPassInterface
|
|||||||
* Modify the container before it is passed to the rest of the code
|
* Modify the container before it is passed to the rest of the code
|
||||||
*
|
*
|
||||||
* @param ContainerBuilder $container ContainerBuilder object
|
* @param ContainerBuilder $container ContainerBuilder object
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function process(ContainerBuilder $container)
|
public function process(ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ class kernel_exception_subscriber implements EventSubscriberInterface
|
|||||||
* This listener is run when the KernelEvents::EXCEPTION event is triggered
|
* This listener is run when the KernelEvents::EXCEPTION event is triggered
|
||||||
*
|
*
|
||||||
* @param ExceptionEvent $event
|
* @param ExceptionEvent $event
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function on_kernel_exception(ExceptionEvent $event)
|
public function on_kernel_exception(ExceptionEvent $event)
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,7 @@ class extension_base extends Extension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +124,7 @@ class help
|
|||||||
* Assigns the help data to the template blocks
|
* Assigns the help data to the template blocks
|
||||||
*
|
*
|
||||||
* @param array $help_data
|
* @param array $help_data
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function assign_to_template(array $help_data)
|
protected function assign_to_template(array $help_data)
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,7 @@ abstract class form
|
|||||||
* Bind the values of the request to the form
|
* Bind the values of the request to the form
|
||||||
*
|
*
|
||||||
* @param \phpbb\request\request_interface $request
|
* @param \phpbb\request\request_interface $request
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function bind(\phpbb\request\request_interface $request)
|
public function bind(\phpbb\request\request_interface $request)
|
||||||
{
|
{
|
||||||
@ -130,7 +130,7 @@ abstract class form
|
|||||||
* Submit form, generate the email and send it
|
* Submit form, generate the email and send it
|
||||||
*
|
*
|
||||||
* @param \messenger $messenger
|
* @param \messenger $messenger
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function submit(\messenger $messenger)
|
public function submit(\messenger $messenger)
|
||||||
{
|
{
|
||||||
@ -162,7 +162,7 @@ abstract class form
|
|||||||
* Render the template of the form
|
* Render the template of the form
|
||||||
*
|
*
|
||||||
* @param \phpbb\template\template $template
|
* @param \phpbb\template\template $template
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function render(\phpbb\template\template $template)
|
public function render(\phpbb\template\template $template)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +138,7 @@ class plupload
|
|||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'result' => null,
|
'result' => null,
|
||||||
));
|
));
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class report_reason_list_provider
|
|||||||
* Sets template variables to render report reasons select HTML input
|
* Sets template variables to render report reasons select HTML input
|
||||||
*
|
*
|
||||||
* @param int $reason_id
|
* @param int $reason_id
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function display_reasons($reason_id = 0)
|
public function display_reasons($reason_id = 0)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ class default_resources_locator implements resources_locator_interface
|
|||||||
*
|
*
|
||||||
* @param string $phpbb_root_path phpBB root path
|
* @param string $phpbb_root_path phpBB root path
|
||||||
* @param string $environment Name of the current environment
|
* @param string $environment Name of the current environment
|
||||||
* @param manager $extension_manager Extension manager
|
* @param manager|null $extension_manager Extension manager
|
||||||
*/
|
*/
|
||||||
public function __construct($phpbb_root_path, $environment, manager $extension_manager = null)
|
public function __construct($phpbb_root_path, $environment, manager $extension_manager = null)
|
||||||
{
|
{
|
||||||
|
@ -1011,7 +1011,7 @@ class fulltext_postgres extends base implements search_backend_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* Computes the stats and store them in the $this->stats associative array
|
||||||
*/
|
*/
|
||||||
protected function get_stats()
|
protected function get_stats()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ class exception extends runtime_exception
|
|||||||
* @param string $message The Exception message to throw (must be a language variable)
|
* @param string $message The Exception message to throw (must be a language variable)
|
||||||
* @param string $filename The file that caused the error
|
* @param string $filename The file that caused the error
|
||||||
* @param array $parameters The parameters to use with the language var
|
* @param array $parameters The parameters to use with the language var
|
||||||
* @param \Exception $previous The previous runtime_exception used for the runtime_exception chaining
|
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining
|
||||||
* @param integer $code The Exception code
|
* @param integer $code The Exception code
|
||||||
*/
|
*/
|
||||||
public function __construct($message = '', $filename = '', $parameters = [], \Exception $previous = null, $code = 0)
|
public function __construct($message = '', $filename = '', $parameters = [], \Exception $previous = null, $code = 0)
|
||||||
|
@ -340,7 +340,7 @@ class context
|
|||||||
* If key is false the position is set to 0
|
* If key is false the position is set to 0
|
||||||
* If key is true the position is set to the last entry
|
* If key is true the position is set to the last entry
|
||||||
*
|
*
|
||||||
* @return mixed false if not found, index position otherwise; be sure to test with ===
|
* @return false|int false if not found, index position otherwise; be sure to test with ===
|
||||||
*/
|
*/
|
||||||
public function find_key_index($blockname, $key)
|
public function find_key_index($blockname, $key)
|
||||||
{
|
{
|
||||||
@ -377,7 +377,7 @@ class context
|
|||||||
// Change key to zero (change first position) if false and to last position if true
|
// Change key to zero (change first position) if false and to last position if true
|
||||||
if (is_bool($key))
|
if (is_bool($key))
|
||||||
{
|
{
|
||||||
return (!$key) ? 0 : count($block) - 1;
|
return (!$key) ? 0 : (count($block) ?? 0) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get correct position if array given
|
// Get correct position if array given
|
||||||
|
@ -54,9 +54,9 @@ class environment extends \Twig\Environment
|
|||||||
* @param \phpbb\filesystem\filesystem $filesystem
|
* @param \phpbb\filesystem\filesystem $filesystem
|
||||||
* @param \phpbb\path_helper $path_helper phpBB path helper
|
* @param \phpbb\path_helper $path_helper phpBB path helper
|
||||||
* @param string $cache_path The path to the cache directory
|
* @param string $cache_path The path to the cache directory
|
||||||
* @param \phpbb\extension\manager $extension_manager phpBB extension manager
|
* @param \phpbb\extension\manager|null $extension_manager phpBB extension manager
|
||||||
* @param \Twig\Loader\LoaderInterface $loader Twig loader interface
|
* @param \Twig\Loader\LoaderInterface|null $loader Twig loader interface
|
||||||
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
|
* @param \phpbb\event\dispatcher_interface|null $phpbb_dispatcher Event dispatcher object
|
||||||
* @param array $options Array of options to pass to Twig
|
* @param array $options Array of options to pass to Twig
|
||||||
*/
|
*/
|
||||||
public function __construct(\phpbb\config\config $phpbb_config, \phpbb\filesystem\filesystem $filesystem, \phpbb\path_helper $path_helper, $cache_path, \phpbb\extension\manager $extension_manager = null, \Twig\Loader\LoaderInterface $loader = null, \phpbb\event\dispatcher_interface $phpbb_dispatcher = null, $options = array())
|
public function __construct(\phpbb\config\config $phpbb_config, \phpbb\filesystem\filesystem $filesystem, \phpbb\path_helper $path_helper, $cache_path, \phpbb\extension\manager $extension_manager = null, \Twig\Loader\LoaderInterface $loader = null, \phpbb\event\dispatcher_interface $phpbb_dispatcher = null, $options = array())
|
||||||
@ -195,7 +195,7 @@ class environment extends \Twig\Environment
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* Get template with assets
|
||||||
*/
|
*/
|
||||||
private function display_with_assets($name, array $context = [])
|
private function display_with_assets($name, array $context = [])
|
||||||
{
|
{
|
||||||
@ -261,7 +261,7 @@ class environment extends \Twig\Environment
|
|||||||
*
|
*
|
||||||
* @param string $cls The template class associated with the given template name
|
* @param string $cls The template class associated with the given template name
|
||||||
* @param string $name The template name
|
* @param string $name The template name
|
||||||
* @param integer $index The index if it is an embedded template
|
* @param integer|null $index The index if it is an embedded template
|
||||||
* @return \Twig\Template A template instance representing the given template name
|
* @return \Twig\Template A template instance representing the given template name
|
||||||
* @throws \Twig\Error\LoaderError
|
* @throws \Twig\Error\LoaderError
|
||||||
*/
|
*/
|
||||||
|
@ -700,7 +700,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
|
|||||||
* @param bool $set_subset_zero Should the parent, left and right id of the items be set to 0, or kept unchanged?
|
* @param bool $set_subset_zero Should the parent, left and right id of the items be set to 0, or kept unchanged?
|
||||||
* In case of removing an item from the tree, we should the values to 0
|
* In case of removing an item from the tree, we should the values to 0
|
||||||
* In case of moving an item, we shouldkeep the original values, in order to allow "+ diff" later
|
* In case of moving an item, we shouldkeep the original values, in order to allow "+ diff" later
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function remove_subset(array $subset_items, array $bounding_item, $set_subset_zero = true)
|
protected function remove_subset(array $subset_items, array $bounding_item, $set_subset_zero = true)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user