@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * |
39 | - * @return StaticPlugin |
|
39 | + * @return BuyCoursesPlugin |
|
40 | 40 | */ |
41 | 41 | static function create() |
42 | 42 | { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | /** |
253 | 253 | * Save a transfer account information |
254 | 254 | * @param array $params The transfer account |
255 | - * @return int Rows affected. Otherwise return false |
|
255 | + * @return false|string Rows affected. Otherwise return false |
|
256 | 256 | */ |
257 | 257 | public function saveTransferAccount($params) |
258 | 258 | { |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | /** |
665 | 665 | * Get session info |
666 | 666 | * @param array $sessionId The session ID |
667 | - * @return array |
|
667 | + * @return Session |
|
668 | 668 | */ |
669 | 669 | public function getSessionInfo($sessionId) |
670 | 670 | { |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | * Register a sale |
758 | 758 | * @param int $itemId The product ID |
759 | 759 | * @param int $paymentType The payment type |
760 | - * @return boolean |
|
760 | + * @return false|string |
|
761 | 761 | */ |
762 | 762 | public function registerSale($itemId, $paymentType) |
763 | 763 | { |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | |
940 | 940 | /** |
941 | 941 | * Get payment types |
942 | - * @return array |
|
942 | + * @return string[] |
|
943 | 943 | */ |
944 | 944 | public function getPaymentTypes() |
945 | 945 | { |
@@ -977,7 +977,7 @@ discard block |
||
977 | 977 | |
978 | 978 | /** |
979 | 979 | * Get the statuses for sales |
980 | - * @return array |
|
980 | + * @return string[] |
|
981 | 981 | */ |
982 | 982 | public function getSaleStatuses() |
983 | 983 | { |
@@ -990,7 +990,7 @@ discard block |
||
990 | 990 | |
991 | 991 | /** |
992 | 992 | * Get the statuses for Payouts |
993 | - * @return array |
|
993 | + * @return string[] |
|
994 | 994 | */ |
995 | 995 | public function getPayoutStatuses() |
996 | 996 | { |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | |
1004 | 1004 | /** |
1005 | 1005 | * Get the list of product types |
1006 | - * @return array |
|
1006 | + * @return string[] |
|
1007 | 1007 | */ |
1008 | 1008 | public function getProductTypes() |
1009 | 1009 | { |
@@ -1384,7 +1384,7 @@ discard block |
||
1384 | 1384 | /** |
1385 | 1385 | * Register a item |
1386 | 1386 | * @param array $itemData The item data |
1387 | - * @return int The item ID. Otherwise return false |
|
1387 | + * @return false|string The item ID. Otherwise return false |
|
1388 | 1388 | */ |
1389 | 1389 | public function registerItem(array $itemData) |
1390 | 1390 | { |
@@ -1542,7 +1542,7 @@ discard block |
||
1542 | 1542 | /** |
1543 | 1543 | * Verify if the beneficiary have a paypal account |
1544 | 1544 | * @param int $userId |
1545 | - * @return true if the user have a paypal account, false if not |
|
1545 | + * @return boolean if the user have a paypal account, false if not |
|
1546 | 1546 | */ |
1547 | 1547 | public function verifyPaypalAccountByBeneficiary($userId) |
1548 | 1548 | { |
@@ -242,6 +242,9 @@ discard block |
||
242 | 242 | return $hmac; |
243 | 243 | } |
244 | 244 | |
245 | +/** |
|
246 | + * @param string|false $text |
|
247 | + */ |
|
245 | 248 | function _openid_sha1($text) { |
246 | 249 | $hex = sha1($text); |
247 | 250 | $raw = ''; |
@@ -404,6 +407,10 @@ discard block |
||
404 | 407 | */ |
405 | 408 | if (!function_exists('bcpowmod')) { |
406 | 409 | |
410 | + /** |
|
411 | + * @param string $exp |
|
412 | + * @param string $mod |
|
413 | + */ |
|
407 | 414 | function bcpowmod($base, $exp, $mod) { |
408 | 415 | $square = bcmod($base, $mod); |
409 | 416 | $result = 1; |
@@ -230,7 +230,7 @@ |
||
230 | 230 | /** |
231 | 231 | * Get id |
232 | 232 | * |
233 | - * @return boolean |
|
233 | + * @return integer |
|
234 | 234 | */ |
235 | 235 | public function getId() |
236 | 236 | { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
94 | - * @param array $array |
|
94 | + * @param string[] $array |
|
95 | 95 | */ |
96 | 96 | public function set_tools_to_build($array) |
97 | 97 | { |
@@ -3054,7 +3054,7 @@ |
||
3054 | 3054 | * @param integer $thread_qualify |
3055 | 3055 | * @param integer $qualify_time |
3056 | 3056 | * @param integer $session_id |
3057 | - * @return array optional |
|
3057 | + * @return string|null optional |
|
3058 | 3058 | * @author Isaac Flores <[email protected]>, U.N.A.S University |
3059 | 3059 | * @version October 2008, dokeos 1.8.6 |
3060 | 3060 | */ |
@@ -1244,6 +1244,7 @@ discard block |
||
1244 | 1244 | * Gets the list of courses a specific user is subscribed to |
1245 | 1245 | * @param int User ID |
1246 | 1246 | * @param boolean $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED |
1247 | + * @param integer $userid |
|
1247 | 1248 | * @return array Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d) |
1248 | 1249 | */ |
1249 | 1250 | function api_get_user_courses($userid, $fetch_session = true) |
@@ -3036,7 +3037,7 @@ discard block |
||
3036 | 3037 | * on the session visibility |
3037 | 3038 | * @param bool $tutor Whether to check if the user has the tutor role |
3038 | 3039 | * @param bool $coach Whether to check if the user has the coach role |
3039 | -* @return boolean true: the user has the rights to edit, false: he does not |
|
3040 | +* @return boolean|null true: the user has the rights to edit, false: he does not |
|
3040 | 3041 | */ |
3041 | 3042 | function api_is_allowed_to_session_edit($tutor = false, $coach = false) |
3042 | 3043 | { |
@@ -6656,7 +6657,7 @@ discard block |
||
6656 | 6657 | /** |
6657 | 6658 | * Returns an array of global configuration settings which should be ignored |
6658 | 6659 | * when printing the configuration settings screens |
6659 | - * @return array Array of strings, each identifying one of the excluded settings |
|
6660 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
6660 | 6661 | */ |
6661 | 6662 | function api_get_locked_settings() { |
6662 | 6663 | return array( |
@@ -6699,6 +6700,7 @@ discard block |
||
6699 | 6700 | * false if he isn't. If the user ID is given and is an integer, then the same |
6700 | 6701 | * ID is simply returned |
6701 | 6702 | * @param integer User ID |
6703 | + * @param integer $user_id |
|
6702 | 6704 | * @return boolean Integer User ID is logged in, or false otherwise |
6703 | 6705 | */ |
6704 | 6706 | function api_user_is_login($user_id = null) { |
@@ -7143,6 +7145,7 @@ discard block |
||
7143 | 7145 | /** |
7144 | 7146 | * Gets memory limit in bytes |
7145 | 7147 | * @param string The memory size (128M, 1G, 1000K, etc) |
7148 | + * @param string $mem |
|
7146 | 7149 | * @return int |
7147 | 7150 | * @assert (null) === false |
7148 | 7151 | * @assert ('1t') === 1099511627776 |
@@ -1097,7 +1097,7 @@ |
||
1097 | 1097 | * @param String $type |
1098 | 1098 | * @param Integer $blog_id |
1099 | 1099 | * @param Integer $item_id |
1100 | - * @return array |
|
1100 | + * @return double |
|
1101 | 1101 | */ |
1102 | 1102 | public static function display_rating($type, $blog_id, $item_id) |
1103 | 1103 | { |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * @param string $objetives |
52 | 52 | * @param string $target_audience |
53 | 53 | * @param int $user_id |
54 | - * @return mixed The database id of the newly created course request or FALSE on failure. |
|
54 | + * @return false|string The database id of the newly created course request or FALSE on failure. |
|
55 | 55 | */ |
56 | 56 | public static function create_course_request( |
57 | 57 | $wanted_code, |
@@ -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 |
@@ -1614,6 +1614,8 @@ discard block |
||
1614 | 1614 | * @param int |
1615 | 1615 | * @param int |
1616 | 1616 | * @param bool |
1617 | + * @param integer $session_id |
|
1618 | + * @param integer $user_id |
|
1617 | 1619 | * @return bool |
1618 | 1620 | */ |
1619 | 1621 | public static function is_visible_by_id( |
@@ -1965,7 +1967,7 @@ discard block |
||
1965 | 1967 | * Remove default certificate |
1966 | 1968 | * @param string $course_id The course code |
1967 | 1969 | * @param int $default_certificate_id The document id of the default certificate |
1968 | - * @return void |
|
1970 | + * @return false|null |
|
1969 | 1971 | */ |
1970 | 1972 | public static function remove_attach_certificate($course_id, $default_certificate_id) |
1971 | 1973 | { |
@@ -2100,6 +2102,7 @@ discard block |
||
2100 | 2102 | * @param bool is file or string html |
2101 | 2103 | * @param string type (one of the app tools) - optional (otherwise takes the current item's type) |
2102 | 2104 | * @param int level of recursivity we're in |
2105 | + * @param string $source_html |
|
2103 | 2106 | * @return array List of file paths. An additional field containing 'local' or 'remote' helps determine |
2104 | 2107 | * if the file should be copied into the zip or just linked |
2105 | 2108 | */ |
@@ -2938,6 +2941,7 @@ discard block |
||
2938 | 2941 | |
2939 | 2942 | /** |
2940 | 2943 | * Obtains the text inside the file with the right parser |
2944 | + * @param string $doc_path |
|
2941 | 2945 | */ |
2942 | 2946 | public static function get_text_content($doc_path, $doc_mime) |
2943 | 2947 | { |
@@ -3188,6 +3192,7 @@ discard block |
||
3188 | 3192 | * Shows a play icon next to the document title in the document list |
3189 | 3193 | * @param int |
3190 | 3194 | * @param string |
3195 | + * @param integer|null $i |
|
3191 | 3196 | * @return string html content |
3192 | 3197 | */ |
3193 | 3198 | static function generate_media_preview($i, $type = 'simple') |
@@ -3581,7 +3586,7 @@ discard block |
||
3581 | 3586 | * @param bool $add_move_button |
3582 | 3587 | * @param string $target |
3583 | 3588 | * @param string $overwrite_url |
3584 | - * @return null|string |
|
3589 | + * @return string |
|
3585 | 3590 | */ |
3586 | 3591 | private static function parseFile( |
3587 | 3592 | $course_info, |
@@ -4086,7 +4091,7 @@ discard block |
||
4086 | 4091 | } |
4087 | 4092 | |
4088 | 4093 | /** |
4089 | - * @return array |
|
4094 | + * @return string[] |
|
4090 | 4095 | */ |
4091 | 4096 | public static function get_web_odf_extension_list() |
4092 | 4097 | { |
@@ -4095,10 +4100,10 @@ discard block |
||
4095 | 4100 | |
4096 | 4101 | /** |
4097 | 4102 | * Set of extension allowed to use Jodconverter |
4098 | - * @param $mode 'from' |
|
4103 | + * @param string $mode 'from' |
|
4099 | 4104 | * 'to' |
4100 | 4105 | * 'all' |
4101 | - * @param $format 'text' |
|
4106 | + * @param string $format 'text' |
|
4102 | 4107 | * 'spreadsheet' |
4103 | 4108 | * 'presentation' |
4104 | 4109 | * 'drawing' |
@@ -4302,7 +4307,7 @@ discard block |
||
4302 | 4307 | } |
4303 | 4308 | |
4304 | 4309 | /** |
4305 | - * @return array |
|
4310 | + * @return string[] |
|
4306 | 4311 | */ |
4307 | 4312 | public static function get_system_folders() |
4308 | 4313 | { |
@@ -4320,7 +4325,7 @@ discard block |
||
4320 | 4325 | } |
4321 | 4326 | |
4322 | 4327 | /** |
4323 | - * @return array |
|
4328 | + * @return string[] |
|
4324 | 4329 | */ |
4325 | 4330 | public static function getProtectedFolderFromStudent() |
4326 | 4331 | { |
@@ -4476,7 +4481,7 @@ discard block |
||
4476 | 4481 | * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg |
4477 | 4482 | * @param string $wavFile |
4478 | 4483 | * @param bool $removeWavFileIfSuccess |
4479 | - * @return bool |
|
4484 | + * @return string|false |
|
4480 | 4485 | */ |
4481 | 4486 | public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false) |
4482 | 4487 | { |
@@ -5051,6 +5056,8 @@ discard block |
||
5051 | 5056 | * @param string The current folder (path inside of the "document" directory, including the prefix "/") |
5052 | 5057 | * @param string Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root) |
5053 | 5058 | * @param boolean Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form) |
5059 | + * @param string $document_id |
|
5060 | + * @param FormValidator $form |
|
5054 | 5061 | |
5055 | 5062 | * @return string html form |
5056 | 5063 | */ |
@@ -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 |
@@ -5894,7 +5898,7 @@ discard block |
||
5894 | 5898 | /** |
5895 | 5899 | * Gets the path translated with title of docs and folders |
5896 | 5900 | * @param string $path the real path |
5897 | - * @return the path which should be displayed |
|
5901 | + * @return string path which should be displayed |
|
5898 | 5902 | */ |
5899 | 5903 | public static function get_titles_of_path($path) |
5900 | 5904 | { |
@@ -5949,7 +5953,8 @@ discard block |
||
5949 | 5953 | |
5950 | 5954 | /** |
5951 | 5955 | * Checks whether the user is in shared folder |
5952 | - * @return return bool Return true when user is into shared folder |
|
5956 | + * @param integer $current_session_id |
|
5957 | + * @return boolean bool Return true when user is into shared folder |
|
5953 | 5958 | */ |
5954 | 5959 | public static function is_shared_folder($curdirpath, $current_session_id) |
5955 | 5960 | { |
@@ -5965,7 +5970,7 @@ discard block |
||
5965 | 5970 | |
5966 | 5971 | /** |
5967 | 5972 | * Checks whether the user is into any user shared folder |
5968 | - * @return return bool Return true when user is in any user shared folder |
|
5973 | + * @return boolean bool Return true when user is in any user shared folder |
|
5969 | 5974 | */ |
5970 | 5975 | public static function is_any_user_shared_folder($path, $current_session_id) |
5971 | 5976 | { |
@@ -6179,7 +6184,7 @@ discard block |
||
6179 | 6184 | * @param int $id |
6180 | 6185 | * @param array $courseInfo |
6181 | 6186 | * @param int $sessionId |
6182 | - * @return bool |
|
6187 | + * @return boolean|null |
|
6183 | 6188 | */ |
6184 | 6189 | public static function downloadDeletedDocument($id, $courseInfo, $sessionId) |
6185 | 6190 | { |
@@ -6198,7 +6203,7 @@ discard block |
||
6198 | 6203 | * @param array $courseInfo |
6199 | 6204 | * @param int $sessionId |
6200 | 6205 | * |
6201 | - * @return bool |
|
6206 | + * @return false|null |
|
6202 | 6207 | */ |
6203 | 6208 | public static function downloadAllDeletedDocument($courseInfo, $sessionId) |
6204 | 6209 | { |
@@ -6237,7 +6242,7 @@ discard block |
||
6237 | 6242 | * @param array $courseInfo |
6238 | 6243 | * @param int $sessionId |
6239 | 6244 | * |
6240 | - * @return bool |
|
6245 | + * @return false|null |
|
6241 | 6246 | */ |
6242 | 6247 | public function deleteDocumentsFromSession($courseInfo, $sessionId) |
6243 | 6248 | { |