@@ -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 | { |
@@ -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 | { |
@@ -634,7 +634,6 @@ discard block |
||
634 | 634 | * @param int $sessionId The session ID |
635 | 635 | * @param int $courseId The course ID |
636 | 636 | * @param int $exerciseId The quiz ID |
637 | - * @param int $answer Answer status (0 = incorrect, 1 = correct, 2 = both) |
|
638 | 637 | * @return string HTML array of results formatted for gridJS |
639 | 638 | * @author César Perales <[email protected]>, Beeznest Team |
640 | 639 | */ |
@@ -1222,6 +1221,7 @@ discard block |
||
1222 | 1221 | * @param int Number of items to select |
1223 | 1222 | * @param string Column to order on |
1224 | 1223 | * @param string Order direction |
1224 | + * @param integer $number_of_items |
|
1225 | 1225 | * @return array Results |
1226 | 1226 | */ |
1227 | 1227 | public static function get_course_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1556,6 +1556,7 @@ discard block |
||
1556 | 1556 | * @param int Number of items to select |
1557 | 1557 | * @param string Column to order on |
1558 | 1558 | * @param string Order direction |
1559 | + * @param integer $number_of_items |
|
1559 | 1560 | * @return array Results |
1560 | 1561 | */ |
1561 | 1562 | public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1576,7 +1577,6 @@ discard block |
||
1576 | 1577 | /** |
1577 | 1578 | * Fills in session reporting data |
1578 | 1579 | * |
1579 | - * @param integer $user_id the id of the user |
|
1580 | 1580 | * @param array $url_params additonal url parameters |
1581 | 1581 | * @param array $row the row information (the other columns) |
1582 | 1582 | * @return string html code |
@@ -2206,6 +2206,7 @@ discard block |
||
2206 | 2206 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
2207 | 2207 | * @version Dokeos 1.8.6 |
2208 | 2208 | * @since October 2008 |
2209 | + * @param integer $number_of_items |
|
2209 | 2210 | */ |
2210 | 2211 | public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction) |
2211 | 2212 | { |
@@ -2308,7 +2309,6 @@ discard block |
||
2308 | 2309 | /** |
2309 | 2310 | * Checks if there are repeted users in a given array |
2310 | 2311 | * @param array $usernames list of the usernames in the uploaded file |
2311 | - * @param array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2 |
|
2312 | 2312 | * @return array with the $usernames array and the $user_array array |
2313 | 2313 | * @author Julio Montoya Armas |
2314 | 2314 | */ |