@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * of elements, an array of xmlArray's is returned for use with foreach. |
258 | 258 | * Example use: |
259 | 259 | * foreach ($xml->set('html/body/p') as $p) |
260 | - * @param $path string The path to search for. |
|
260 | + * @param string $path string The path to search for. |
|
261 | 261 | * @return xmlArray[] An array of xmlArray objects |
262 | 262 | */ |
263 | 263 | public function set($path) |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | * Changes a files atrributes (chmod) |
856 | 856 | * |
857 | 857 | * @param string $ftp_file The file to CHMOD |
858 | - * @param int|string $chmod The value for the CHMOD operation |
|
858 | + * @param integer $chmod The value for the CHMOD operation |
|
859 | 859 | * @return boolean Whether or not the operation was successful |
860 | 860 | */ |
861 | 861 | public function chmod($ftp_file, $chmod) |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | * |
1026 | 1026 | * @param string $ftp_path The path to the directory |
1027 | 1027 | * @param bool $search Whether or not to get a recursive directory listing |
1028 | - * @return string|boolean The results of the command or false if unsuccessful |
|
1028 | + * @return false|string The results of the command or false if unsuccessful |
|
1029 | 1029 | */ |
1030 | 1030 | public function list_dir($ftp_path = '', $search = false) |
1031 | 1031 | { |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | * |
1071 | 1071 | * @param string $file The name of a file |
1072 | 1072 | * @param string $listing A directory listing or null to generate one |
1073 | - * @return string|boolean The name of the file or false if it wasn't found |
|
1073 | + * @return string|false The name of the file or false if it wasn't found |
|
1074 | 1074 | */ |
1075 | 1075 | public function locate($file, $listing = null) |
1076 | 1076 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * Make files writable. First try to use regular chmod, but if that fails, try to use FTP. |
83 | 83 | * |
84 | - * @param $files |
|
84 | + * @param string[] $files |
|
85 | 85 | * @return bool |
86 | 86 | */ |
87 | 87 | function makeFilesWritable(&$files) |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | /** |
323 | 323 | * Prints an error to stderr. |
324 | 324 | * |
325 | - * @param $message |
|
325 | + * @param string $message |
|
326 | 326 | * @param bool $fatal |
327 | 327 | */ |
328 | 328 | function print_error($message, $fatal = false) |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * |
174 | 174 | * @param string $post_errors A string of info about errors encountered trying to save this draft |
175 | 175 | * @param array $recipientList An array of data about who this PM is being sent to |
176 | - * @return boolean false if you can't save the draft, true if we're doing this via XML more than 5 seconds after the last save, nothing otherwise |
|
176 | + * @return boolean|null false if you can't save the draft, true if we're doing this via XML more than 5 seconds after the last save, nothing otherwise |
|
177 | 177 | */ |
178 | 178 | function SavePMDraft(&$post_errors, $recipientList) |
179 | 179 | { |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | * |
389 | 389 | * @param int $id_draft The ID of the draft to delete |
390 | 390 | * @param boolean $check Whether or not to check that the draft belongs to the current user |
391 | - * @return boolean False if it couldn't be deleted (doesn't return anything otherwise) |
|
391 | + * @return false|null False if it couldn't be deleted (doesn't return anything otherwise) |
|
392 | 392 | */ |
393 | 393 | function DeleteDraft($id_draft, $check = true) |
394 | 394 | { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | * @param int $member_id ID of the member to show drafts for |
423 | 423 | * @param boolean|integer $topic If $type is 1, this can be set to only load drafts for posts in the specific topic |
424 | 424 | * @param int $draft_type The type of drafts to show - 0 for post drafts, 1 for PM drafts |
425 | - * @return boolean False if the drafts couldn't be loaded, nothing otherwise |
|
425 | + * @return false|null False if the drafts couldn't be loaded, nothing otherwise |
|
426 | 426 | */ |
427 | 427 | function ShowDrafts($member_id, $topic = false, $draft_type = 0) |
428 | 428 | { |
@@ -2259,9 +2259,9 @@ discard block |
||
2259 | 2259 | * |
2260 | 2260 | * @uses the template_include() function to include the file. |
2261 | 2261 | * @param string $template_name The name of the template to load |
2262 | - * @param array|string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
2262 | + * @param string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
2263 | 2263 | * @param bool $fatal If true, dies with an error message if the template cannot be found |
2264 | - * @return boolean Whether or not the template was loaded |
|
2264 | + * @return boolean|null Whether or not the template was loaded |
|
2265 | 2265 | */ |
2266 | 2266 | function loadTemplate($template_name, $style_sheets = array(), $fatal = true) |
2267 | 2267 | { |
@@ -2444,7 +2444,7 @@ discard block |
||
2444 | 2444 | * - all code added with this function is added to the same <style> tag so do make sure your css is valid! |
2445 | 2445 | * |
2446 | 2446 | * @param string $css Some css code |
2447 | - * @return void|bool Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
2447 | + * @return false|null Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
2448 | 2448 | */ |
2449 | 2449 | function addInlineCss($css) |
2450 | 2450 | { |
@@ -2558,7 +2558,7 @@ discard block |
||
2558 | 2558 | * |
2559 | 2559 | * @param string $javascript Some JS code |
2560 | 2560 | * @param bool $defer Whether the script should load in <head> or before the closing <html> tag |
2561 | - * @return void|bool Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
2561 | + * @return false|null Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
2562 | 2562 | */ |
2563 | 2563 | function addInlineJavaScript($javascript, $defer = false) |
2564 | 2564 | { |
@@ -2791,7 +2791,7 @@ discard block |
||
2791 | 2791 | * It will try to choose only utf8 or non-utf8 languages. |
2792 | 2792 | * |
2793 | 2793 | * @param bool $use_cache Whether or not to use the cache |
2794 | - * @return array An array of information about available languages |
|
2794 | + * @return string An array of information about available languages |
|
2795 | 2795 | */ |
2796 | 2796 | function getLanguages($use_cache = true) |
2797 | 2797 | { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param integer $value The new value to update. |
24 | 24 | * @param integer|array $report_id The affected report(s). |
25 | 25 | * |
26 | - * @return bool |
|
26 | + * @return false|null |
|
27 | 27 | */ |
28 | 28 | function updateReport($action, $value, $report_id) |
29 | 29 | { |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | * |
565 | 565 | * @param int $report_id The report ID is used to fire a notification about the event. |
566 | 566 | * @param array $data a formatted array of data to be inserted. Should be already properly sanitized. |
567 | - * @return bool Boolean false if no data was provided. |
|
567 | + * @return false|null Boolean false if no data was provided. |
|
568 | 568 | */ |
569 | 569 | function saveModComment($report_id, $data) |
570 | 570 | { |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | * Deletes a moderator comment from the DB. |
657 | 657 | * |
658 | 658 | * @param int $comment_id The moderator comment ID used to identify which report will be deleted. |
659 | - * @return bool Boolean false if no data was provided. |
|
659 | + * @return false|null Boolean false if no data was provided. |
|
660 | 660 | */ |
661 | 661 | function deleteModComment($comment_id) |
662 | 662 | { |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | /** |
501 | 501 | * Returns the amount of affected rows for a query. |
502 | 502 | * |
503 | - * @param mixed $result |
|
503 | + * @param resource|null $result |
|
504 | 504 | * |
505 | 505 | * @return int |
506 | 506 | * |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | * |
870 | 870 | * @param string $db_name The database name |
871 | 871 | * @param resource $db_connection The database connection |
872 | - * @return true Always returns true |
|
872 | + * @return boolean Always returns true |
|
873 | 873 | */ |
874 | 874 | function smf_db_select_db($db_name, $db_connection) |
875 | 875 | { |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | * - calls set_options to set the curl opts array values based on the defaults and user input |
116 | 116 | * |
117 | 117 | * @param string $url the site we are going to fetch |
118 | - * @param array $post_data any post data as form name => value |
|
119 | - * @return object An instance of the curl_fetch_web_data class |
|
118 | + * @param string $post_data any post data as form name => value |
|
119 | + * @return curl_fetch_web_data An instance of the curl_fetch_web_data class |
|
120 | 120 | */ |
121 | 121 | public function get_url_data($url, $post_data = array()) |
122 | 122 | { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * |
141 | 141 | * @param string $url The site to fetch |
142 | 142 | * @param bool $redirect Whether or not this was a redirect request |
143 | - * @return void|bool Sets various properties of the class or returns false if the URL isn't specified |
|
143 | + * @return false|null Sets various properties of the class or returns false if the URL isn't specified |
|
144 | 144 | */ |
145 | 145 | private function curl_request($url, $redirect = false) |
146 | 146 | { |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | * - caches the formatting data from the setting for optimization. |
694 | 694 | * |
695 | 695 | * @param float $number A number |
696 | - * @param bool|int $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined |
|
696 | + * @param integer $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined |
|
697 | 697 | * @return string A formatted number |
698 | 698 | */ |
699 | 699 | function comma_format($number, $override_decimal_count = false) |
@@ -5869,7 +5869,7 @@ discard block |
||
5869 | 5869 | * It assumes the data is already a string. |
5870 | 5870 | * @param string $data The data to print |
5871 | 5871 | * @param string $type The content type. Defaults to Json. |
5872 | - * @return void |
|
5872 | + * @return false|null |
|
5873 | 5873 | */ |
5874 | 5874 | function smf_serverResponse($data = '', $type = 'content-type: application/json') |
5875 | 5875 | { |
@@ -6351,7 +6351,7 @@ discard block |
||
6351 | 6351 | * |
6352 | 6352 | * @param string $iri The IRI to test. |
6353 | 6353 | * @param int $flags Optional flags to pass to filter_var() |
6354 | - * @return string|bool Either the original IRI, or false if the IRI was invalid. |
|
6354 | + * @return string|false Either the original IRI, or false if the IRI was invalid. |
|
6355 | 6355 | */ |
6356 | 6356 | function validate_iri($iri, $flags = null) |
6357 | 6357 | { |
@@ -502,6 +502,9 @@ discard block |
||
502 | 502 | } |
503 | 503 | |
504 | 504 | // Used to direct the user to another location. |
505 | +/** |
|
506 | + * @param string $location |
|
507 | + */ |
|
505 | 508 | function redirectLocation($location, $addForm = true) |
506 | 509 | { |
507 | 510 | global $upgradeurl, $upcontext, $command_line; |
@@ -1745,6 +1748,9 @@ discard block |
||
1745 | 1748 | return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path)); |
1746 | 1749 | } |
1747 | 1750 | |
1751 | +/** |
|
1752 | + * @param string $filename |
|
1753 | + */ |
|
1748 | 1754 | function parse_sql($filename) |
1749 | 1755 | { |
1750 | 1756 | global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning; |
@@ -1779,6 +1785,10 @@ discard block |
||
1779 | 1785 | |
1780 | 1786 | // Our custom error handler - does nothing but does stop public errors from XML! |
1781 | 1787 | set_error_handler( |
1788 | + |
|
1789 | + /** |
|
1790 | + * @param string $errno |
|
1791 | + */ |
|
1782 | 1792 | function ($errno, $errstr, $errfile, $errline) use ($support_js) |
1783 | 1793 | { |
1784 | 1794 | if ($support_js) |
@@ -1993,6 +2003,9 @@ discard block |
||
1993 | 2003 | return true; |
1994 | 2004 | } |
1995 | 2005 | |
2006 | +/** |
|
2007 | + * @param string $string |
|
2008 | + */ |
|
1996 | 2009 | function upgrade_query($string, $unbuffered = false) |
1997 | 2010 | { |
1998 | 2011 | global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings; |
@@ -4763,7 +4776,7 @@ discard block |
||
4763 | 4776 | * @param int $setSize The amount of entries after which to update the database. |
4764 | 4777 | * |
4765 | 4778 | * newCol needs to be a varbinary(16) null able field |
4766 | - * @return bool |
|
4779 | + * @return boolean|null |
|
4767 | 4780 | */ |
4768 | 4781 | function MySQLConvertOldIp($targetTable, $oldCol, $newCol, $limit = 50000, $setSize = 100) |
4769 | 4782 | { |
@@ -4931,9 +4944,8 @@ discard block |
||
4931 | 4944 | * settings file isn't using any advanced configuration setups in the Settings.php file. A copy is made as Settings_org.php |
4932 | 4945 | * to preserve all changes prior to migration. |
4933 | 4946 | * |
4934 | - * @param array $config_vars An array of one or more variables to update |
|
4935 | 4947 | * |
4936 | - * @return void We either succesfully update the Settings file, or throw a error here. |
|
4948 | + * @return boolean|null We either succesfully update the Settings file, or throw a error here. |
|
4937 | 4949 | */ |
4938 | 4950 | function migrateSettingsFile($changes) |
4939 | 4951 | { |
@@ -5343,9 +5355,8 @@ discard block |
||
5343 | 5355 | * Prior to checking these settings, we look for advanced setups such as integrations or if variables have been moved |
5344 | 5356 | * to another file. If these are detected, we abort. |
5345 | 5357 | * |
5346 | - * @param array $config_vars An array of one or more variables to update |
|
5347 | 5358 | * |
5348 | - * @return void We either succesfully update the Settings file, or throw a error here. |
|
5359 | + * @return boolean We either succesfully update the Settings file, or throw a error here. |
|
5349 | 5360 | */ |
5350 | 5361 | |
5351 | 5362 | function detectSettingsFileMigrationNeeded() |