@@ -31,6 +31,10 @@ |
||
31 | 31 | return $method == 'GET'; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $key |
|
36 | + * @param string $default |
|
37 | + */ |
|
34 | 38 | public static function post($key, $default = null) |
35 | 39 | { |
36 | 40 | return isset($_POST[$key]) ? $_POST[$key] : $default; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | * @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC) |
81 | 81 | * @param array $column_show The columns that we will show in the table i.e: $column_show = array('1','0','1') we will show the 1st and the 3th column. |
82 | 82 | * @param array $column_order Changes how the columns will be sorted ie. $column_order = array('0','3','2','3') The column [1] will be sorted like the column [3] |
83 | - * @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
83 | + * @param integer $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
84 | 84 | * @return array The sorted dataset |
85 | 85 | * @author [email protected] |
86 | 86 | */ |
@@ -330,6 +330,7 @@ discard block |
||
330 | 330 | /** |
331 | 331 | * Sets the footer visibility |
332 | 332 | * @param bool true if we show the footer |
333 | + * @param boolean $status |
|
333 | 334 | */ |
334 | 335 | public function set_footer($status) |
335 | 336 | { |
@@ -370,6 +371,7 @@ discard block |
||
370 | 371 | /** |
371 | 372 | * Sets the header visibility |
372 | 373 | * @param bool true if we show the header |
374 | + * @param boolean $status |
|
373 | 375 | */ |
374 | 376 | public function set_header($status) |
375 | 377 | { |
@@ -52,6 +52,7 @@ discard block |
||
52 | 52 | * Converts the text of a html-document to a given encoding, the meta-tag is changed accordingly. |
53 | 53 | * @param string $string The input full-html document. |
54 | 54 | * @param string The new encoding value to be set. |
55 | + * @param string $encoding |
|
55 | 56 | */ |
56 | 57 | function api_set_encoding_html(&$string, $encoding) { |
57 | 58 | $old_encoding = api_detect_encoding_html($string); |
@@ -74,7 +75,7 @@ discard block |
||
74 | 75 | * Returns the title of a html document. |
75 | 76 | * @param string $string The contents of the input document. |
76 | 77 | * @param string $input_encoding The encoding of the input document. If the value is not set, it is detected. |
77 | - * @param string $$output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | + * @param string $output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | 79 | * @return string The retrieved title, html-entities and extra-whitespace between the words are cleaned. |
79 | 80 | */ |
80 | 81 | function api_get_title_html(&$string, $output_encoding = null, $input_encoding = null) { |
@@ -433,7 +434,7 @@ discard block |
||
433 | 434 | * @since wordpress 2.8.1 |
434 | 435 | * @access private |
435 | 436 | * |
436 | - * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | + * @param string[] $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | 438 | * @param string $subject The string being searched and replaced on, otherwise known as the haystack. |
438 | 439 | * @return string The string with the replaced svalues. |
439 | 440 | */ |
@@ -628,6 +629,7 @@ discard block |
||
628 | 629 | * @param string The text to "cut" |
629 | 630 | * @param int Count of chars |
630 | 631 | * @param bool Whether to embed in a <span title="...">...</span> |
632 | + * @param integer $maxchar |
|
631 | 633 | * @return string |
632 | 634 | * */ |
633 | 635 | function cut($text, $maxchar, $embed = false) { |
@@ -645,7 +647,7 @@ discard block |
||
645 | 647 | * |
646 | 648 | * @param mixed Number to convert |
647 | 649 | * @param int Decimal points 0=never, 1=if needed, 2=always |
648 | - * @return mixed An integer or a float depends on the parameter |
|
650 | + * @return string|null An integer or a float depends on the parameter |
|
649 | 651 | */ |
650 | 652 | function float_format($number, $flag = 1) { |
651 | 653 | if (is_numeric($number)) { |
@@ -689,7 +691,7 @@ discard block |
||
689 | 691 | /** |
690 | 692 | * Gets the week from a day |
691 | 693 | * @param string Date in UTC (2010-01-01 12:12:12) |
692 | - * @return int Returns an integer with the week number of the year |
|
694 | + * @return string Returns an integer with the week number of the year |
|
693 | 695 | */ |
694 | 696 | function get_week_from_day($date) { |
695 | 697 | if (!empty($date)) { |
@@ -739,6 +741,9 @@ discard block |
||
739 | 741 | return $output.$end; |
740 | 742 | } |
741 | 743 | |
744 | +/** |
|
745 | + * @param string $glue |
|
746 | + */ |
|
742 | 747 | function implode_with_key($glue, $array) { |
743 | 748 | if (!empty($array)) { |
744 | 749 | $string = ''; |
@@ -817,7 +822,7 @@ discard block |
||
817 | 822 | /** |
818 | 823 | * @param string $string |
819 | 824 | * @param bool $capitalizeFirstCharacter |
820 | - * @return mixed |
|
825 | + * @return string |
|
821 | 826 | */ |
822 | 827 | function underScoreToCamelCase($string, $capitalizeFirstCharacter = true) |
823 | 828 | { |
@@ -1013,7 +1013,7 @@ discard block |
||
1013 | 1013 | * @param int $groupId |
1014 | 1014 | * @param string $picture |
1015 | 1015 | * |
1016 | - * @return bool|string |
|
1016 | + * @return false|string |
|
1017 | 1017 | */ |
1018 | 1018 | public function manageFileUpload($groupId, $picture) |
1019 | 1019 | { |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | } |
1156 | 1156 | |
1157 | 1157 | /** |
1158 | - * @return mixed |
|
1158 | + * @return integer |
|
1159 | 1159 | */ |
1160 | 1160 | public function getGroupType() |
1161 | 1161 | { |
@@ -1359,6 +1359,8 @@ discard block |
||
1359 | 1359 | * @param string height |
1360 | 1360 | * @param string picture size it can be small_, medium_ or big_ |
1361 | 1361 | * @param string style css |
1362 | + * @param integer $height |
|
1363 | + * @param integer $size_picture |
|
1362 | 1364 | * @return array with the file and the style of an image i.e $array['file'] $array['style'] |
1363 | 1365 | */ |
1364 | 1366 | public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '') |
@@ -1420,7 +1422,7 @@ discard block |
||
1420 | 1422 | * @param string Type of path to return (can be 'none', 'system', 'rel', 'web') |
1421 | 1423 | * @param bool Whether we want to have the directory name returned 'as if' there was a file or not (in the case we want to know which directory to create - otherwise no file means no split subdir) |
1422 | 1424 | * @param bool If we want that the function returns the /main/img/unknown.jpg image set it at true |
1423 | - * @return array Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's |
|
1425 | + * @return integer Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's |
|
1424 | 1426 | */ |
1425 | 1427 | public function get_group_picture_path_by_id($id, $type = 'none', $preview = false, $anonymous = false) |
1426 | 1428 | { |
@@ -1470,7 +1472,7 @@ discard block |
||
1470 | 1472 | } |
1471 | 1473 | |
1472 | 1474 | /** |
1473 | - * @return array |
|
1475 | + * @return string[] |
|
1474 | 1476 | */ |
1475 | 1477 | public function getAllowedPictureExtensions() |
1476 | 1478 | { |
@@ -1660,7 +1662,7 @@ discard block |
||
1660 | 1662 | * @author Julio Montoya |
1661 | 1663 | * @param int $user_id |
1662 | 1664 | * @param int $group_id |
1663 | - * @return boolean true if success |
|
1665 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
1664 | 1666 | * */ |
1665 | 1667 | public function delete_user_rel_group($user_id, $group_id) |
1666 | 1668 | { |
@@ -1872,6 +1874,8 @@ discard block |
||
1872 | 1874 | * @param int from value |
1873 | 1875 | * @param int limit |
1874 | 1876 | * @param array image configuration, i.e array('height'=>'20px', 'size'=> '20px') |
1877 | + * @param integer $from |
|
1878 | + * @param integer $limit |
|
1875 | 1879 | * @return array list of users in a group |
1876 | 1880 | */ |
1877 | 1881 | public function get_users_by_group( |
@@ -1970,6 +1974,8 @@ discard block |
||
1970 | 1974 | * Shows the left column of the group page |
1971 | 1975 | * @param int group id |
1972 | 1976 | * @param int user id |
1977 | + * @param integer $group_id |
|
1978 | + * @param integer $user_id |
|
1973 | 1979 | * |
1974 | 1980 | */ |
1975 | 1981 | public function show_group_column_information($group_id, $user_id, $show = '') |
@@ -2323,7 +2329,7 @@ discard block |
||
2323 | 2329 | * @param int $group_id |
2324 | 2330 | * @param int $parent_group_id if 0, we delete the parent_group association |
2325 | 2331 | * @param int $relation_type |
2326 | - * @return resource |
|
2332 | + * @return Doctrine\DBAL\Driver\Statement|null |
|
2327 | 2333 | **/ |
2328 | 2334 | public static function set_parent_group($group_id, $parent_group_id, $relation_type = 1) |
2329 | 2335 | { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * Create a video chat |
44 | 44 | * @param int $fromUser The sender user |
45 | 45 | * @param int $toUser The receiver user |
46 | - * @return int The created video chat id. Otherwise return false |
|
46 | + * @return false|string The created video chat id. Otherwise return false |
|
47 | 47 | */ |
48 | 48 | public static function createRoom($fromUser, $toUser) |
49 | 49 | { |
@@ -121,6 +121,9 @@ |
||
121 | 121 | return $form->isSubmitted() == false || $form->validate(); |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $format |
|
126 | + */ |
|
124 | 127 | function get_ceiling($format = null) |
125 | 128 | { |
126 | 129 | $result = Request::get('ceiling'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * This function return the value of a php.ini setting if not "" or if exists, |
98 | 98 | * otherwise return false |
99 | 99 | * @param string $phpSetting The name of a PHP setting |
100 | - * @return mixed The value of the setting, or false if not found |
|
100 | + * @return string|false The value of the setting, or false if not found |
|
101 | 101 | */ |
102 | 102 | function checkPhpSettingExists($phpSetting) |
103 | 103 | { |
@@ -1268,6 +1268,10 @@ discard block |
||
1268 | 1268 | * @param string Extra notice (to show on the right side) |
1269 | 1269 | * @param boolean Whether to display in update mode |
1270 | 1270 | * @param string Additional attribute for the <tr> element |
1271 | + * @param string $installType |
|
1272 | + * @param string $parameterName |
|
1273 | + * @param string $formFieldName |
|
1274 | + * @param string $extra_notice |
|
1271 | 1275 | * @return void Direct output |
1272 | 1276 | */ |
1273 | 1277 | function displayDatabaseParameter( |
@@ -1481,6 +1485,11 @@ discard block |
||
1481 | 1485 | |
1482 | 1486 | <?php |
1483 | 1487 | } |
1488 | +/** |
|
1489 | + * @param string $content |
|
1490 | + * @param string $title |
|
1491 | + * @param string $id |
|
1492 | + */ |
|
1484 | 1493 | function panel($content = null, $title = null, $id = null, $style = null) { |
1485 | 1494 | $html = ''; |
1486 | 1495 | if (empty($style)) { |
@@ -1837,8 +1846,8 @@ discard block |
||
1837 | 1846 | } |
1838 | 1847 | |
1839 | 1848 | /** |
1840 | - * @param $current_value |
|
1841 | - * @param $wanted_value |
|
1849 | + * @param string $current_value |
|
1850 | + * @param string $wanted_value |
|
1842 | 1851 | * @return string |
1843 | 1852 | */ |
1844 | 1853 | function compare_setting_values($current_value, $wanted_value) |
@@ -1855,8 +1864,8 @@ discard block |
||
1855 | 1864 | } |
1856 | 1865 | |
1857 | 1866 | /** |
1858 | - * @param $course_dir |
|
1859 | - * @param $course_attempt_name |
|
1867 | + * @param string $course_dir |
|
1868 | + * @param string $course_attempt_name |
|
1860 | 1869 | * @param string $file |
1861 | 1870 | * @return bool |
1862 | 1871 | */ |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * This function retrieves the existing permissions of a user, group or role. |
121 | -* @param $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
121 | +* @param string $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
122 | 122 | * @param $id the id of the user, group or role |
123 | 123 | * @author Patrick Cool <[email protected]>, Ghent University |
124 | 124 | * @version 1.0 |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | |
527 | 527 | /** |
528 | 528 | * This function gets all the roles that are defined |
529 | -* @param $content are we finding the roles for a user or a group (the database depends on it) |
|
529 | +* @param string $content are we finding the roles for a user or a group (the database depends on it) |
|
530 | 530 | * @param $id the id of the user or group |
531 | 531 | * @param string Deprecated parameter allowing use of 'platform' scope - the corresponding tables don't exist anymore so the scope is always set to 'course' |
532 | 532 | * @return array that contains the name of the roles the user has |