@@ -180,7 +180,7 @@ |
||
180 | 180 | * |
181 | 181 | * @access public |
182 | 182 | * @param string $dir A valid path |
183 | - * @return boolean If this was successful or not. |
|
183 | + * @return boolean|null If this was successful or not. |
|
184 | 184 | */ |
185 | 185 | public function setCachedir($dir = null) |
186 | 186 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Start the curl object |
63 | 63 | * - allow for user override values |
64 | 64 | * |
65 | - * @param array $options An array of cURL options |
|
65 | + * @param integer[] $options An array of cURL options |
|
66 | 66 | * @param int $max_redirect Maximum number of redirects |
67 | 67 | * @return void |
68 | 68 | */ |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | * - calls set_options to set the curl opts array values based on the defaults and user input |
82 | 82 | * |
83 | 83 | * @param string $url the site we are going to fetch |
84 | - * @param array $post_data any post data as form name => value |
|
85 | - * @return object An instance of the curl_fetch_web_data class |
|
84 | + * @param string $post_data any post data as form name => value |
|
85 | + * @return curl_fetch_web_data An instance of the curl_fetch_web_data class |
|
86 | 86 | */ |
87 | 87 | public function get_url_data($url, $post_data = array()) |
88 | 88 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @param string $url The site to fetch |
108 | 108 | * @param bool $redirect Whether or not this was a redirect request |
109 | - * @return void|bool Sets various properties of the class or returns false if the URL isn't specified |
|
109 | + * @return false|null Sets various properties of the class or returns false if the URL isn't specified |
|
110 | 110 | */ |
111 | 111 | private function curl_request($url, $redirect = false) |
112 | 112 | { |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | public $headers; |
95 | 95 | |
96 | 96 | /** |
97 | - * Start the curl object |
|
98 | - * - allow for user override values |
|
99 | - * |
|
100 | - * @param array $options An array of cURL options |
|
101 | - * @param int $max_redirect Maximum number of redirects |
|
102 | - */ |
|
97 | + * Start the curl object |
|
98 | + * - allow for user override values |
|
99 | + * |
|
100 | + * @param array $options An array of cURL options |
|
101 | + * @param int $max_redirect Maximum number of redirects |
|
102 | + */ |
|
103 | 103 | public function __construct($options = array(), $max_redirect = 3) |
104 | 104 | { |
105 | 105 | // Initialize class variables |
@@ -108,16 +108,16 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * Main calling function, |
|
112 | - * - will request the page data from a given $url |
|
113 | - * - optionally will post data to the page form if post data is supplied |
|
114 | - * - passed arrays will be converted to a post string joined with &'s |
|
115 | - * - calls set_options to set the curl opts array values based on the defaults and user input |
|
116 | - * |
|
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 |
|
120 | - */ |
|
111 | + * Main calling function, |
|
112 | + * - will request the page data from a given $url |
|
113 | + * - optionally will post data to the page form if post data is supplied |
|
114 | + * - passed arrays will be converted to a post string joined with &'s |
|
115 | + * - calls set_options to set the curl opts array values based on the defaults and user input |
|
116 | + * |
|
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 |
|
120 | + */ |
|
121 | 121 | public function get_url_data($url, $post_data = array()) |
122 | 122 | { |
123 | 123 | // POSTing some data perhaps? |
@@ -134,14 +134,14 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | - * Makes the actual cURL call |
|
138 | - * - stores responses (url, code, error, headers, body) in the response array |
|
139 | - * - detects 301, 302, 307 codes and will redirect to the given response header location |
|
140 | - * |
|
141 | - * @param string $url The site to fetch |
|
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 |
|
144 | - */ |
|
137 | + * Makes the actual cURL call |
|
138 | + * - stores responses (url, code, error, headers, body) in the response array |
|
139 | + * - detects 301, 302, 307 codes and will redirect to the given response header location |
|
140 | + * |
|
141 | + * @param string $url The site to fetch |
|
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 |
|
144 | + */ |
|
145 | 145 | private function curl_request($url, $redirect = false) |
146 | 146 | { |
147 | 147 | // we do have a url I hope |
@@ -193,12 +193,12 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * Used if being redirected to ensure we have a fully qualified address |
|
197 | - * |
|
198 | - * @param string $last_url The URL we went to |
|
199 | - * @param string $new_url The URL we were redirected to |
|
200 | - * @return string The new URL that was in the HTTP header |
|
201 | - */ |
|
196 | + * Used if being redirected to ensure we have a fully qualified address |
|
197 | + * |
|
198 | + * @param string $last_url The URL we went to |
|
199 | + * @param string $new_url The URL we were redirected to |
|
200 | + * @return string The new URL that was in the HTTP header |
|
201 | + */ |
|
202 | 202 | private function get_redirect_url($last_url = '', $new_url = '') |
203 | 203 | { |
204 | 204 | // Get the elements for these urls |
@@ -216,13 +216,13 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * Used to return the results to the calling program |
|
220 | - * - called as ->result() will return the full final array |
|
221 | - * - called as ->result('body') to just return the page source of the result |
|
222 | - * |
|
223 | - * @param string $area Used to return an area such as body, header, error |
|
224 | - * @return string The response |
|
225 | - */ |
|
219 | + * Used to return the results to the calling program |
|
220 | + * - called as ->result() will return the full final array |
|
221 | + * - called as ->result('body') to just return the page source of the result |
|
222 | + * |
|
223 | + * @param string $area Used to return an area such as body, header, error |
|
224 | + * @return string The response |
|
225 | + */ |
|
226 | 226 | public function result($area = '') |
227 | 227 | { |
228 | 228 | $max_result = count($this->response) - 1; |
@@ -235,13 +235,13 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
238 | - * Will return all results from all loops (redirects) |
|
239 | - * - Can be called as ->result_raw(x) where x is a specific loop results. |
|
240 | - * - Call as ->result_raw() for everything. |
|
241 | - * |
|
242 | - * @param string $response_number Which response we want to get |
|
243 | - * @return array|string The entire response array or just the specified response |
|
244 | - */ |
|
238 | + * Will return all results from all loops (redirects) |
|
239 | + * - Can be called as ->result_raw(x) where x is a specific loop results. |
|
240 | + * - Call as ->result_raw() for everything. |
|
241 | + * |
|
242 | + * @param string $response_number Which response we want to get |
|
243 | + * @return array|string The entire response array or just the specified response |
|
244 | + */ |
|
245 | 245 | public function result_raw($response_number = '') |
246 | 246 | { |
247 | 247 | if (!is_numeric($response_number)) |
@@ -254,13 +254,13 @@ discard block |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
257 | - * Takes supplied POST data and url encodes it |
|
258 | - * - forms the date (for post) in to a string var=xyz&var2=abc&var3=123 |
|
259 | - * - drops vars with @ since we don't support sending files (uploading) |
|
260 | - * |
|
261 | - * @param array|string $post_data The raw POST data |
|
262 | - * @return string A string of post data |
|
263 | - */ |
|
257 | + * Takes supplied POST data and url encodes it |
|
258 | + * - forms the date (for post) in to a string var=xyz&var2=abc&var3=123 |
|
259 | + * - drops vars with @ since we don't support sending files (uploading) |
|
260 | + * |
|
261 | + * @param array|string $post_data The raw POST data |
|
262 | + * @return string A string of post data |
|
263 | + */ |
|
264 | 264 | private function build_post_data($post_data) |
265 | 265 | { |
266 | 266 | if (is_array($post_data)) |
@@ -279,11 +279,11 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
282 | - * Sets the final cURL options for the current call |
|
283 | - * - overwrites our default values with user supplied ones or appends new user ones to what we have |
|
284 | - * - sets the callback function now that $this is existing |
|
285 | - * @return void |
|
286 | - */ |
|
282 | + * Sets the final cURL options for the current call |
|
283 | + * - overwrites our default values with user supplied ones or appends new user ones to what we have |
|
284 | + * - sets the callback function now that $this is existing |
|
285 | + * @return void |
|
286 | + */ |
|
287 | 287 | private function set_options() |
288 | 288 | { |
289 | 289 | // Callback to parse the returned headers, if any |
@@ -308,12 +308,12 @@ discard block |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
311 | - * Called to initiate a redirect from a 301, 302 or 307 header |
|
312 | - * - resets the cURL options for the loop, sets the referrer flag |
|
313 | - * |
|
314 | - * @param string $target_url The URL we want to redirect to |
|
315 | - * @param string $referer_url The URL that we're redirecting from |
|
316 | - */ |
|
311 | + * Called to initiate a redirect from a 301, 302 or 307 header |
|
312 | + * - resets the cURL options for the loop, sets the referrer flag |
|
313 | + * |
|
314 | + * @param string $target_url The URL we want to redirect to |
|
315 | + * @param string $referer_url The URL that we're redirecting from |
|
316 | + */ |
|
317 | 317 | private function redirect($target_url, $referer_url) |
318 | 318 | { |
319 | 319 | // no no I last saw that over there ... really, 301, 302, 307 |
@@ -323,13 +323,13 @@ discard block |
||
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
326 | - * Callback function to parse returned headers |
|
327 | - * - lowercases everything to make it consistent |
|
328 | - * |
|
329 | - * @param type $cr Not sure what this is used for? |
|
330 | - * @param string $header The header |
|
331 | - * @return int The length of the header |
|
332 | - */ |
|
326 | + * Callback function to parse returned headers |
|
327 | + * - lowercases everything to make it consistent |
|
328 | + * |
|
329 | + * @param type $cr Not sure what this is used for? |
|
330 | + * @param string $header The header |
|
331 | + * @return int The length of the header |
|
332 | + */ |
|
333 | 333 | private function header_callback($cr, $header) |
334 | 334 | { |
335 | 335 | $_header = trim($header); |
@@ -44,6 +44,10 @@ discard block |
||
44 | 44 | $this->Buf = range(0, 279); |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $data |
|
49 | + * @param integer $datLen |
|
50 | + */ |
|
47 | 51 | public function decompress($data, &$datLen) |
48 | 52 | { |
49 | 53 | $stLen = strlen($data); |
@@ -63,6 +67,11 @@ discard block |
||
63 | 67 | return $ret; |
64 | 68 | } |
65 | 69 | |
70 | + /** |
|
71 | + * @param boolean $bInit |
|
72 | + * |
|
73 | + * @return integer |
|
74 | + */ |
|
66 | 75 | public function LZWCommand(&$data, $bInit) |
67 | 76 | { |
68 | 77 | if ($bInit) |
@@ -253,6 +262,10 @@ discard block |
||
253 | 262 | unset($this->m_nColors, $this->m_arColors); |
254 | 263 | } |
255 | 264 | |
265 | + /** |
|
266 | + * @param string $lpData |
|
267 | + * @param integer $num |
|
268 | + */ |
|
256 | 269 | public function load($lpData, $num) |
257 | 270 | { |
258 | 271 | $this->m_nColors = 0; |
@@ -324,6 +337,9 @@ discard block |
||
324 | 337 | unset($this->m_bSorted, $this->m_nTableSize, $this->m_nBgColor, $this->m_nPixelRatio, $this->m_colorTable); |
325 | 338 | } |
326 | 339 | |
340 | + /** |
|
341 | + * @param integer $hdrLen |
|
342 | + */ |
|
327 | 343 | public function load($lpData, &$hdrLen) |
328 | 344 | { |
329 | 345 | $hdrLen = 0; |
@@ -370,6 +386,10 @@ discard block |
||
370 | 386 | unset($this->m_bInterlace, $this->m_bSorted, $this->m_nTableSize, $this->m_colorTable); |
371 | 387 | } |
372 | 388 | |
389 | + /** |
|
390 | + * @param string $lpData |
|
391 | + * @param integer $hdrLen |
|
392 | + */ |
|
373 | 393 | public function load($lpData, &$hdrLen) |
374 | 394 | { |
375 | 395 | $hdrLen = 0; |
@@ -412,6 +432,10 @@ discard block |
||
412 | 432 | $this->m_lzw = new gif_lzw_compression(); |
413 | 433 | } |
414 | 434 | |
435 | + /** |
|
436 | + * @param string $data |
|
437 | + * @param integer $datLen |
|
438 | + */ |
|
415 | 439 | public function load($data, &$datLen) |
416 | 440 | { |
417 | 441 | $datLen = 0; |
@@ -464,6 +488,10 @@ discard block |
||
464 | 488 | return false; |
465 | 489 | } |
466 | 490 | |
491 | + /** |
|
492 | + * @param string $data |
|
493 | + * @param integer $extLen |
|
494 | + */ |
|
467 | 495 | public function skipExt(&$data, &$extLen) |
468 | 496 | { |
469 | 497 | $extLen = 0; |
@@ -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 array 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 | { |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | if (!$this->connection) |
794 | 794 | { |
795 | 795 | $this->error = 'bad_server'; |
796 | - $this->last_message = 'Invalid Server'; |
|
796 | + $this->last_message = 'Invalid Server'; |
|
797 | 797 | return; |
798 | 798 | } |
799 | 799 | |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | if (!$this->check_response(220)) |
802 | 802 | { |
803 | 803 | $this->error = 'bad_response'; |
804 | - $this->last_message = 'Bad Response'; |
|
804 | + $this->last_message = 'Bad Response'; |
|
805 | 805 | return; |
806 | 806 | } |
807 | 807 |
@@ -56,6 +56,7 @@ discard block |
||
56 | 56 | * @param array $wordsSearch Search words |
57 | 57 | * @param array $wordsExclude Words to exclude |
58 | 58 | * @param bool $isExcluded Whether the specfied word should be excluded |
59 | + * @return void |
|
59 | 60 | */ |
60 | 61 | public function prepareIndexes($word, array &$wordsSearch, array &$wordsExclude, $isExcluded); |
61 | 62 | |
@@ -130,7 +131,7 @@ discard block |
||
130 | 131 | * @param array $excludedIndexWords Indexed words that should be excluded |
131 | 132 | * @param array $participants |
132 | 133 | * @param array $searchArray |
133 | - * @return mixed |
|
134 | + * @return integer |
|
134 | 135 | */ |
135 | 136 | public function searchQuery(array $query_params, array $searchWords, array $excludedIndexWords, array &$participants, array &$searchArray); |
136 | 137 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * Generate the timestamp for the calculation |
281 | 281 | * |
282 | - * @return integer Timestamp |
|
282 | + * @return double Timestamp |
|
283 | 283 | */ |
284 | 284 | public function generateTimestamp() |
285 | 285 | { |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * Truncate the given hash down to just what we need |
291 | 291 | * |
292 | 292 | * @param string $hash Hash to truncate |
293 | - * @return string Truncated hash value |
|
293 | + * @return integer Truncated hash value |
|
294 | 294 | */ |
295 | 295 | public function truncateHash($hash) |
296 | 296 | { |
@@ -518,7 +518,7 @@ |
||
518 | 518 | * @param array $parameters Not used? |
519 | 519 | * @param string $if_exists What to do if the index exists. If 'update', the definition will be updated. |
520 | 520 | * @param string $error |
521 | - * @return boolean Whether or not the operation was successful |
|
521 | + * @return false|null Whether or not the operation was successful |
|
522 | 522 | */ |
523 | 523 | function smf_db_add_index($table_name, $index_info, $parameters = array(), $if_exists = 'update', $error = 'fatal') |
524 | 524 | { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * |
176 | 176 | * @param string $post_errors A string of info about errors encountered trying to save this draft |
177 | 177 | * @param array $recipientList An array of data about who this PM is being sent to |
178 | - * @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 |
|
178 | + * @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 |
|
179 | 179 | */ |
180 | 180 | function SavePMDraft(&$post_errors, $recipientList) |
181 | 181 | { |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | * |
394 | 394 | * @param int $id_draft The ID of the draft to delete |
395 | 395 | * @param boolean $check Whether or not to check that the draft belongs to the current user |
396 | - * @return boolean False if it couldn't be deleted (doesn't return anything otherwise) |
|
396 | + * @return false|null False if it couldn't be deleted (doesn't return anything otherwise) |
|
397 | 397 | */ |
398 | 398 | function DeleteDraft($id_draft, $check = true) |
399 | 399 | { |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | * @param int $member_id ID of the member to show drafts for |
428 | 428 | * @param boolean|integer If $type is 1, this can be set to only load drafts for posts in the specific topic |
429 | 429 | * @param int $draft_type The type of drafts to show - 0 for post drafts, 1 for PM drafts |
430 | - * @return boolean False if the drafts couldn't be loaded, nothing otherwise |
|
430 | + * @return false|null False if the drafts couldn't be loaded, nothing otherwise |
|
431 | 431 | */ |
432 | 432 | function ShowDrafts($member_id, $topic = false, $draft_type = 0) |
433 | 433 | { |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | * Allows for the deleting and loading/editing of drafts |
512 | 512 | * |
513 | 513 | * @param type $memID |
514 | - * @param type $draft_type |
|
514 | + * @param integer $draft_type |
|
515 | 515 | */ |
516 | 516 | function showProfileDrafts($memID, $draft_type = 0) |
517 | 517 | { |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * Uses the showpmdraft template |
665 | 665 | * Allows for the deleting and loading/editing of drafts |
666 | 666 | * |
667 | - * @param type $memID |
|
667 | + * @param integer $memID |
|
668 | 668 | */ |
669 | 669 | function showPMDrafts($memID = -1) |
670 | 670 | { |
@@ -475,7 +475,7 @@ |
||
475 | 475 | * Used by fatal_error(), fatal_lang_error() |
476 | 476 | * |
477 | 477 | * @param string $error The error |
478 | - * @param array $sprintf An array of data to be sprintf()'d into the specified message |
|
478 | + * @param boolean $sprintf An array of data to be sprintf()'d into the specified message |
|
479 | 479 | */ |
480 | 480 | function log_error_online($error, $sprintf = array()) |
481 | 481 | { |