@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - * @return array |
|
| 126 | + * @return string[] |
|
| 127 | 127 | */ |
| 128 | 128 | public static function getValidExtraFieldTypes() |
| 129 | 129 | { |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | /** |
| 201 | 201 | * @param array $conditions |
| 202 | - * @param null $order_field_options_by |
|
| 202 | + * @param string $order_field_options_by |
|
| 203 | 203 | * |
| 204 | 204 | * @return array |
| 205 | 205 | */ |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | /** |
| 238 | 238 | * @param string $variable |
| 239 | 239 | * |
| 240 | - * @return array|bool |
|
| 240 | + * @return integer |
|
| 241 | 241 | */ |
| 242 | 242 | public function get_handler_field_info_by_field_variable($variable) |
| 243 | 243 | { |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | /** |
| 320 | 320 | * @param string $handler |
| 321 | 321 | * |
| 322 | - * @return array |
|
| 322 | + * @return string[] |
|
| 323 | 323 | */ |
| 324 | 324 | public static function get_extra_fields_by_handler($handler) |
| 325 | 325 | { |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | /** |
| 499 | - * @return array |
|
| 499 | + * @return string[] |
|
| 500 | 500 | */ |
| 501 | 501 | public function get_field_types() |
| 502 | 502 | { |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | /** |
| 507 | 507 | * @param int $id |
| 508 | 508 | * |
| 509 | - * @return null |
|
| 509 | + * @return string|null |
|
| 510 | 510 | */ |
| 511 | 511 | public function get_field_type_by_id($id) |
| 512 | 512 | { |
@@ -691,7 +691,6 @@ discard block |
||
| 691 | 691 | * @param FormValidator $form |
| 692 | 692 | * @param array $extraData |
| 693 | 693 | * @param bool $admin_permissions |
| 694 | - * @param int $user_id |
|
| 695 | 694 | * @param array $extra |
| 696 | 695 | * @param int $itemId |
| 697 | 696 | * @param array $exclude variables of extra field to exclude |
@@ -1592,7 +1591,7 @@ discard block |
||
| 1592 | 1591 | } |
| 1593 | 1592 | |
| 1594 | 1593 | /** |
| 1595 | - * @return array |
|
| 1594 | + * @return string[] |
|
| 1596 | 1595 | */ |
| 1597 | 1596 | public function getJqgridColumnNames() |
| 1598 | 1597 | { |
@@ -1832,7 +1831,7 @@ discard block |
||
| 1832 | 1831 | } |
| 1833 | 1832 | |
| 1834 | 1833 | /** |
| 1835 | - * @param array $columns |
|
| 1834 | + * @param string[] $columns |
|
| 1836 | 1835 | * @param array $column_model |
| 1837 | 1836 | * @param array $extraFields |
| 1838 | 1837 | * @return array |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @return ExtraField |
|
| 46 | + * @return string |
|
| 47 | 47 | */ |
| 48 | 48 | public function getExtraField() |
| 49 | 49 | { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * This function is used with $extraField->addElements() |
| 73 | 73 | * @param array $params array for the insertion into the *_field_values table |
| 74 | 74 | * |
| 75 | - * @return mixed false on empty params, void otherwise |
|
| 75 | + * @return false|null false on empty params, void otherwise |
|
| 76 | 76 | * @assert (array()) === false |
| 77 | 77 | */ |
| 78 | 78 | public function saveFieldValues($params) |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
| 501 | 501 | * @param int $field_id Field ID (the ID from the *_field table) |
| 502 | 502 | * @param bool $transform Whether to transform the result to a human readable strings |
| 503 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
| 503 | + * @return string A structured array with the field_id and field_value, or false on error |
|
| 504 | 504 | * @assert (-1,-1) === false |
| 505 | 505 | */ |
| 506 | 506 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * @param int $item_id Item ID from the original table |
| 594 | 594 | * @param string $field_variable The name of the field we are looking for |
| 595 | 595 | * @param bool $transform |
| 596 | - * @param bool $allVisibility |
|
| 596 | + * @param bool $visibility |
|
| 597 | 597 | * |
| 598 | 598 | * @return mixed Array of results, or false on error or not found |
| 599 | 599 | * @assert (-1,'') === false |
@@ -13,6 +13,8 @@ discard block |
||
| 13 | 13 | * @param - action (string) - action type require : 'delete' or 'update' |
| 14 | 14 | * @param - old_path (string) - old path info stored to change |
| 15 | 15 | * @param - new_path (string) - new path info to substitute |
| 16 | + * @param string $action |
|
| 17 | + * @param string $old_path |
|
| 16 | 18 | * @desc Update the file or directory path in the document db document table |
| 17 | 19 | * |
| 18 | 20 | */ |
@@ -76,8 +78,8 @@ discard block |
||
| 76 | 78 | * Deletes a file or a directory |
| 77 | 79 | * |
| 78 | 80 | * @author - Hugues Peeters |
| 79 | - * @param $file (String) - the path of file or directory to delete |
|
| 80 | - * @return boolean - true if the delete succeed, false otherwise. |
|
| 81 | + * @param string $file (String) - the path of file or directory to delete |
|
| 82 | + * @return boolean|null - true if the delete succeed, false otherwise. |
|
| 81 | 83 | * @see - delete() uses check_name_exist() and removeDir() functions |
| 82 | 84 | */ |
| 83 | 85 | function my_delete($file) |
@@ -162,9 +164,9 @@ discard block |
||
| 162 | 164 | * Renames a file or a directory |
| 163 | 165 | * |
| 164 | 166 | * @author - Hugues Peeters <[email protected]> |
| 165 | - * @param - $file_path (string) - complete path of the file or the directory |
|
| 166 | - * @param - $new_file_name (string) - new name for the file or the directory |
|
| 167 | - * @return - boolean - true if succeed |
|
| 167 | + * @param string $file_path (string) - complete path of the file or the directory |
|
| 168 | + * @param string $new_file_name (string) - new name for the file or the directory |
|
| 169 | + * @return string boolean - true if succeed |
|
| 168 | 170 | * - boolean - false otherwise |
| 169 | 171 | * @see - rename() uses the check_name_exist() and php2phps() functions |
| 170 | 172 | */ |
@@ -327,7 +329,6 @@ discard block |
||
| 327 | 329 | * Calculation size of a directory |
| 328 | 330 | * |
| 329 | 331 | * @returns integer size |
| 330 | - * @param string $path path to size |
|
| 331 | 332 | * @param boolean $recursive if true , include subdir in total |
| 332 | 333 | */ |
| 333 | 334 | function dirsize($root, $recursive = true) { |
@@ -17,6 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @author - Hugues Peeters <[email protected]> |
| 19 | 19 | * @param - file_name (string) name of a file |
| 20 | + * @param string $file_name |
|
| 20 | 21 | * @return - the filenam phps'ized |
| 21 | 22 | */ |
| 22 | 23 | function php2phps($file_name) { |
@@ -73,7 +74,7 @@ discard block |
||
| 73 | 74 | * Returns the name without extension, used for the title |
| 74 | 75 | * |
| 75 | 76 | * @param string $name |
| 76 | - * @return name without the extension |
|
| 77 | + * @return string without the extension |
|
| 77 | 78 | */ |
| 78 | 79 | function get_document_title($name) { |
| 79 | 80 | // If they upload .htaccess... |
@@ -86,7 +87,7 @@ discard block |
||
| 86 | 87 | * This function checks if the upload succeeded |
| 87 | 88 | * |
| 88 | 89 | * @param array $uploaded_file ($_FILES) |
| 89 | - * @return true if upload succeeded |
|
| 90 | + * @return boolean if upload succeeded |
|
| 90 | 91 | */ |
| 91 | 92 | function process_uploaded_file($uploaded_file, $show_output = true) |
| 92 | 93 | { |
@@ -698,6 +699,8 @@ discard block |
||
| 698 | 699 | * @param - dir (string) - Path of the directory |
| 699 | 700 | * whe the file should be added |
| 700 | 701 | * @param - max_dir_space (int) - maximum size of the diretory in byte |
| 702 | + * @param string $dir |
|
| 703 | + * @param integer $max_dir_space |
|
| 701 | 704 | * @return - boolean true if there is enough space, |
| 702 | 705 | * boolean false otherwise |
| 703 | 706 | * |
@@ -1022,7 +1025,7 @@ discard block |
||
| 1022 | 1025 | * @param array $courseInfo |
| 1023 | 1026 | * @param array $userInfo |
| 1024 | 1027 | * @param array $uploaded_file - follows the $_FILES Structure |
| 1025 | - * @param string $upload_path - destination of the upload. |
|
| 1028 | + * @param string $uploadPath - destination of the upload. |
|
| 1026 | 1029 | * This path is to append to $base_work_dir |
| 1027 | 1030 | * @param string $base_work_dir - base working directory of the module |
| 1028 | 1031 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1201,7 +1204,7 @@ discard block |
||
| 1201 | 1204 | * @param bool $save_visibility |
| 1202 | 1205 | * @param int $group_id |
| 1203 | 1206 | * @param int $session_id Session ID, if any |
| 1204 | - * @return int id if inserted document |
|
| 1207 | + * @return string|false id if inserted document |
|
| 1205 | 1208 | */ |
| 1206 | 1209 | function add_document( |
| 1207 | 1210 | $_course, |
@@ -1337,7 +1340,7 @@ discard block |
||
| 1337 | 1340 | * |
| 1338 | 1341 | * @author Olivier Cauberghe <[email protected]> |
| 1339 | 1342 | * @param path+filename eg: /main/document/document.php |
| 1340 | - * @return The directory depth |
|
| 1343 | + * @return integer directory depth |
|
| 1341 | 1344 | */ |
| 1342 | 1345 | function get_levels($filename) { |
| 1343 | 1346 | $levels = explode('/', $filename); |
@@ -1354,6 +1357,7 @@ discard block |
||
| 1354 | 1357 | * @author Olivier Cauberghe <[email protected]> |
| 1355 | 1358 | * @param path,filename |
| 1356 | 1359 | * action: Adds an entry to the document table with the default settings. |
| 1360 | + * @param string $upload_path |
|
| 1357 | 1361 | */ |
| 1358 | 1362 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
| 1359 | 1363 | { |
@@ -1778,6 +1782,7 @@ discard block |
||
| 1778 | 1782 | |
| 1779 | 1783 | @author Roan Embrechts |
| 1780 | 1784 | @version 0.6 |
| 1785 | + * @param string $buffer |
|
| 1781 | 1786 | */ |
| 1782 | 1787 | function api_replace_links_in_string($upload_path, $buffer) { |
| 1783 | 1788 | // Search for hyperlinks |
@@ -2013,7 +2018,6 @@ discard block |
||
| 2013 | 2018 | * @param int $groupId |
| 2014 | 2019 | * @param bool $output |
| 2015 | 2020 | * @param array $parent |
| 2016 | - * @param string $uploadPath |
|
| 2017 | 2021 | * |
| 2018 | 2022 | */ |
| 2019 | 2023 | function add_all_documents_in_folder_to_database( |
@@ -145,6 +145,7 @@ |
||
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * @param array $dates result of parseDateRange() |
| 148 | + * @param string $format |
|
| 148 | 149 | * |
| 149 | 150 | * @return bool |
| 150 | 151 | */ |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | * @param string $label |
| 214 | 214 | * @param array $attributes |
| 215 | 215 | * |
| 216 | - * @return mixed |
|
| 216 | + * @return HTML_QuickForm_element |
|
| 217 | 217 | */ |
| 218 | 218 | public function addDatePicker($name, $label, $attributes = []) |
| 219 | 219 | { |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | * @param string $label |
| 226 | 226 | * @param array $attributes |
| 227 | 227 | * |
| 228 | - * @return mixed |
|
| 228 | + * @return HTML_QuickForm_element |
|
| 229 | 229 | */ |
| 230 | 230 | public function addDateTimePicker($name, $label, $attributes = []) |
| 231 | 231 | { |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | * @param array $options |
| 689 | 689 | * @param array $attributes |
| 690 | 690 | * |
| 691 | - * @return HTML_QuickForm_radio |
|
| 691 | + * @return HTML_QuickForm_group |
|
| 692 | 692 | */ |
| 693 | 693 | public function addRadio($name, $label, $options = array(), $attributes = array()) |
| 694 | 694 | { |
@@ -817,7 +817,7 @@ discard block |
||
| 817 | 817 | * @param string $name |
| 818 | 818 | * @param string $label |
| 819 | 819 | * |
| 820 | - * @return mixed |
|
| 820 | + * @return HTML_QuickForm_element |
|
| 821 | 821 | */ |
| 822 | 822 | public function addButtonAdvancedSettings($name, $label = '') |
| 823 | 823 | { |
@@ -914,7 +914,7 @@ discard block |
||
| 914 | 914 | /** |
| 915 | 915 | * This function has been created for avoiding changes directly within QuickForm class. |
| 916 | 916 | * When we use it, the element is threated as 'required' to be dealt during validation. |
| 917 | - * @param array $element The array of elements |
|
| 917 | + * @param array $elements The array of elements |
|
| 918 | 918 | * @param string $message The message displayed |
| 919 | 919 | */ |
| 920 | 920 | public function add_multiple_required_rule($elements, $message) |
@@ -25,8 +25,7 @@ |
||
| 25 | 25 | * Get allowed tags |
| 26 | 26 | * @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML, |
| 27 | 27 | * STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE |
| 28 | - * @param boolean $fullpage If true, the allowed tags for full-page editing |
|
| 29 | - * are returned. |
|
| 28 | + * @return string |
|
| 30 | 29 | */ |
| 31 | 30 | static function get_allowed_tags($mode) |
| 32 | 31 | { |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | 11 | * @param $value array Uploaded file info (from $_FILES) |
| 12 | - * @param null $options |
|
| 13 | 12 | * @return bool |
| 14 | 13 | */ |
| 15 | 14 | public function validate($elementValue, $maxSize) |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @param string Mobile phone number to be validated |
| 18 | 18 | * @param string Not using it. Just to respect the declaration |
| 19 | - * @return boolean Returns true if valid, false otherwise. |
|
| 19 | + * @return integer Returns true if valid, false otherwise. |
|
| 20 | 20 | */ |
| 21 | 21 | function validate($mobilePhoneNumber, $options = null) |
| 22 | 22 | { |