@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * Fetch content of comma separated text file |
347 | 347 | * will attempt to use the fopen method first, then curl, then socket |
348 | 348 | * @param string $url |
349 | - * @param array $methods |
|
349 | + * @param string[] $methods |
|
350 | 350 | * @returns string |
351 | 351 | */ |
352 | 352 | function fetchURL($url, $methods = array('fopen', 'curl', 'socket')) |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | * @param int $userid |
546 | 546 | * @param string $directory |
547 | 547 | * @param int $empty |
548 | - * @return true |
|
548 | + * @return boolean|null |
|
549 | 549 | */ |
550 | 550 | function smallworld_remDir ($userid, $directory, $empty = false) |
551 | 551 | { |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | * SmallworldDeleteDirectory function |
587 | 587 | * - Delete images from users on delete |
588 | 588 | * @param int $userid |
589 | - * @return true |
|
589 | + * @return boolean |
|
590 | 590 | */ |
591 | 591 | function SmallworldDeleteDirectory($userid) |
592 | 592 | { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | /** |
157 | 157 | * saveImage function |
158 | - * @param int $value |
|
158 | + * @param string $values |
|
159 | 159 | * @return void |
160 | 160 | */ |
161 | 161 | function saveImage($values) |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | * deleteWallMsg function |
491 | 491 | * @param int $id |
492 | 492 | * @param int $smallworld_msg_id |
493 | - * @return true |
|
493 | + * @return boolean |
|
494 | 494 | */ |
495 | 495 | function deleteWallMsg ($id,$smallworld_msg_id) |
496 | 496 | { |
@@ -509,8 +509,8 @@ discard block |
||
509 | 509 | /** |
510 | 510 | * deleteWallComment function |
511 | 511 | * - Delete Comments |
512 | - * @param int $smallworldComId |
|
513 | - * @return true |
|
512 | + * @param int $smallworld_com_id |
|
513 | + * @return boolean |
|
514 | 514 | */ |
515 | 515 | public function deleteWallComment($smallworld_com_id) |
516 | 516 | { |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | * SmallworldDeleteDirectory function |
598 | 598 | * - Delete images from users on delete |
599 | 599 | * @param int $userid |
600 | - * @return true |
|
600 | + * @return boolean |
|
601 | 601 | */ |
602 | 602 | function SmallworldDeleteDirectory($userid) |
603 | 603 | { |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | * @param int $userid |
631 | 631 | * @param string $directory |
632 | 632 | * @param int $empty |
633 | - * @return true |
|
633 | + * @return boolean|null |
|
634 | 634 | */ |
635 | 635 | function smallworld_remDir ($userid, $directory, $empty = false) |
636 | 636 | { |
@@ -671,6 +671,7 @@ discard block |
||
671 | 671 | * Update private settings |
672 | 672 | * @param int id ($userid) |
673 | 673 | * @param string posts (serialized values) |
674 | + * @param string $posts |
|
674 | 675 | * @return void |
675 | 676 | */ |
676 | 677 | function saveSettings ($id, $posts) |
@@ -691,7 +692,7 @@ discard block |
||
691 | 692 | /** |
692 | 693 | * Retrieve private settings |
693 | 694 | * @param int userid |
694 | - * @return serialized array values |
|
695 | + * @return null|string array values |
|
695 | 696 | */ |
696 | 697 | function GetSettings ($userid) |
697 | 698 | { |
@@ -121,10 +121,9 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
124 | - * @return as dropdown |
|
124 | + * @return string dropdown |
|
125 | 125 | * @param string $class |
126 | 126 | * @param string $name |
127 | - * @param string $nametwo |
|
128 | 127 | * @param string $rel |
129 | 128 | * @param array $options |
130 | 129 | * @param string $textmore |
@@ -146,10 +145,9 @@ discard block |
||
146 | 145 | } |
147 | 146 | |
148 | 147 | /** |
149 | - * @return dynamic inputs |
|
148 | + * @return string inputs |
|
150 | 149 | * @param string $class |
151 | 150 | * @param string $name |
152 | - * @param string $nametwo |
|
153 | 151 | * @param string $rel |
154 | 152 | * @param int $size |
155 | 153 | * @param string $textmore |
@@ -167,7 +165,7 @@ discard block |
||
167 | 165 | } |
168 | 166 | |
169 | 167 | /** |
170 | - * @return textarea |
|
168 | + * @return string |
|
171 | 169 | * @param string $name |
172 | 170 | * @param string $id |
173 | 171 | * @param string $title |
@@ -182,7 +180,7 @@ discard block |
||
182 | 180 | } |
183 | 181 | |
184 | 182 | /** |
185 | - * @return dynamic dropdown |
|
183 | + * @return string dropdown |
|
186 | 184 | * @param string $class |
187 | 185 | * @param string $name |
188 | 186 | * @param string $name2 |
@@ -227,10 +225,9 @@ discard block |
||
227 | 225 | } |
228 | 226 | |
229 | 227 | /** |
230 | - * @return dynamic inputs |
|
228 | + * @return string inputs |
|
231 | 229 | * @param string $class |
232 | 230 | * @param string $name |
233 | - * @param string $nametwo |
|
234 | 231 | * @param string $rel |
235 | 232 | * @param string $textmore |
236 | 233 | * @param string $employer (optional) |
@@ -256,7 +253,7 @@ discard block |
||
256 | 253 | } |
257 | 254 | |
258 | 255 | /** |
259 | - * @return file input |
|
256 | + * @return string input |
|
260 | 257 | * @param int $userID |
261 | 258 | * @return string |
262 | 259 | */ |
@@ -272,7 +269,7 @@ discard block |
||
272 | 269 | } |
273 | 270 | |
274 | 271 | /** |
275 | - * @return dynamic input |
|
272 | + * @return string input |
|
276 | 273 | * @param int $userID |
277 | 274 | * @param string $imgurl |
278 | 275 | * @param string $imgdesc |
@@ -295,9 +292,6 @@ discard block |
||
295 | 292 | |
296 | 293 | /** |
297 | 294 | * @create a radio select |
298 | - * @param string $name |
|
299 | - * @param array $options |
|
300 | - * @param string $selected (optional) |
|
301 | 295 | * @return string |
302 | 296 | */ |
303 | 297 | function usersettings ($userid) |
@@ -34,6 +34,10 @@ discard block |
||
34 | 34 | * Result: send mail, return true or false |
35 | 35 | */ |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $event |
|
39 | + * @param string $link |
|
40 | + */ |
|
37 | 41 | function sendMails ($fromUserID, $toUserID, $event, $link=null, array $data) { |
38 | 42 | global $xoopsConfig, $xoopsUser; |
39 | 43 | $date = date('m-d-Y H:i:s',time()); |
@@ -198,6 +202,9 @@ discard block |
||
198 | 202 | return array_unique($parts); |
199 | 203 | } |
200 | 204 | |
205 | + /** |
|
206 | + * @return string |
|
207 | + */ |
|
201 | 208 | function getOwnerUpdateFromMsgID ($msgid) { |
202 | 209 | global $xoopsDB; |
203 | 210 | $sql = "Select message from ".$xoopsDB->prefix('smallworld_messages')." where msg_id = '".$msgid."'"; |
@@ -63,8 +63,6 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * @Get array of updates |
65 | 65 | * @param int $last |
66 | - * @param int $uid |
|
67 | - * @param array $followes |
|
68 | 66 | * @return array |
69 | 67 | */ |
70 | 68 | public function Updates($last,$moderators) { |
@@ -362,7 +360,6 @@ discard block |
||
362 | 360 | * @Parse update and comments array to template for public updates |
363 | 361 | * @param array $updatesarray |
364 | 362 | * @param int $id |
365 | - * @param string $permalink |
|
366 | 363 | * @return void |
367 | 364 | */ |
368 | 365 | function ParsePubArray ($updatesarray, $id) |
@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | $this->field_name = $options['field_name']; |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param string $file_name |
|
44 | + */ |
|
42 | 45 | private function get_file_object($file_name) { |
43 | 46 | $file_path = $this->upload_dir.$file_name; |
44 | 47 | if (is_file($file_path) && $file_name[0] !== '.' && $file_name !='index.html' && $file_name !='Thumbs.db') { |
@@ -55,6 +58,9 @@ discard block |
||
55 | 58 | return null; |
56 | 59 | } |
57 | 60 | |
61 | + /** |
|
62 | + * @param string $file_name |
|
63 | + */ |
|
58 | 64 | private function create_thumbnail($file_name) { |
59 | 65 | $file_path = $this->upload_dir.$file_name; |
60 | 66 | $thumbnail_path = $this->thumbnails_dir.$file_name; |
@@ -197,6 +197,9 @@ discard block |
||
197 | 197 | .$version_path.rawurlencode($file_name); |
198 | 198 | } |
199 | 199 | |
200 | + /** |
|
201 | + * @param stdClass $file |
|
202 | + */ |
|
200 | 203 | protected function set_file_delete_properties($file) { |
201 | 204 | $file->delete_url = $this->options['script_url'] |
202 | 205 | .$this->get_query_separator($this->options['script_url']) |
@@ -238,6 +241,9 @@ discard block |
||
238 | 241 | return false; |
239 | 242 | } |
240 | 243 | |
244 | + /** |
|
245 | + * @param string $file_name |
|
246 | + */ |
|
241 | 247 | protected function get_file_object($file_name) { |
242 | 248 | if ($this->is_valid_file_object($file_name)) { |
243 | 249 | $file = new stdClass(); |
@@ -280,6 +286,9 @@ discard block |
||
280 | 286 | return count($this->get_file_objects('is_valid_file_object')); |
281 | 287 | } |
282 | 288 | |
289 | + /** |
|
290 | + * @param string $file_name |
|
291 | + */ |
|
283 | 292 | protected function create_scaled_image($file_name, $version, $options) { |
284 | 293 | $file_path = $this->get_upload_path($file_name); |
285 | 294 | if (!empty($version)) { |
@@ -356,6 +365,9 @@ discard block |
||
356 | 365 | $this->error_messages[$error] : $error; |
357 | 366 | } |
358 | 367 | |
368 | + /** |
|
369 | + * @param string $val |
|
370 | + */ |
|
359 | 371 | function get_config_bytes($val) { |
360 | 372 | $val = trim($val); |
361 | 373 | $last = strtolower($val[strlen($val)-1]); |
@@ -371,6 +383,9 @@ discard block |
||
371 | 383 | return $this->fix_integer_overflow($val); |
372 | 384 | } |
373 | 385 | |
386 | + /** |
|
387 | + * @param stdClass $file |
|
388 | + */ |
|
374 | 389 | protected function validate($uploaded_file, $file, $error, $index) { |
375 | 390 | if ($error) { |
376 | 391 | $file->error = $this->get_error_message($error); |
@@ -458,6 +473,9 @@ discard block |
||
458 | 473 | ); |
459 | 474 | } |
460 | 475 | |
476 | + /** |
|
477 | + * @param string $name |
|
478 | + */ |
|
461 | 479 | protected function get_unique_filename($name, $type, $index, $content_range) { |
462 | 480 | while(is_dir($this->get_upload_path($name))) { |
463 | 481 | $name = $this->upcount_name($name); |
@@ -502,10 +520,16 @@ discard block |
||
502 | 520 | ); |
503 | 521 | } |
504 | 522 | |
523 | + /** |
|
524 | + * @param stdClass $file |
|
525 | + */ |
|
505 | 526 | protected function handle_form_data($file, $index) { |
506 | 527 | // Handle form data, e.g. $_REQUEST['description'][$index] |
507 | 528 | } |
508 | 529 | |
530 | + /** |
|
531 | + * @param string $file_path |
|
532 | + */ |
|
509 | 533 | protected function orient_image($file_path) { |
510 | 534 | if (!function_exists('exif_read_data')) { |
511 | 535 | return false; |
@@ -622,14 +646,23 @@ discard block |
||
622 | 646 | return $parts['extension']; |
623 | 647 | } |
624 | 648 | |
649 | + /** |
|
650 | + * @param string $file_path |
|
651 | + */ |
|
625 | 652 | protected function readfile($file_path) { |
626 | 653 | return readfile($file_path); |
627 | 654 | } |
628 | 655 | |
656 | + /** |
|
657 | + * @param string $str |
|
658 | + */ |
|
629 | 659 | protected function body($str) { |
630 | 660 | echo $str; |
631 | 661 | } |
632 | 662 | |
663 | + /** |
|
664 | + * @param string $str |
|
665 | + */ |
|
633 | 666 | protected function header($str) { |
634 | 667 | header($str); |
635 | 668 | } |
@@ -666,6 +699,9 @@ discard block |
||
666 | 699 | return isset($_GET['file']) ? basename(stripslashes($_GET['file'])) : null; |
667 | 700 | } |
668 | 701 | |
702 | + /** |
|
703 | + * @param string $file_path |
|
704 | + */ |
|
669 | 705 | protected function get_file_type($file_path) { |
670 | 706 | switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { |
671 | 707 | case 'jpeg': |
@@ -139,7 +139,7 @@ |
||
139 | 139 | * @Check if user is follower |
140 | 140 | * @param int $userid |
141 | 141 | * @param int $friendid |
142 | - * @return int |
|
142 | + * @return integer[] |
|
143 | 143 | */ |
144 | 144 | function following_or ($userid, $friendid) |
145 | 145 | { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * @Insert comment |
207 | 207 | * @param int $uid |
208 | - * @param int $msgid |
|
208 | + * @param int $msg_id |
|
209 | 209 | * @param string $comment |
210 | 210 | * @return string / void |
211 | 211 | */ |
@@ -447,7 +447,6 @@ discard block |
||
447 | 447 | * @Parse update and comments array to template for public updates |
448 | 448 | * @param array $updatesarray |
449 | 449 | * @param int $id |
450 | - * @param string $permalink |
|
451 | 450 | * @return void |
452 | 451 | */ |
453 | 452 | function ParsePubArray ($updatesarray, $id) |