Commit 53749f1e by pupi1985

PHPDoc update in app/favorites, app/limits, app/options and app/users

parent 5669d75e
...@@ -84,8 +84,8 @@ function qa_user_favorite_set($userid, $handle, $cookieid, $entitytype, $entityi ...@@ -84,8 +84,8 @@ function qa_user_favorite_set($userid, $handle, $cookieid, $entitytype, $entityi
/** /**
* Returns content to set in $qa_content['q_list'] for a user's favorite $questions. Pre-generated * Returns content to set in $qa_content['q_list'] for a user's favorite $questions. Pre-generated
* user HTML in $usershtml. * user HTML in $usershtml.
* @param $questions * @param array $questions
* @param $usershtml * @param array $usershtml
* @return array * @return array
*/ */
function qa_favorite_q_list_view($questions, $usershtml) function qa_favorite_q_list_view($questions, $usershtml)
...@@ -118,8 +118,8 @@ function qa_favorite_q_list_view($questions, $usershtml) ...@@ -118,8 +118,8 @@ function qa_favorite_q_list_view($questions, $usershtml)
/** /**
* Returns content to set in $qa_content['ranking_users'] for a user's favorite $users. Pre-generated * Returns content to set in $qa_content['ranking_users'] for a user's favorite $users. Pre-generated
* user HTML in $usershtml. * user HTML in $usershtml.
* @param $users * @param array $users
* @param $usershtml * @param array $usershtml
* @return array|null * @return array|null
*/ */
function qa_favorite_users_view($users, $usershtml) function qa_favorite_users_view($users, $usershtml)
...@@ -154,7 +154,7 @@ function qa_favorite_users_view($users, $usershtml) ...@@ -154,7 +154,7 @@ function qa_favorite_users_view($users, $usershtml)
/** /**
* Returns content to set in $qa_content['ranking_tags'] for a user's favorite $tags. * Returns content to set in $qa_content['ranking_tags'] for a user's favorite $tags.
* @param $tags * @param array $tags
* @return array * @return array
*/ */
function qa_favorite_tags_view($tags) function qa_favorite_tags_view($tags)
...@@ -181,7 +181,7 @@ function qa_favorite_tags_view($tags) ...@@ -181,7 +181,7 @@ function qa_favorite_tags_view($tags)
/** /**
* Returns content to set in $qa_content['nav_list_categories'] for a user's favorite $categories. * Returns content to set in $qa_content['nav_list_categories'] for a user's favorite $categories.
* @param $categories * @param array $categories
* @return array * @return array
*/ */
function qa_favorite_categories_view($categories) function qa_favorite_categories_view($categories)
......
...@@ -167,7 +167,7 @@ function qa_is_ip_blocked() ...@@ -167,7 +167,7 @@ function qa_is_ip_blocked()
/** /**
* Return an array of the clauses within $blockipstring, each of which can contain hyphens or asterisks * Return an array of the clauses within $blockipstring, each of which can contain hyphens or asterisks
* @param $blockipstring * @param string $blockipstring
* @return array * @return array
*/ */
function qa_block_ips_explode($blockipstring) function qa_block_ips_explode($blockipstring)
...@@ -216,9 +216,9 @@ function qa_block_ip_match($ip, $blockipclause) ...@@ -216,9 +216,9 @@ function qa_block_ip_match($ip, $blockipclause)
/** /**
* Check if IP falls between two others. * Check if IP falls between two others.
* @param $ip * @param string $ip
* @param $startip * @param string $startip
* @param $endip * @param string $endip
* @return bool * @return bool
*/ */
function qa_ip_between($ip, $startip, $endip) function qa_ip_between($ip, $startip, $endip)
...@@ -294,7 +294,7 @@ function qa_report_write_action($userid, $cookieid, $action, $questionid, $answe ...@@ -294,7 +294,7 @@ function qa_report_write_action($userid, $cookieid, $action, $questionid, $answe
/** /**
* Take note for rate limits that a user and/or the requesting IP just performed an action. * Take note for rate limits that a user and/or the requesting IP just performed an action.
* @param int $userid User performing the action. * @param int|null $userid User performing the action.
* @param string $action One of the QA_LIMIT_* constants defined above. * @param string $action One of the QA_LIMIT_* constants defined above.
* @return mixed * @return mixed
*/ */
......
...@@ -43,7 +43,7 @@ define('QA_PERMIT_SUPERS', 0); ...@@ -43,7 +43,7 @@ define('QA_PERMIT_SUPERS', 0);
/** /**
* Return an array [name] => [value] of settings for each option in $names. * Return an array [name] => [value] of settings for each option in $names.
* If any options are missing from the database, set them to their defaults * If any options are missing from the database, set them to their defaults
* @param $names * @param array $names
* @return array * @return array
*/ */
function qa_get_options($names) function qa_get_options($names)
...@@ -96,8 +96,8 @@ function qa_get_options($names) ...@@ -96,8 +96,8 @@ function qa_get_options($names)
/** /**
* Return the value of option $name if it has already been loaded, otherwise return null * Return the value of option $name if it has already been loaded, otherwise return null
* (used to prevent a database query if it's not essential for us to know the option value) * (used to prevent a database query if it's not essential for us to know the option value)
* @param $name * @param string $name
* @return * @return string
*/ */
function qa_opt_if_loaded($name) function qa_opt_if_loaded($name)
{ {
...@@ -139,7 +139,7 @@ function qa_preload_options() ...@@ -139,7 +139,7 @@ function qa_preload_options()
/** /**
* Load the options from the $results of the database selectspecs defined in qa_preload_options() * Load the options from the $results of the database selectspecs defined in qa_preload_options()
* @param $results * @param array $results
* @return mixed * @return mixed
*/ */
function qa_load_options_results($results) function qa_load_options_results($results)
...@@ -161,8 +161,8 @@ function qa_load_options_results($results) ...@@ -161,8 +161,8 @@ function qa_load_options_results($results)
/** /**
* Set an option $name to $value (application level) in both cache and database, unless * Set an option $name to $value (application level) in both cache and database, unless
* $todatabase=false, in which case set it in the cache only * $todatabase=false, in which case set it in the cache only
* @param $name * @param string $name
* @param $value * @param mixed|null $value
* @param bool $todatabase * @param bool $todatabase
* @return mixed * @return mixed
*/ */
...@@ -181,7 +181,7 @@ function qa_set_option($name, $value, $todatabase = true) ...@@ -181,7 +181,7 @@ function qa_set_option($name, $value, $todatabase = true)
/** /**
* Reset the options in $names to their defaults * Reset the options in $names to their defaults
* @param $names * @param array $names
* @return mixed * @return mixed
*/ */
function qa_reset_options($names) function qa_reset_options($names)
...@@ -196,7 +196,7 @@ function qa_reset_options($names) ...@@ -196,7 +196,7 @@ function qa_reset_options($names)
/** /**
* Return the default value for option $name * Return the default value for option $name
* @param $name * @param string $name
* @return bool|mixed|string * @return bool|mixed|string
*/ */
function qa_default_option($name) function qa_default_option($name)
...@@ -561,7 +561,7 @@ function qa_default_site_title() ...@@ -561,7 +561,7 @@ function qa_default_site_title()
/** /**
* Return an array of defaults for the $options parameter passed to qa_post_html_fields() and its ilk for posts of $basetype='Q'/'A'/'C' * Return an array of defaults for the $options parameter passed to qa_post_html_fields() and its ilk for posts of $basetype='Q'/'A'/'C'
* Set $full to true if these posts will be viewed in full, i.e. on a question page rather than a question listing * Set $full to true if these posts will be viewed in full, i.e. on a question page rather than a question listing
* @param $basetype * @param string $basetype
* @param bool $full * @param bool $full
* @return array|mixed * @return array|mixed
*/ */
...@@ -601,8 +601,8 @@ function qa_post_html_defaults($basetype, $full = false) ...@@ -601,8 +601,8 @@ function qa_post_html_defaults($basetype, $full = false)
* Return an array of options for post $post to pass in the $options parameter to qa_post_html_fields() and its ilk. Preferably, * Return an array of options for post $post to pass in the $options parameter to qa_post_html_fields() and its ilk. Preferably,
* call qa_post_html_defaults() previously and pass its output in $defaults, to save excessive recalculation for each item in a * call qa_post_html_defaults() previously and pass its output in $defaults, to save excessive recalculation for each item in a
* list. Set $full to true if these posts will be viewed in full, i.e. on a question page rather than a question listing. * list. Set $full to true if these posts will be viewed in full, i.e. on a question page rather than a question listing.
* @param $post * @param array $post
* @param $defaults * @param array|null $defaults
* @param bool $full * @param bool $full
* @return array|mixed|null * @return array|mixed|null
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment