@@ -456,6 +456,10 @@ discard block |
||
456 | 456 | |
457 | 457 | |
458 | 458 | // Add warning(s) to $this->warnings[] |
459 | + |
|
460 | + /** |
|
461 | + * @param string $message |
|
462 | + */ |
|
459 | 463 | public function warning($message) { |
460 | 464 | |
461 | 465 | if (is_array($message)) { |
@@ -482,6 +486,11 @@ discard block |
||
482 | 486 | |
483 | 487 | |
484 | 488 | // Convert string between charsets -- iconv() wrapper |
489 | + |
|
490 | + /** |
|
491 | + * @param string $out_charset |
|
492 | + * @param string $string |
|
493 | + */ |
|
485 | 494 | public function iconv($in_charset, $out_charset, $string, $drop01 = false) { |
486 | 495 | |
487 | 496 | if ($drop01 && ($string === "\x00" || $string === "\x01")) { |
@@ -509,6 +518,9 @@ discard block |
||
509 | 518 | |
510 | 519 | |
511 | 520 | |
521 | + /** |
|
522 | + * @param string $name |
|
523 | + */ |
|
512 | 524 | public function include_module($name) { |
513 | 525 | |
514 | 526 | if (!file_exists($this->include_path.'module.'.$name.'.php')) { |
@@ -1342,6 +1354,10 @@ discard block |
||
1342 | 1354 | |
1343 | 1355 | |
1344 | 1356 | // Convert Big Endian byte string to int - max 32 bits |
1357 | + |
|
1358 | + /** |
|
1359 | + * @param string $byte_word |
|
1360 | + */ |
|
1345 | 1361 | public static function BigEndian2Int($byte_word, $signed = false) { |
1346 | 1362 | |
1347 | 1363 | $int_value = 0; |
@@ -1391,6 +1407,9 @@ discard block |
||
1391 | 1407 | |
1392 | 1408 | |
1393 | 1409 | |
1410 | + /** |
|
1411 | + * @param string $byte_word |
|
1412 | + */ |
|
1394 | 1413 | public static function BigEndian2Float($byte_word) { |
1395 | 1414 | |
1396 | 1415 | // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic |
@@ -1478,6 +1497,9 @@ discard block |
||
1478 | 1497 | |
1479 | 1498 | |
1480 | 1499 | |
1500 | + /** |
|
1501 | + * @param string $binary_numerator |
|
1502 | + */ |
|
1481 | 1503 | public static function DecimalBinary2Float($binary_numerator) { |
1482 | 1504 | $numerator = bindec($binary_numerator); |
1483 | 1505 | $denominator = bindec('1'.str_repeat('0', strlen($binary_numerator))); |
@@ -276,6 +276,9 @@ discard block |
||
276 | 276 | public $pos; |
277 | 277 | |
278 | 278 | |
279 | + /** |
|
280 | + * @param string $bytes |
|
281 | + */ |
|
279 | 282 | public function AMFStream($bytes) { |
280 | 283 | |
281 | 284 | $this->bytes = $bytes; |
@@ -389,6 +392,9 @@ discard block |
||
389 | 392 | { |
390 | 393 | public $stream; |
391 | 394 | |
395 | + /** |
|
396 | + * @param AMFStream $stream |
|
397 | + */ |
|
392 | 398 | public function __construct($stream) { |
393 | 399 | |
394 | 400 | $this->stream = $stream; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * This functions stores the glossary in the database |
87 | 87 | * |
88 | 88 | * @param array Array of title + description (glossary_title => $title, glossary_comment => $comment) |
89 | - * @return mixed Term id on success, false on failure |
|
89 | + * @return false|string Term id on success, false on failure |
|
90 | 90 | * @author Christian Fasanando <[email protected]> |
91 | 91 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
92 | 92 | * @version januari 2009, dokeos 1.8.6 |
@@ -443,6 +443,10 @@ discard block |
||
443 | 443 | * @param integer Number of items to collect |
444 | 444 | * @param string Name of column on which to order |
445 | 445 | * @param string Whether to sort in ascending (ASC) or descending (DESC) |
446 | + * @param integer $from |
|
447 | + * @param integer $number_of_items |
|
448 | + * @param integer $column |
|
449 | + * @param string $direction |
|
446 | 450 | * @return unknown |
447 | 451 | * |
448 | 452 | * @author Patrick Cool <[email protected]> |
@@ -520,6 +524,7 @@ discard block |
||
520 | 524 | * @param integer $glossary_id |
521 | 525 | * @param array Parameters to use to affect links |
522 | 526 | * @param array The line of results from a query on the glossary table |
527 | + * @param string $url_params |
|
523 | 528 | * @return string HTML string for the action icons columns |
524 | 529 | * |
525 | 530 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
@@ -160,7 +160,7 @@ |
||
160 | 160 | * @todo the form should be auto generated |
161 | 161 | * @param string url |
162 | 162 | * @param string action add, edit |
163 | - * @return obj form validator obj |
|
163 | + * @return FormValidator form validator obj |
|
164 | 164 | */ |
165 | 165 | public function show_skill_form($gradebook_id, $url, $header = null) |
166 | 166 | { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param int $visibility is active or not |
22 | 22 | * @param string $picture |
23 | 23 | * |
24 | - * @return boolean if success |
|
24 | + * @return string|false if success |
|
25 | 25 | */ |
26 | 26 | public static function add($name, $description, $url, $visibility, $picture = '') |
27 | 27 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param int $visibility |
58 | 58 | * @param string $picture_uri |
59 | 59 | * @param bool $allowMemberGroupToLeave |
60 | - * @return bool if success |
|
60 | + * @return Statement|null if success |
|
61 | 61 | */ |
62 | 62 | public static function update($group_id, $name, $description, $url, $visibility, $picture_uri, $allowMemberGroupToLeave = null) |
63 | 63 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * Deletes a group |
88 | 88 | * @author Julio Montoya |
89 | 89 | * @param int $id |
90 | - * @return boolean true if success |
|
90 | + * @return Statement|null true if success |
|
91 | 91 | * */ |
92 | 92 | public static function delete($id) |
93 | 93 | { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @param int $group_id |
176 | 176 | * @param int $parent_group_id if 0, we delete the parent_group association |
177 | 177 | * @param int $relation_type |
178 | - * @return resource |
|
178 | + * @return Statement|null |
|
179 | 179 | **/ |
180 | 180 | public static function set_parent_group($group_id, $parent_group_id, $relation_type = 1) |
181 | 181 | { |
@@ -652,6 +652,7 @@ discard block |
||
652 | 652 | * @author Julio Montoya |
653 | 653 | * @param int user_id |
654 | 654 | * @param int url_id |
655 | + * @param integer $relation_type |
|
655 | 656 | * @return boolean true if success |
656 | 657 | **/ |
657 | 658 | public static function add_user_to_group($user_id, $group_id, $relation_type = GROUP_USER_PERMISSION_READER) |
@@ -735,7 +736,7 @@ discard block |
||
735 | 736 | * @author Julio Montoya |
736 | 737 | * @param int $group_id |
737 | 738 | * @param int $relation_type (optional) |
738 | - * @return boolean true if success |
|
739 | + * @return Statement|null true if success |
|
739 | 740 | * */ |
740 | 741 | public static function delete_users($group_id, $relation_type = null) |
741 | 742 | { |
@@ -916,6 +917,7 @@ discard block |
||
916 | 917 | * If an empty name is provided, then old user photos are deleted only, @see UserManager::delete_user_picture() |
917 | 918 | * as the prefered way for deletion. |
918 | 919 | * @param string $source_file The full system name of the image from which user photos will be created. |
920 | + * @param integer $group_id |
|
919 | 921 | * @return string/bool Returns the resulting file name of created images which usually should be stored in DB. |
920 | 922 | * When deletion is recuested returns empty string. In case of internal error or negative validation returns FALSE. |
921 | 923 | */ |
@@ -1074,7 +1076,9 @@ discard block |
||
1074 | 1076 | * |
1075 | 1077 | * @param string file picture |
1076 | 1078 | * @param int size in pixels |
1077 | - * @return obj image object |
|
1079 | + * @param string|null $file |
|
1080 | + * @param integer $max_size_for_picture |
|
1081 | + * @return Image image object |
|
1078 | 1082 | */ |
1079 | 1083 | public static function resize_picture($file, $max_size_for_picture) |
1080 | 1084 | { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * @author Christophe Gesche <[email protected]> |
370 | 370 | * @author Hugues Peeters <[email protected]> |
371 | 371 | * @author Bart Mollet |
372 | - * @param mixed $groupIdList - group(s) to delete. It can be a single id |
|
372 | + * @param mixed $group_ids - group(s) to delete. It can be a single id |
|
373 | 373 | * (int) or a list of id (array). |
374 | 374 | * @param string $course_code Default is current course |
375 | 375 | * @return integer - number of groups deleted. |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * @param bool Whether self registration is allowed or not |
574 | 574 | * @param bool Whether self unregistration is allowed or not |
575 | 575 | * @param int $categoryId |
576 | - * @return bool TRUE if properties are successfully changed, false otherwise |
|
576 | + * @return Statement|null TRUE if properties are successfully changed, false otherwise |
|
577 | 577 | */ |
578 | 578 | public static function set_group_properties( |
579 | 579 | $group_id, |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | * @param int $group_id The id of the group |
725 | 725 | * @param string $course_code The course in which the group is (default = |
726 | 726 | * current course) |
727 | - * @return array The category |
|
727 | + * @return integer The category |
|
728 | 728 | */ |
729 | 729 | public static function get_category_from_group($group_id, $course_code = null) |
730 | 730 | { |
@@ -786,9 +786,9 @@ discard block |
||
786 | 786 | * Create group category |
787 | 787 | * @param string $title The title of the new category |
788 | 788 | * @param string $description The description of the new category |
789 | - * @param bool $self_registration_allowed |
|
790 | - * @param bool $self_unregistration_allowed |
|
791 | - * @param int $max_number_of_students |
|
789 | + * @param integer $self_registration_allowed |
|
790 | + * @param integer $self_unregistration_allowed |
|
791 | + * @param int $maximum_number_of_students |
|
792 | 792 | * @param int $groups_per_user |
793 | 793 | */ |
794 | 794 | public static function create_category( |
@@ -994,6 +994,8 @@ discard block |
||
994 | 994 | * @param int $limit |
995 | 995 | * @param bool $getCount |
996 | 996 | * @param int $courseId |
997 | + * @param string $column |
|
998 | + * @param string $direction |
|
997 | 999 | * @return array list of user id |
998 | 1000 | */ |
999 | 1001 | public static function get_users( |
@@ -1172,7 +1174,7 @@ discard block |
||
1172 | 1174 | * Hugues Peeters <[email protected]> - original version |
1173 | 1175 | * @author Roan Embrechts - virtual course support, code cleaning |
1174 | 1176 | * @author Bart Mollet - code cleaning, use other GroupManager-functions |
1175 | - * @return void |
|
1177 | + * @return false|null |
|
1176 | 1178 | */ |
1177 | 1179 | public static function fill_groups($group_ids) |
1178 | 1180 | { |
@@ -1625,7 +1627,7 @@ discard block |
||
1625 | 1627 | * Unsubscribe user(s) from a specified group in current course |
1626 | 1628 | * @param mixed $user_ids Can be an array with user-id's or a single user-id |
1627 | 1629 | * @param int $group_id |
1628 | - * @return bool TRUE if successful |
|
1630 | + * @return boolean|null TRUE if successful |
|
1629 | 1631 | */ |
1630 | 1632 | public static function unsubscribe_users($user_ids, $group_id) |
1631 | 1633 | { |
@@ -1644,7 +1646,7 @@ discard block |
||
1644 | 1646 | |
1645 | 1647 | /** |
1646 | 1648 | * Unsubscribe all users from one or more groups |
1647 | - * @param mixed $group_id Can be an array with group-id's or a single group-id |
|
1649 | + * @param mixed $group_ids Can be an array with group-id's or a single group-id |
|
1648 | 1650 | * @return bool TRUE if successful |
1649 | 1651 | */ |
1650 | 1652 | public static function unsubscribe_all_users($group_ids) |
@@ -1676,7 +1678,7 @@ discard block |
||
1676 | 1678 | |
1677 | 1679 | /** |
1678 | 1680 | * Unsubscribe all tutors from one or more groups |
1679 | - * @param mixed $group_id Can be an array with group-id's or a single group-id |
|
1681 | + * @param mixed $group_ids Can be an array with group-id's or a single group-id |
|
1680 | 1682 | * @see unsubscribe_all_users. This function is almost an exact copy of that function. |
1681 | 1683 | * @return bool TRUE if successful |
1682 | 1684 | * @author Patrick Cool <[email protected]>, Ghent University |
@@ -1861,6 +1863,7 @@ discard block |
||
1861 | 1863 | * |
1862 | 1864 | * @param $user_array_in list of users (must be sorted). |
1863 | 1865 | * @param string $compare_field, the field to be compared |
1866 | + * @param string $compare_field |
|
1864 | 1867 | */ |
1865 | 1868 | public static function filter_duplicates($user_array_in, $compare_field) |
1866 | 1869 | { |
@@ -138,7 +138,7 @@ |
||
138 | 138 | |
139 | 139 | /** |
140 | 140 | * Return a list an associative array where keys are the active hook observer class name |
141 | - * @param $eventName |
|
141 | + * @param string $eventName |
|
142 | 142 | * |
143 | 143 | * @return array |
144 | 144 | */ |
@@ -52,6 +52,9 @@ discard block |
||
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param string|null $cropParameters |
|
57 | + */ |
|
55 | 58 | public function crop($cropParameters) { |
56 | 59 | $image_size = $this->get_image_size($this->image_wrapper->path); |
57 | 60 | $src_width = $image_size['width']; |
@@ -66,6 +69,9 @@ discard block |
||
66 | 69 | return $image; |
67 | 70 | } |
68 | 71 | |
72 | + /** |
|
73 | + * @param string $convert_file_to |
|
74 | + */ |
|
69 | 75 | public function send_image( |
70 | 76 | $file = '', |
71 | 77 | $compress = -1, |
@@ -147,6 +153,9 @@ discard block |
||
147 | 153 | public $image; |
148 | 154 | public $filter = Imagick::FILTER_LANCZOS; |
149 | 155 | |
156 | + /** |
|
157 | + * @param string $path |
|
158 | + */ |
|
150 | 159 | public function __construct($path) |
151 | 160 | { |
152 | 161 | parent::__construct($path); |
@@ -194,6 +203,10 @@ discard block |
||
194 | 203 | } |
195 | 204 | |
196 | 205 | //@todo implement border logic case for Imagick |
206 | + |
|
207 | + /** |
|
208 | + * @param integer $border |
|
209 | + */ |
|
197 | 210 | public function resize($thumbw, $thumbh, $border, $specific_size = false) |
198 | 211 | { |
199 | 212 | if (!$this->image_validated) return false; |
@@ -275,6 +288,9 @@ discard block |
||
275 | 288 | { |
276 | 289 | public $bg; |
277 | 290 | |
291 | + /** |
|
292 | + * @param string $path |
|
293 | + */ |
|
278 | 294 | function __construct($path) { |
279 | 295 | parent::__construct($path); |
280 | 296 | } |
@@ -332,6 +348,9 @@ discard block |
||
332 | 348 | } |
333 | 349 | } |
334 | 350 | |
351 | + /** |
|
352 | + * @param integer $border |
|
353 | + */ |
|
335 | 354 | public function resize($thumbw, $thumbh, $border, $specific_size = false) |
336 | 355 | { |
337 | 356 | if (!$this->image_validated) return false; |
@@ -408,6 +408,9 @@ discard block |
||
408 | 408 | } # function kses_no_null |
409 | 409 | |
410 | 410 | |
411 | +/** |
|
412 | + * @return string |
|
413 | + */ |
|
411 | 414 | function kses_stripslashes($string) |
412 | 415 | ############################################################################### |
413 | 416 | # This function changes the character sequence \" to just " |
@@ -442,6 +445,9 @@ discard block |
||
442 | 445 | } # function kses_array_lc |
443 | 446 | |
444 | 447 | |
448 | +/** |
|
449 | + * @return string |
|
450 | + */ |
|
445 | 451 | function kses_js_entities($string) |
446 | 452 | ############################################################################### |
447 | 453 | # This function removes the HTML JavaScript entities found in early versions of |
@@ -506,6 +512,9 @@ discard block |
||
506 | 512 | } # function kses_bad_protocol_once2 |
507 | 513 | |
508 | 514 | |
515 | +/** |
|
516 | + * @return string |
|
517 | + */ |
|
509 | 518 | function kses_normalize_entities($string) |
510 | 519 | ############################################################################### |
511 | 520 | # This function normalizes HTML entities. It will convert "AT&T" to the correct |