[ticket/16754] Fix docblocks

PHPBB3-16754
This commit is contained in:
Máté Bartus 2021-04-10 10:22:54 +02:00
parent 1482efc927
commit 6eb357b421
16 changed files with 31 additions and 22 deletions

View file

@ -1075,7 +1075,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query * @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start * @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start
* *
* @return array[int][int] Topic ids as keys, mark_time of topic as value * @return int[] Topic ids as keys, mark_time of topic as value
*/ */
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0) function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
{ {

View file

@ -2418,7 +2418,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
* must be carried through for the moderators table. * must be carried through for the moderators table.
* *
* @param \phpbb\db\driver\driver_interface $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface Cache driver * @param \phpbb\cache\driver\driver_interface $cache Cache driver
* @param \phpbb\auth\auth $auth Authentication object * @param \phpbb\auth\auth $auth Authentication object
* @return null * @return null
*/ */
@ -2605,7 +2605,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
* @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids) * @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
* @param int $topic_id Restrict the log entries to the given topic_id * @param int $topic_id Restrict the log entries to the given topic_id
* @param int $user_id Restrict the log entries to the given user_id * @param int $user_id Restrict the log entries to the given user_id
* @param int $log_time Only get log entries newer than the given timestamp * @param int $limit_days Only get log entries newer than the given timestamp
* @param string $sort_by SQL order option, e.g. 'l.log_time DESC' * @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
* @param string $keywords Will only return log entries that have the keywords in log_operation or log_data * @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
* *

View file

@ -223,12 +223,12 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
/** /**
* Add log entry * Add log entry
* *
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved * string $mode The mode defines which log_type is used and from which log the entry is retrieved
* @param int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise * int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
* @param int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise * int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
* @param int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise * int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
* @param string $log_operation Name of the operation * string $log_operation Name of the operation
* @param array $additional_data More arguments can be added, depending on the log_type * array $additional_data More arguments can be added, depending on the log_type
* *
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise. * @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
* *
@ -345,7 +345,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for * @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
* \phpbb\request\request_interface::variable for backwards compatability reasons. * \phpbb\request\request_interface::variable for backwards compatability reasons.
* @param \phpbb\request\request_interface|null|false If an instance of \phpbb\request\request_interface is given the instance is stored in * @param \phpbb\request\request_interface|null|false $request
* If an instance of \phpbb\request\request_interface is given the instance is stored in
* a static variable and used for all further calls where this parameters is null. Until * a static variable and used for all further calls where this parameters is null. Until
* the function is called with an instance it automatically creates a new \phpbb\request\request * the function is called with an instance it automatically creates a new \phpbb\request\request
* instance on every call. By passing false this per-call instantiation can be restored * instance on every call. By passing false this per-call instantiation can be restored

View file

@ -1127,6 +1127,7 @@ function add_user_group($group_id, $user_id, $group_leader = false)
* *
* @param string $group The name of the special group to add to * @param string $group The name of the special group to add to
* @param string $select_query An SQL query to retrieve the user(s) to add to the group * @param string $select_query An SQL query to retrieve the user(s) to add to the group
* @param bool $use_src_db
*/ */
function user_group_auth($group, $select_query, $use_src_db) function user_group_auth($group, $select_query, $use_src_db)
{ {

View file

@ -383,7 +383,7 @@ function phpbb_get_pm_data($pm_ids)
/** /**
* sorting in mcp * sorting in mcp
* *
* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR * $where_sql should either be WHERE (default if ommited) or end with AND or OR
* *
* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table * $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table * $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
@ -684,7 +684,7 @@ function phpbb_mcp_sorting($mode, &$sort_days_val, &$sort_key_val, &$sort_dir_va
* @param string $table The table to find the ids in * @param string $table The table to find the ids in
* @param string $sql_id The ids relevant column name * @param string $sql_id The ids relevant column name
* @param array $acl_list A list of permissions the user need to have * @param array $acl_list A list of permissions the user need to have
* @param mixed $singe_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 mixed 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.

View file

@ -1848,6 +1848,7 @@ class smtp_class
* *
* Please note that this version fully supports RFC 2045 section 6.8. * Please note that this version fully supports RFC 2045 section 6.8.
* *
* @param string $str
* @param string $eol End of line we are using (optional to be backwards compatible) * @param string $eol End of line we are using (optional to be backwards compatible)
*/ */
function mail_encode($str, $eol = "\r\n") function mail_encode($str, $eol = "\r\n")

View file

@ -797,6 +797,8 @@ function user_delete($mode, $user_ids, $retain_username = true)
* Flips user_type from active to inactive and vice versa, handles group membership updates * Flips user_type from active to inactive and vice versa, handles group membership updates
* *
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate * @param string $mode can be flip for flipping from active/inactive, activate or deactivate
* @param array $user_id_ary
* @param int $reason
*/ */
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
{ {
@ -919,6 +921,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD) * @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
* @param boolean $ban_exclude Exclude these entities from banning? * @param boolean $ban_exclude Exclude these entities from banning?
* @param string $ban_reason String describing the reason for this ban * @param string $ban_reason String describing the reason for this ban
* @param string $ban_give_reason
* @return boolean * @return boolean
*/ */
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '') function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
@ -1611,6 +1614,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
/** /**
* Validate Date * Validate Date
* @param string $date_string a date in the dd-mm-yyyy format * @param string $date_string a date in the dd-mm-yyyy format
* @param bool $optional
* @return boolean * @return boolean
*/ */
function validate_date($date_string, $optional = false) function validate_date($date_string, $optional = false)
@ -1882,6 +1886,7 @@ function validate_password($password)
* Check to see if email address is a valid address and contains a MX record * Check to see if email address is a valid address and contains a MX record
* *
* @param string $email The email to check * @param string $email The email to check
* @param $config
* *
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) * @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/ */
@ -3621,7 +3626,8 @@ function group_update_listings($group_id)
/** /**
* Funtion to make a user leave the NEWLY_REGISTERED system group. * Funtion to make a user leave the NEWLY_REGISTERED system group.
* @access public * @access public
* @param $user_id The id of the user to remove from the group * @param int $user_id The id of the user to remove from the group
* @param mixed $user_data The id of the user to remove from the group
*/ */
function remove_newly_registered($user_id, $user_data = false) function remove_newly_registered($user_id, $user_data = false)
{ {

View file

@ -38,7 +38,7 @@ class phpbb_questionnaire_data_collector
/** /**
* Constructor. * Constructor.
* *
* @param string * @param string $install_id
*/ */
function __construct($install_id) function __construct($install_id)
{ {

View file

@ -171,7 +171,7 @@ function utf8_strspn($str, $mask, $start = null, $length = null)
* Make a string's first character uppercase * Make a string's first character uppercase
* *
* @author Harry Fuecks * @author Harry Fuecks
* @param string * @param string $str
* @return string with first character as upper case (if applicable) * @return string with first character as upper case (if applicable)
*/ */
function utf8_ucfirst($str) function utf8_ucfirst($str)

View file

@ -42,7 +42,7 @@ interface guesser_interface
/** /**
* Set the guesser priority * Set the guesser priority
* *
* @param int Guesser priority * @param int $priority Guesser priority
* *
* @return void * @return void
*/ */

View file

@ -96,7 +96,7 @@ class fulltext_postgres extends \phpbb\search\base
* @param string $phpEx PHP file extension * @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
*/ */

View file

@ -129,7 +129,7 @@ class fulltext_sphinx
* @param string $phpEx PHP file extension * @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
*/ */

View file

@ -54,7 +54,7 @@ interface template
* Note: Templates are still compiled to phpBB's cache directory. * Note: Templates are still compiled to phpBB's cache directory.
* *
* @param string|array $names Array of names or string of name of template(s) in inheritance tree order, used by extensions. * @param string|array $names Array of names or string of name of template(s) in inheritance tree order, used by extensions.
* @param string|array or string $paths Array of style paths, relative to current root directory * @param string|array $paths Array of style paths, relative to current root directory
* @return \phpbb\template\template $this * @return \phpbb\template\template $this
*/ */
public function set_custom_style($names, $paths); public function set_custom_style($names, $paths);

View file

@ -224,7 +224,7 @@ class twig extends \phpbb\template\base
* 'name' => 'adm', * 'name' => 'adm',
* 'ext_path' => 'adm/style/', * 'ext_path' => 'adm/style/',
* ) * )
* @param string|array of string $paths Array of style paths, relative to current root directory * @param string|array $paths Array of style paths, relative to current root directory
* @return \phpbb\template\template $this * @return \phpbb\template\template $this
*/ */
public function set_custom_style($names, $paths) public function set_custom_style($names, $paths)

View file

@ -181,7 +181,7 @@ class user_loader
* @param bool $query Should we query the database if this user has not yet been loaded? * @param bool $query Should we query the database if this user has not yet been loaded?
* Typically this should be left as false and you should make sure * Typically this should be left as false and you should make sure
* you load users ahead of time with load_users() * you load users ahead of time with load_users()
* @param bool @lazy If true, will be lazy loaded (requires JS) * @param bool $lazy If true, will be lazy loaded (requires JS)
* @return string * @return string
*/ */
public function get_avatar($user_id, $query = false, $lazy = false) public function get_avatar($user_id, $query = false, $lazy = false)

View file

@ -133,7 +133,7 @@ class version_helper
/** /**
* Over-ride the stability to force check to include unstable versions * Over-ride the stability to force check to include unstable versions
* *
* @param null|string Null to not force stability, 'unstable' or 'stable' to * @param null|string $stability Null to not force stability, 'unstable' or 'stable' to
* force the corresponding stability * force the corresponding stability
* @return version_helper * @return version_helper
*/ */