@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * @param int Whether the announcement should be visible to anonymous users (1) or not (0) |
307 | 307 | * @param string The language for which the announvement should be shown. Leave null for all langages |
308 | 308 | * @param int Whether to send an e-mail to all users (1) or not (0) |
309 | - * @return mixed insert_id on success, false on failure |
|
309 | + * @return false|string insert_id on success, false on failure |
|
310 | 310 | */ |
311 | 311 | public static function add_announcement( |
312 | 312 | $title, |
@@ -667,6 +667,8 @@ discard block |
||
667 | 667 | * @param int Whether to send to all teachers (1) or not (0) |
668 | 668 | * @param int Whether to send to all students (1) or not (0) |
669 | 669 | * @param string Language (optional, considered for all languages if left empty) |
670 | + * @param integer|null $teacher |
|
671 | + * @param integer|null $student |
|
670 | 672 | * @return bool True if the message was sent or there was no destination matching. False on database or e-mail sending error. |
671 | 673 | */ |
672 | 674 | public static function send_system_announcement_by_email( |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param string $url The URL of the site |
19 | 19 | * @param string $description The description of the site |
20 | 20 | * @param int $active is active or not |
21 | - * @return boolean if success |
|
21 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
22 | 22 | */ |
23 | 23 | public static function add($url, $description, $active) |
24 | 24 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param string $url |
44 | 44 | * @param string $description The description of the site |
45 | 45 | * @param int $active is active or not |
46 | - * @return boolean if success |
|
46 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
47 | 47 | */ |
48 | 48 | public static function update($url_id, $url, $description, $active) |
49 | 49 | { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | * @author Julio Montoya |
387 | 387 | * @param int user id |
388 | 388 | * @param int url id |
389 | - * @return boolean true if success |
|
389 | + * @return integer true if success |
|
390 | 390 | * */ |
391 | 391 | public static function relation_url_user_exist($user_id, $url_id) |
392 | 392 | { |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | * @author Julio Montoya |
405 | 405 | * @param int $courseId |
406 | 406 | * @param int $urlId |
407 | - * @return boolean true if success |
|
407 | + * @return integer true if success |
|
408 | 408 | * */ |
409 | 409 | public static function relation_url_course_exist($courseId, $urlId) |
410 | 410 | { |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * @author Julio Montoya |
426 | 426 | * @param int $userGroupId |
427 | 427 | * @param int $urlId |
428 | - * @return boolean true if success |
|
428 | + * @return integer true if success |
|
429 | 429 | * */ |
430 | 430 | public static function relationUrlUsergroupExist($userGroupId, $urlId) |
431 | 431 | { |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | * @author Julio Montoya |
446 | 446 | * @param int user id |
447 | 447 | * @param int url id |
448 | - * @return boolean true if success |
|
448 | + * @return integer true if success |
|
449 | 449 | * */ |
450 | 450 | public static function relation_url_session_exist($session_id, $url_id) |
451 | 451 | { |
@@ -568,6 +568,8 @@ discard block |
||
568 | 568 | * @author Julio Montoya |
569 | 569 | * @param array of course ids |
570 | 570 | * @param array of url_ids |
571 | + * @param integer[] $courseCategoryList |
|
572 | + * @param integer[] $urlList |
|
571 | 573 | * @return array |
572 | 574 | **/ |
573 | 575 | public static function addCourseCategoryListToUrl($courseCategoryList, $urlList) |
@@ -598,7 +600,7 @@ discard block |
||
598 | 600 | * @author Julio Montoya |
599 | 601 | * @param int $categoryCourseId |
600 | 602 | * @param int $urlId |
601 | - * @return boolean true if success |
|
603 | + * @return integer true if success |
|
602 | 604 | * */ |
603 | 605 | public static function relationUrlCourseCategoryExist($categoryCourseId, $urlId) |
604 | 606 | { |
@@ -615,7 +617,7 @@ discard block |
||
615 | 617 | /** |
616 | 618 | * @param int $userGroupId |
617 | 619 | * @param int $urlId |
618 | - * @return int |
|
620 | + * @return string |
|
619 | 621 | */ |
620 | 622 | public static function addUserGroupToUrl($userGroupId, $urlId) |
621 | 623 | { |
@@ -716,7 +718,7 @@ discard block |
||
716 | 718 | * @param int $courseId |
717 | 719 | * @param int $url_id |
718 | 720 | * |
719 | - * @return resource |
|
721 | + * @return boolean |
|
720 | 722 | */ |
721 | 723 | public static function add_course_to_url($courseId, $url_id = 1) |
722 | 724 | { |
@@ -807,7 +809,7 @@ discard block |
||
807 | 809 | * @param int $courseId |
808 | 810 | * @param int $urlId |
809 | 811 | * |
810 | - * @return boolean true if success |
|
812 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
811 | 813 | * */ |
812 | 814 | public static function delete_url_rel_course($courseId, $urlId) |
813 | 815 | { |
@@ -825,7 +827,7 @@ discard block |
||
825 | 827 | * @param int $userGroupId |
826 | 828 | * @param int $urlId |
827 | 829 | * |
828 | - * @return boolean true if success |
|
830 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
829 | 831 | * */ |
830 | 832 | public static function delete_url_rel_usergroup($userGroupId, $urlId) |
831 | 833 | { |
@@ -844,7 +846,7 @@ discard block |
||
844 | 846 | * @param int $userGroupId |
845 | 847 | * @param int $urlId |
846 | 848 | * |
847 | - * @return boolean true if success |
|
849 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
848 | 850 | * */ |
849 | 851 | public static function deleteUrlRelCourseCategory($userGroupId, $urlId) |
850 | 852 | { |
@@ -862,8 +864,9 @@ discard block |
||
862 | 864 | * @author Julio Montoya |
863 | 865 | * @param char course code |
864 | 866 | * @param int url id |
867 | + * @param integer $url_id |
|
865 | 868 | * |
866 | - * @return boolean true if success |
|
869 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
867 | 870 | * */ |
868 | 871 | public static function delete_url_rel_session($session_id, $url_id) |
869 | 872 | { |
@@ -181,7 +181,7 @@ |
||
181 | 181 | |
182 | 182 | /** |
183 | 183 | * set threadPeerQualify |
184 | - * @param $threadPeerQualify |
|
184 | + * @param integer $threadPeerQualify |
|
185 | 185 | * @return $this |
186 | 186 | */ |
187 | 187 | public function setThreadPeerQualify($threadPeerQualify) |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * provides a side connection to a vchamilo database |
141 | 141 | * @param array $_configuration |
142 | 142 | * |
143 | - * @return \Doctrine\DBAL\Driver\Connection |
|
143 | + * @return string |
|
144 | 144 | */ |
145 | 145 | public static function bootConnection(&$_configuration) |
146 | 146 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | /** |
305 | 305 | * get a proper SQLdump command |
306 | - * @param object $vmoodledata the complete new host information |
|
306 | + * @param stdClass $vchamilodata |
|
307 | 307 | * @return string the shell command |
308 | 308 | */ |
309 | 309 | public static function getDatabaseDumpCmd($vchamilodata) |
@@ -383,8 +383,8 @@ discard block |
||
383 | 383 | |
384 | 384 | /** |
385 | 385 | * Dumps a SQL database for having a snapshot. |
386 | - * @param $vchamilo object The Vchamilo object. |
|
387 | - * @param $outputfilerad string The output SQL file radical. |
|
386 | + * @param stdClass $vchamilo object The Vchamilo object. |
|
387 | + * @param string $outputfilerad string The output SQL file radical. |
|
388 | 388 | * @return bool If TRUE, dumping database was a success, otherwise FALSE. |
389 | 389 | */ |
390 | 390 | public static function dumpDatabase($vchamilo, $outputfilerad) |
@@ -560,6 +560,8 @@ discard block |
||
560 | 560 | * internal primitives. This avoids too many changes to do in imported |
561 | 561 | * code |
562 | 562 | * |
563 | + * @param string $module |
|
564 | + * @param string $key |
|
563 | 565 | */ |
564 | 566 | public static function getConfig($module, $key, $isplugin = true) |
565 | 567 | { |
@@ -628,7 +630,7 @@ discard block |
||
628 | 630 | /** |
629 | 631 | * @param string $path |
630 | 632 | * |
631 | - * @return mixed |
|
633 | + * @return string |
|
632 | 634 | */ |
633 | 635 | public static function chopLastSlash($path) |
634 | 636 | { |
@@ -760,7 +762,7 @@ discard block |
||
760 | 762 | } |
761 | 763 | |
762 | 764 | /** |
763 | - * @param object $instance |
|
765 | + * @param stdClass $instance |
|
764 | 766 | * @return \Doctrine\DBAL\Connection |
765 | 767 | */ |
766 | 768 | public static function getConnectionFromInstance($instance, $getManager = false) |
@@ -1169,7 +1171,7 @@ discard block |
||
1169 | 1171 | /** |
1170 | 1172 | * @param stdClass $instance |
1171 | 1173 | * |
1172 | - * @return bool|string returns the original version of the app |
|
1174 | + * @return string|false returns the original version of the app |
|
1173 | 1175 | */ |
1174 | 1176 | public static function canBeUpgraded($instance) |
1175 | 1177 | { |
@@ -186,9 +186,9 @@ |
||
186 | 186 | |
187 | 187 | /** |
188 | 188 | * Get images files from remote host (with webservices) |
189 | - * @param array $file current ppt file details |
|
189 | + * @param string $file current ppt file details |
|
190 | 190 | * @param string $size The expected final size of the rendered slides |
191 | - * @return array images files |
|
191 | + * @return string images files |
|
192 | 192 | */ |
193 | 193 | private function _get_remote_ppt2lp_files($file, $size = null) |
194 | 194 | { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * Adds a mandatory requirement in form of a php.ini configuration. |
221 | 221 | * |
222 | 222 | * @param string $cfgName The configuration name used for ini_get() |
223 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
223 | + * @param boolean|string $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
224 | 224 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
225 | 225 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
226 | 226 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * Adds an optional recommendation in form of a php.ini configuration. |
239 | 239 | * |
240 | 240 | * @param string $cfgName The configuration name used for ini_get() |
241 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
241 | + * @param string|false $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
242 | 242 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
243 | 243 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
244 | 244 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | /** |
278 | 278 | * @param string |
279 | 279 | * @param string |
280 | - * @return true if the user is allowed to see the document, false otherwise |
|
280 | + * @return boolean if the user is allowed to see the document, false otherwise |
|
281 | 281 | * @author Sergio A Kessler, first version |
282 | 282 | * @author Roan Embrechts, bugfix |
283 | 283 | * @todo not only check if a file is visible, but also check if the user is allowed to see the file?? |
@@ -1529,7 +1529,7 @@ discard block |
||
1529 | 1529 | * Return true if the documentpath have visibility=1 as |
1530 | 1530 | * item_property (you should use the is_visible_by_id) |
1531 | 1531 | * |
1532 | - * @param string $document_path the relative complete path of the document |
|
1532 | + * @param string $doc_path the relative complete path of the document |
|
1533 | 1533 | * @param array $course the _course array info of the document's course |
1534 | 1534 | * @param int |
1535 | 1535 | * @param string |
@@ -1615,6 +1615,8 @@ discard block |
||
1615 | 1615 | * @param int |
1616 | 1616 | * @param int |
1617 | 1617 | * @param bool |
1618 | + * @param integer $session_id |
|
1619 | + * @param integer $user_id |
|
1618 | 1620 | * @return bool |
1619 | 1621 | */ |
1620 | 1622 | public static function is_visible_by_id( |
@@ -1966,7 +1968,7 @@ discard block |
||
1966 | 1968 | * Remove default certificate |
1967 | 1969 | * @param string $course_id The course code |
1968 | 1970 | * @param int $default_certificate_id The document id of the default certificate |
1969 | - * @return void |
|
1971 | + * @return false|null |
|
1970 | 1972 | */ |
1971 | 1973 | public static function remove_attach_certificate($course_id, $default_certificate_id) |
1972 | 1974 | { |
@@ -2101,6 +2103,7 @@ discard block |
||
2101 | 2103 | * @param bool is file or string html |
2102 | 2104 | * @param string type (one of the app tools) - optional (otherwise takes the current item's type) |
2103 | 2105 | * @param int level of recursivity we're in |
2106 | + * @param string $source_html |
|
2104 | 2107 | * @return array List of file paths. An additional field containing 'local' or 'remote' helps determine |
2105 | 2108 | * if the file should be copied into the zip or just linked |
2106 | 2109 | */ |
@@ -2940,6 +2943,7 @@ discard block |
||
2940 | 2943 | |
2941 | 2944 | /** |
2942 | 2945 | * Obtains the text inside the file with the right parser |
2946 | + * @param string $doc_path |
|
2943 | 2947 | */ |
2944 | 2948 | public static function get_text_content($doc_path, $doc_mime) |
2945 | 2949 | { |
@@ -3191,6 +3195,7 @@ discard block |
||
3191 | 3195 | * Shows a play icon next to the document title in the document list |
3192 | 3196 | * @param int |
3193 | 3197 | * @param string |
3198 | + * @param integer|null $i |
|
3194 | 3199 | * @return string html content |
3195 | 3200 | */ |
3196 | 3201 | public static function generate_media_preview($i, $type = 'simple') |
@@ -4089,7 +4094,7 @@ discard block |
||
4089 | 4094 | } |
4090 | 4095 | |
4091 | 4096 | /** |
4092 | - * @return array |
|
4097 | + * @return string[] |
|
4093 | 4098 | */ |
4094 | 4099 | public static function get_web_odf_extension_list() |
4095 | 4100 | { |
@@ -4098,10 +4103,10 @@ discard block |
||
4098 | 4103 | |
4099 | 4104 | /** |
4100 | 4105 | * Set of extension allowed to use Jodconverter |
4101 | - * @param $mode 'from' |
|
4106 | + * @param string $mode 'from' |
|
4102 | 4107 | * 'to' |
4103 | 4108 | * 'all' |
4104 | - * @param $format 'text' |
|
4109 | + * @param string $format 'text' |
|
4105 | 4110 | * 'spreadsheet' |
4106 | 4111 | * 'presentation' |
4107 | 4112 | * 'drawing' |
@@ -4305,7 +4310,7 @@ discard block |
||
4305 | 4310 | } |
4306 | 4311 | |
4307 | 4312 | /** |
4308 | - * @return array |
|
4313 | + * @return string[] |
|
4309 | 4314 | */ |
4310 | 4315 | public static function get_system_folders() |
4311 | 4316 | { |
@@ -4323,7 +4328,7 @@ discard block |
||
4323 | 4328 | } |
4324 | 4329 | |
4325 | 4330 | /** |
4326 | - * @return array |
|
4331 | + * @return string[] |
|
4327 | 4332 | */ |
4328 | 4333 | public static function getProtectedFolderFromStudent() |
4329 | 4334 | { |
@@ -4479,7 +4484,7 @@ discard block |
||
4479 | 4484 | * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg |
4480 | 4485 | * @param string $wavFile |
4481 | 4486 | * @param bool $removeWavFileIfSuccess |
4482 | - * @return bool |
|
4487 | + * @return string|false |
|
4483 | 4488 | */ |
4484 | 4489 | public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false) |
4485 | 4490 | { |
@@ -5055,6 +5060,8 @@ discard block |
||
5055 | 5060 | * @param string The current folder (path inside of the "document" directory, including the prefix "/") |
5056 | 5061 | * @param string Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root) |
5057 | 5062 | * @param boolean Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form) |
5063 | + * @param string $document_id |
|
5064 | + * @param FormValidator $form |
|
5058 | 5065 | |
5059 | 5066 | * @return string html form |
5060 | 5067 | */ |
@@ -5560,9 +5567,6 @@ discard block |
||
5560 | 5567 | /** |
5561 | 5568 | * Creates the row of edit icons for a file/folder |
5562 | 5569 | * |
5563 | - * @param string $curdirpath current path (cfr open folder) |
|
5564 | - * @param string $type (file/folder) |
|
5565 | - * @param string $path dbase path of file/folder |
|
5566 | 5570 | * @param int $visibility (1/0) |
5567 | 5571 | * @param int $id dbase id of the document |
5568 | 5572 | * @return string html img tags with hyperlinks |
@@ -5896,7 +5900,7 @@ discard block |
||
5896 | 5900 | /** |
5897 | 5901 | * Gets the path translated with title of docs and folders |
5898 | 5902 | * @param string $path the real path |
5899 | - * @return the path which should be displayed |
|
5903 | + * @return string path which should be displayed |
|
5900 | 5904 | */ |
5901 | 5905 | public static function get_titles_of_path($path) |
5902 | 5906 | { |
@@ -5952,7 +5956,8 @@ discard block |
||
5952 | 5956 | |
5953 | 5957 | /** |
5954 | 5958 | * Checks whether the user is in shared folder |
5955 | - * @return return bool Return true when user is into shared folder |
|
5959 | + * @param integer $current_session_id |
|
5960 | + * @return boolean bool Return true when user is into shared folder |
|
5956 | 5961 | */ |
5957 | 5962 | public static function is_shared_folder($curdirpath, $current_session_id) |
5958 | 5963 | { |
@@ -5968,7 +5973,7 @@ discard block |
||
5968 | 5973 | |
5969 | 5974 | /** |
5970 | 5975 | * Checks whether the user is into any user shared folder |
5971 | - * @return return bool Return true when user is in any user shared folder |
|
5976 | + * @return boolean bool Return true when user is in any user shared folder |
|
5972 | 5977 | */ |
5973 | 5978 | public static function is_any_user_shared_folder($path, $current_session_id) |
5974 | 5979 | { |
@@ -6182,7 +6187,7 @@ discard block |
||
6182 | 6187 | * @param int $id |
6183 | 6188 | * @param array $courseInfo |
6184 | 6189 | * @param int $sessionId |
6185 | - * @return bool |
|
6190 | + * @return boolean|null |
|
6186 | 6191 | */ |
6187 | 6192 | public static function downloadDeletedDocument($id, $courseInfo, $sessionId) |
6188 | 6193 | { |
@@ -6201,7 +6206,7 @@ discard block |
||
6201 | 6206 | * @param array $courseInfo |
6202 | 6207 | * @param int $sessionId |
6203 | 6208 | * |
6204 | - * @return bool |
|
6209 | + * @return false|null |
|
6205 | 6210 | */ |
6206 | 6211 | public static function downloadAllDeletedDocument($courseInfo, $sessionId) |
6207 | 6212 | { |
@@ -6240,7 +6245,7 @@ discard block |
||
6240 | 6245 | * @param array $courseInfo |
6241 | 6246 | * @param int $sessionId |
6242 | 6247 | * |
6243 | - * @return bool |
|
6248 | + * @return false|null |
|
6244 | 6249 | */ |
6245 | 6250 | public static function deleteDocumentsFromSession($courseInfo, $sessionId) |
6246 | 6251 | { |
@@ -422,6 +422,7 @@ discard block |
||
422 | 422 | * If null, the timezone will be determined based on user preference, |
423 | 423 | * or timezone chosen by the admin for the platform. |
424 | 424 | * @param string The timezone to be converted from. If null, UTC will be assumed. |
425 | + * @param string $to_timezone |
|
425 | 426 | * @return string The converted time formatted as Y-m-d H:i:s |
426 | 427 | * |
427 | 428 | * @author Guillaume Viguier <[email protected]> |
@@ -670,6 +671,7 @@ discard block |
||
670 | 671 | * @param mixed The time to be converted |
671 | 672 | * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG) |
672 | 673 | * @param string Timezone to be converted from. If null, UTC will be assumed. |
674 | + * @param string $from_timezone |
|
673 | 675 | * @return string Converted and localized date |
674 | 676 | * |
675 | 677 | * @author Guillaume Viguier <[email protected]> |
@@ -739,7 +741,7 @@ discard block |
||
739 | 741 | * @param int|string $format (optional) The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
740 | 742 | * @param string $language (optional) The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only. |
741 | 743 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
742 | - * @return bool The result is sort of full name of the person. |
|
744 | + * @return string The result is sort of full name of the person. |
|
743 | 745 | * Sample results: |
744 | 746 | * Peter Ustinoff or Dr. Peter Ustinoff - the Western order |
745 | 747 | * Ustinoff Peter or Dr. Ustinoff Peter - the Eastern order |
@@ -1058,8 +1060,8 @@ discard block |
||
1058 | 1060 | |
1059 | 1061 | /** |
1060 | 1062 | * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value. |
1061 | - * @param mixed $search String or array of strings to be found. |
|
1062 | - * @param mixed $replace String or array of strings used for replacement. |
|
1063 | + * @param string $search String or array of strings to be found. |
|
1064 | + * @param string $replace String or array of strings used for replacement. |
|
1063 | 1065 | * @param mixed $subject String or array of strings being searched. |
1064 | 1066 | * @param int $count (optional) The number of matched and replaced needles will be returned in count, which is passed by reference. |
1065 | 1067 | * @param string $encoding (optional) The used internally by this function character encoding. |
@@ -1122,10 +1124,10 @@ discard block |
||
1122 | 1124 | /** |
1123 | 1125 | * Finds first occurrence of a string within another, case insensitive. |
1124 | 1126 | * @param string $haystack The string from which to get the first occurrence. |
1125 | - * @param mixed $needle The string to be found. |
|
1127 | + * @param string $needle The string to be found. |
|
1126 | 1128 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1127 | 1129 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1128 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1130 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1129 | 1131 | * Notes: |
1130 | 1132 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1131 | 1133 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1181,7 +1183,7 @@ discard block |
||
1181 | 1183 | * @param mixed $needle The string which first character is to be found. |
1182 | 1184 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1183 | 1185 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1184 | - * @return mixed Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1186 | + * @return false|string Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1185 | 1187 | * Notes: |
1186 | 1188 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1187 | 1189 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence. |
@@ -1248,7 +1250,7 @@ discard block |
||
1248 | 1250 | * @param mixed $needle The string to be found. |
1249 | 1251 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1250 | 1252 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1251 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1253 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1252 | 1254 | * Notes: |
1253 | 1255 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1254 | 1256 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1429,8 +1431,8 @@ discard block |
||
1429 | 1431 | |
1430 | 1432 | /** |
1431 | 1433 | * Performs a regular expression search and replace, UTF-8 aware when it is applicable. |
1432 | - * @param string|array $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1433 | - * @param string|array $replacement The string or an array with strings to replace. |
|
1434 | + * @param string $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1435 | + * @param string $replacement The string or an array with strings to replace. |
|
1434 | 1436 | * @param string|array $subject The string or an array with strings to search and replace. |
1435 | 1437 | * @param int $limit The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit). |
1436 | 1438 | * @param int &$count If specified, this variable will be filled with the number of replacements done. |
@@ -1578,7 +1580,7 @@ discard block |
||
1578 | 1580 | |
1579 | 1581 | /** |
1580 | 1582 | * This function checks whether two $encoding are equal (same, equvalent). |
1581 | - * @param string|array $encoding1 The first encoding |
|
1583 | + * @param string $encoding1 The first encoding |
|
1582 | 1584 | * @param string|array $encoding2 The second encoding |
1583 | 1585 | * @param bool $strict When this parameter is TRUE the comparison ignores aliases of encodings. |
1584 | 1586 | * When the parameter is FALSE, aliases are taken into account. |
@@ -1682,6 +1684,7 @@ discard block |
||
1682 | 1684 | /** |
1683 | 1685 | * Checks a string for UTF-8 validity. |
1684 | 1686 | * |
1687 | + * @param string $string |
|
1685 | 1688 | */ |
1686 | 1689 | function api_is_valid_utf8(&$string) |
1687 | 1690 | { |
@@ -1824,7 +1827,7 @@ discard block |
||
1824 | 1827 | /** |
1825 | 1828 | * Replaces non-valid formats for person names with the default (English) format. |
1826 | 1829 | * @param string $format The input format to be verified. |
1827 | - * @return bool Returns the same format if is is valid, otherwise returns a valid English format. |
|
1830 | + * @return string Returns the same format if is is valid, otherwise returns a valid English format. |
|
1828 | 1831 | */ |
1829 | 1832 | function _api_validate_person_name_format($format) { |
1830 | 1833 | if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) { |
@@ -1951,6 +1954,9 @@ discard block |
||
1951 | 1954 | |
1952 | 1955 | // This function checks whether the function _api_convert_encoding() (the php- |
1953 | 1956 | // implementation) is able to convert from/to a given encoding. |
1957 | +/** |
|
1958 | + * @param string $encoding |
|
1959 | + */ |
|
1954 | 1960 | function _api_convert_encoding_supports($encoding) { |
1955 | 1961 | static $supports = array(); |
1956 | 1962 | if (!isset($supports[$encoding])) { |
@@ -1961,7 +1967,7 @@ discard block |
||
1961 | 1967 | |
1962 | 1968 | /** |
1963 | 1969 | * Given a date object, return a human or ISO format, with or without h:m:s |
1964 | - * @param object $date The Date object |
|
1970 | + * @param DateTime $date The Date object |
|
1965 | 1971 | * @param bool $showTime Whether to show the time and date (true) or only the date (false) |
1966 | 1972 | * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false) |
1967 | 1973 | * @return string Formatted date |
@@ -682,6 +682,7 @@ discard block |
||
682 | 682 | * retrieves all the courses that the user has already subscribed to |
683 | 683 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
684 | 684 | * @param int $user_id: the id of the user |
685 | + * @param integer $user_id |
|
685 | 686 | * @return array an array containing all the information of the courses of the given user |
686 | 687 | */ |
687 | 688 | public function get_courses_of_user($user_id) |
@@ -732,8 +733,8 @@ discard block |
||
732 | 733 | |
733 | 734 | /** |
734 | 735 | * @todo use the template system |
735 | - * @param $title |
|
736 | - * @param $content |
|
736 | + * @param string|null $title |
|
737 | + * @param string $content |
|
737 | 738 | * @param string $id |
738 | 739 | * @param array $params |
739 | 740 | * @param string $idAccordion |
@@ -1704,8 +1705,8 @@ discard block |
||
1704 | 1705 | |
1705 | 1706 | /** |
1706 | 1707 | * Return HTML code for personal user course category |
1707 | - * @param $id |
|
1708 | - * @param $title |
|
1708 | + * @param integer $id |
|
1709 | + * @param string $title |
|
1709 | 1710 | * @return string |
1710 | 1711 | */ |
1711 | 1712 | private static function getHtmlForUserCategory($id, $title) |
@@ -1726,7 +1727,7 @@ discard block |
||
1726 | 1727 | /** |
1727 | 1728 | * return HTML code for course display in session view |
1728 | 1729 | * @param array $courseInfo |
1729 | - * @param $userCategoryId |
|
1730 | + * @param integer $userCategoryId |
|
1730 | 1731 | * @param bool $displayButton |
1731 | 1732 | * @param $loadDirs |
1732 | 1733 | * @return string |