@@ -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; |
@@ -435,6 +435,7 @@ discard block |
||
435 | 435 | * If null, the timezone will be determined based on user preference, |
436 | 436 | * or timezone chosen by the admin for the platform. |
437 | 437 | * @param string The timezone to be converted from. If null, UTC will be assumed. |
438 | + * @param string $to_timezone |
|
438 | 439 | * @return string The converted time formatted as Y-m-d H:i:s |
439 | 440 | * |
440 | 441 | * @author Guillaume Viguier <[email protected]> |
@@ -483,6 +484,7 @@ discard block |
||
483 | 484 | * @param string String to be converted |
484 | 485 | * @param string Timezone (if null, the timezone will be determined based |
485 | 486 | * on user preference, or timezone chosen by the admin for the platform) |
487 | + * @param string $timezone |
|
486 | 488 | * @return int Timestamp |
487 | 489 | * |
488 | 490 | * @author Guillaume Viguier <[email protected]> |
@@ -784,6 +786,7 @@ discard block |
||
784 | 786 | * @param mixed The time to be converted |
785 | 787 | * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG) |
786 | 788 | * @param string Timezone to be converted from. If null, UTC will be assumed. |
789 | + * @param string $from_timezone |
|
787 | 790 | * @return string Converted and localized date |
788 | 791 | * |
789 | 792 | * @author Guillaume Viguier <[email protected]> |
@@ -853,7 +856,7 @@ discard block |
||
853 | 856 | * @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. |
854 | 857 | * @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. |
855 | 858 | * @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. |
856 | - * @return bool The result is sort of full name of the person. |
|
859 | + * @return string The result is sort of full name of the person. |
|
857 | 860 | * Sample results: |
858 | 861 | * Peter Ustinoff or Dr. Peter Ustinoff - the Western order |
859 | 862 | * Ustinoff Peter or Dr. Ustinoff Peter - the Eastern order |
@@ -947,7 +950,7 @@ discard block |
||
947 | 950 | |
948 | 951 | /** |
949 | 952 | * Checks whether a given format represents person name in Western order (for which first name is first). |
950 | - * @param int/string $format (optional) The person name format. It may be a pattern-string (for example '%t. %l, %f') or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
|
953 | + * @param integer $format (optional) The person name format. It may be a pattern-string (for example '%t. %l, %f') or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
|
951 | 954 | * @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. |
952 | 955 | * @return bool The result TRUE means that the order is first_name last_name, FALSE means last_name first_name. |
953 | 956 | * Note: You may use this function for determing the order of the fields or columns "First name" and "Last name" in forms, tables and reports. |
@@ -1175,8 +1178,8 @@ discard block |
||
1175 | 1178 | |
1176 | 1179 | /** |
1177 | 1180 | * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value. |
1178 | - * @param mixed $search String or array of strings to be found. |
|
1179 | - * @param mixed $replace String or array of strings used for replacement. |
|
1181 | + * @param string $search String or array of strings to be found. |
|
1182 | + * @param string $replace String or array of strings used for replacement. |
|
1180 | 1183 | * @param mixed $subject String or array of strings being searched. |
1181 | 1184 | * @param int $count (optional) The number of matched and replaced needles will be returned in count, which is passed by reference. |
1182 | 1185 | * @param string $encoding (optional) The used internally by this function character encoding. |
@@ -1239,10 +1242,10 @@ discard block |
||
1239 | 1242 | /** |
1240 | 1243 | * Finds first occurrence of a string within another, case insensitive. |
1241 | 1244 | * @param string $haystack The string from which to get the first occurrence. |
1242 | - * @param mixed $needle The string to be found. |
|
1245 | + * @param string $needle The string to be found. |
|
1243 | 1246 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1244 | 1247 | * @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. |
1245 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1248 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1246 | 1249 | * Notes: |
1247 | 1250 | * 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. |
1248 | 1251 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1298,7 +1301,7 @@ discard block |
||
1298 | 1301 | * @param mixed $needle The string which first character is to be found. |
1299 | 1302 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1300 | 1303 | * @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. |
1301 | - * @return mixed Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1304 | + * @return false|string Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1302 | 1305 | * Notes: |
1303 | 1306 | * 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. |
1304 | 1307 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence. |
@@ -1348,7 +1351,7 @@ discard block |
||
1348 | 1351 | * @param string $needle The string to be found. |
1349 | 1352 | * @param int $offset (optional) $offset may be specified to begin searching an arbitrary position. Negative values will stop searching at an arbitrary point prior to the end of the string. |
1350 | 1353 | * @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. |
1351 | - * @return mixed Returns the numeric position of the first occurrence of $needle in the $haystack, or FALSE if $needle is not found. |
|
1354 | + * @return integer|null Returns the numeric position of the first occurrence of $needle in the $haystack, or FALSE if $needle is not found. |
|
1352 | 1355 | * Note: The first character's position is 0, the second character position is 1, and so on. |
1353 | 1356 | * This function is aimed at replacing the functions strrpos() and mb_strrpos() for human-language strings. |
1354 | 1357 | * @link http://php.net/manual/en/function.strrpos |
@@ -1365,7 +1368,7 @@ discard block |
||
1365 | 1368 | * @param mixed $needle The string to be found. |
1366 | 1369 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1367 | 1370 | * @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. |
1368 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1371 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1369 | 1372 | * Notes: |
1370 | 1373 | * 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. |
1371 | 1374 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1508,7 +1511,7 @@ discard block |
||
1508 | 1511 | * Note that this changes the return value in an array where every element is an array consisting of the matched string at index 0 and its string offset into subject at index 1. |
1509 | 1512 | * @param int $offset (optional) Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search. |
1510 | 1513 | * @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. |
1511 | - * @return int|boolean Returns the number of times pattern matches or FALSE if an error occurred. |
|
1514 | + * @return integer Returns the number of times pattern matches or FALSE if an error occurred. |
|
1512 | 1515 | * @link http://php.net/preg_match |
1513 | 1516 | */ |
1514 | 1517 | function api_preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0, $encoding = null) { |
@@ -1531,7 +1534,7 @@ discard block |
||
1531 | 1534 | * If no order flag is given, PREG_PATTERN_ORDER is assumed. |
1532 | 1535 | * @param int $offset (optional) Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search. |
1533 | 1536 | * @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. |
1534 | - * @return int|boolean Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred. |
|
1537 | + * @return integer Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred. |
|
1535 | 1538 | * @link http://php.net/preg_match_all |
1536 | 1539 | */ |
1537 | 1540 | function api_preg_match_all($pattern, $subject, &$matches, $flags = PREG_PATTERN_ORDER, $offset = 0, $encoding = null) { |
@@ -1546,8 +1549,8 @@ discard block |
||
1546 | 1549 | |
1547 | 1550 | /** |
1548 | 1551 | * Performs a regular expression search and replace, UTF-8 aware when it is applicable. |
1549 | - * @param string|array $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1550 | - * @param string|array $replacement The string or an array with strings to replace. |
|
1552 | + * @param string $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1553 | + * @param string $replacement The string or an array with strings to replace. |
|
1551 | 1554 | * @param string|array $subject The string or an array with strings to search and replace. |
1552 | 1555 | * @param int $limit The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit). |
1553 | 1556 | * @param int &$count If specified, this variable will be filled with the number of replacements done. |
@@ -1799,6 +1802,7 @@ discard block |
||
1799 | 1802 | /** |
1800 | 1803 | * Checks a string for UTF-8 validity. |
1801 | 1804 | * |
1805 | + * @param string $string |
|
1802 | 1806 | */ |
1803 | 1807 | function api_is_valid_utf8(&$string) |
1804 | 1808 | { |
@@ -1941,7 +1945,7 @@ discard block |
||
1941 | 1945 | /** |
1942 | 1946 | * Replaces non-valid formats for person names with the default (English) format. |
1943 | 1947 | * @param string $format The input format to be verified. |
1944 | - * @return bool Returns the same format if is is valid, otherwise returns a valid English format. |
|
1948 | + * @return string Returns the same format if is is valid, otherwise returns a valid English format. |
|
1945 | 1949 | */ |
1946 | 1950 | function _api_validate_person_name_format($format) { |
1947 | 1951 | if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) { |
@@ -2068,6 +2072,9 @@ discard block |
||
2068 | 2072 | |
2069 | 2073 | // This function checks whether the function _api_convert_encoding() (the php- |
2070 | 2074 | // implementation) is able to convert from/to a given encoding. |
2075 | +/** |
|
2076 | + * @param string $encoding |
|
2077 | + */ |
|
2071 | 2078 | function _api_convert_encoding_supports($encoding) { |
2072 | 2079 | static $supports = array(); |
2073 | 2080 | if (!isset($supports[$encoding])) { |
@@ -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 |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | * |
432 | 432 | * @access public |
433 | 433 | * @param mixed , A string or array of protocols that will be removed from the internal list of allowed protocols. |
434 | - * @return bool Status of removing valid protocols. |
|
434 | + * @return null|boolean Status of removing valid protocols. |
|
435 | 435 | * @see RemoveProtocol() |
436 | 436 | * @since PHP5 OOP 0.2.1 |
437 | 437 | */ |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | * This method goes through an array, and changes the keys to all lower case. |
580 | 580 | * |
581 | 581 | * @access private |
582 | - * @param array $in_array Associative array |
|
582 | + * @param array $inarray Associative array |
|
583 | 583 | * @return array Modified array |
584 | 584 | * @since PHP4 OOP 0.0.1 |
585 | 585 | */ |
@@ -1129,9 +1129,7 @@ discard block |
||
1129 | 1129 | * URL protocol white listing system anyway. |
1130 | 1130 | * |
1131 | 1131 | * @access private |
1132 | - * @param string $value The entitiy to be decoded. |
|
1133 | - * @return string Decoded entity |
|
1134 | - * @since PHP4 OOP 0.0.1 |
|
1132 | + * @param string $string |
|
1135 | 1133 | */ |
1136 | 1134 | function _decode_entities($string) |
1137 | 1135 | { |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | * |
322 | 322 | * @access public |
323 | 323 | * @param mixed , A string or array of protocols that will be removed from the internal list of allowed protocols. |
324 | - * @return bool Status of removing valid protocols. |
|
324 | + * @return null|boolean Status of removing valid protocols. |
|
325 | 325 | * @see RemoveProtocol() |
326 | 326 | * @since PHP5 OOP 1.0.0 |
327 | 327 | */ |
@@ -1133,9 +1133,7 @@ discard block |
||
1133 | 1133 | * URL protocol white listing system anyway. |
1134 | 1134 | * |
1135 | 1135 | * @access private |
1136 | - * @param string $value The entitiy to be decoded. |
|
1137 | - * @return string Decoded entity |
|
1138 | - * @since PHP4 OOP 0.0.1 |
|
1136 | + * @param string $string |
|
1139 | 1137 | */ |
1140 | 1138 | private function decodeEntities($string) |
1141 | 1139 | { |
@@ -121,6 +121,9 @@ |
||
121 | 121 | return $out; |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $text |
|
126 | + */ |
|
124 | 127 | function output_code_wrap($text) |
125 | 128 | { |
126 | 129 | if(KSESTEST_ENV == 'CLI') |
@@ -266,6 +266,7 @@ discard block |
||
266 | 266 | * @global bool $is_platformAdmin |
267 | 267 | * @global bool $is_allowedCreateCourse |
268 | 268 | * @global object $_user |
269 | + * @param boolean $reset |
|
269 | 270 | */ |
270 | 271 | public static function init_user($user_id, $reset) |
271 | 272 | { |
@@ -355,7 +356,7 @@ discard block |
||
355 | 356 | * @global type $is_allowed_in_course |
356 | 357 | * |
357 | 358 | * @param type $course_id |
358 | - * @param type $reset |
|
359 | + * @param boolean $reset |
|
359 | 360 | */ |
360 | 361 | static function init_course($course_id, $reset) |
361 | 362 | { |
@@ -616,6 +616,8 @@ discard block |
||
616 | 616 | * @param int message id |
617 | 617 | * @param int message user id (receiver user id or sender user id) |
618 | 618 | * @param int group id (optional) |
619 | + * @param integer $message_id |
|
620 | + * @param integer $message_uid |
|
619 | 621 | * @return void |
620 | 622 | */ |
621 | 623 | public static function delete_message_attachment_file($message_id, $message_uid, $group_id = 0) |
@@ -660,7 +662,7 @@ discard block |
||
660 | 662 | * update messages by user id and message id |
661 | 663 | * @param int $user_id |
662 | 664 | * @param int $message_id |
663 | - * @return resource |
|
665 | + * @return false|null |
|
664 | 666 | */ |
665 | 667 | public static function update_message($user_id, $message_id) |
666 | 668 | { |
@@ -680,7 +682,7 @@ discard block |
||
680 | 682 | * @param int $user_id |
681 | 683 | * @param int $message_id |
682 | 684 | * @param string $type |
683 | - * @return bool |
|
685 | + * @return false|null |
|
684 | 686 | */ |
685 | 687 | public static function update_message_status($user_id, $message_id,$type) |
686 | 688 | { |
@@ -717,6 +719,7 @@ discard block |
||
717 | 719 | /** |
718 | 720 | * get messages by group id |
719 | 721 | * @param int group id |
722 | + * @param integer $group_id |
|
720 | 723 | * @return array |
721 | 724 | */ |
722 | 725 | public static function get_messages_by_group($group_id) |
@@ -1433,7 +1436,7 @@ discard block |
||
1433 | 1436 | * Sort date by desc from a multi-dimensional array |
1434 | 1437 | * @param array $array1 first array to compare |
1435 | 1438 | * @param array $array2 second array to compare |
1436 | - * @return bool |
|
1439 | + * @return integer |
|
1437 | 1440 | */ |
1438 | 1441 | public function order_desc_date($array1, $array2) |
1439 | 1442 | { |
@@ -1511,7 +1514,6 @@ discard block |
||
1511 | 1514 | /** |
1512 | 1515 | * @param $id |
1513 | 1516 | * @param array $params |
1514 | - * @param string $display |
|
1515 | 1517 | * @return string |
1516 | 1518 | */ |
1517 | 1519 | public static function generate_invitation_form($id, $params = array()) |
@@ -25,6 +25,7 @@ |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Useful finder - experimental akelos like only use in notification.lib.php send function |
28 | + * @param string $type |
|
28 | 29 | */ |
29 | 30 | public function find($type, $options = null) |
30 | 31 | { |