@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * @author Christophe Gesche <[email protected]> |
370 | 370 | * @author Hugues Peeters <[email protected]> |
371 | 371 | * @author Bart Mollet |
372 | - * @param mixed $groupIdList - group(s) to delete. It can be a single id |
|
372 | + * @param mixed $group_ids - group(s) to delete. It can be a single id |
|
373 | 373 | * (int) or a list of id (array). |
374 | 374 | * @param string $course_code Default is current course |
375 | 375 | * @return integer - number of groups deleted. |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * @param bool Whether self registration is allowed or not |
574 | 574 | * @param bool Whether self unregistration is allowed or not |
575 | 575 | * @param int $categoryId |
576 | - * @return bool TRUE if properties are successfully changed, false otherwise |
|
576 | + * @return Statement|null TRUE if properties are successfully changed, false otherwise |
|
577 | 577 | */ |
578 | 578 | public static function set_group_properties( |
579 | 579 | $group_id, |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | * @param int $group_id The id of the group |
725 | 725 | * @param string $course_code The course in which the group is (default = |
726 | 726 | * current course) |
727 | - * @return array The category |
|
727 | + * @return integer The category |
|
728 | 728 | */ |
729 | 729 | public static function get_category_from_group($group_id, $course_code = null) |
730 | 730 | { |
@@ -786,9 +786,9 @@ discard block |
||
786 | 786 | * Create group category |
787 | 787 | * @param string $title The title of the new category |
788 | 788 | * @param string $description The description of the new category |
789 | - * @param bool $self_registration_allowed |
|
790 | - * @param bool $self_unregistration_allowed |
|
791 | - * @param int $max_number_of_students |
|
789 | + * @param integer $self_registration_allowed |
|
790 | + * @param integer $self_unregistration_allowed |
|
791 | + * @param int $maximum_number_of_students |
|
792 | 792 | * @param int $groups_per_user |
793 | 793 | */ |
794 | 794 | public static function create_category( |
@@ -994,6 +994,8 @@ discard block |
||
994 | 994 | * @param int $limit |
995 | 995 | * @param bool $getCount |
996 | 996 | * @param int $courseId |
997 | + * @param string $column |
|
998 | + * @param string $direction |
|
997 | 999 | * @return array list of user id |
998 | 1000 | */ |
999 | 1001 | public static function get_users( |
@@ -1172,7 +1174,7 @@ discard block |
||
1172 | 1174 | * Hugues Peeters <[email protected]> - original version |
1173 | 1175 | * @author Roan Embrechts - virtual course support, code cleaning |
1174 | 1176 | * @author Bart Mollet - code cleaning, use other GroupManager-functions |
1175 | - * @return void |
|
1177 | + * @return false|null |
|
1176 | 1178 | */ |
1177 | 1179 | public static function fill_groups($group_ids) |
1178 | 1180 | { |
@@ -1625,7 +1627,7 @@ discard block |
||
1625 | 1627 | * Unsubscribe user(s) from a specified group in current course |
1626 | 1628 | * @param mixed $user_ids Can be an array with user-id's or a single user-id |
1627 | 1629 | * @param int $group_id |
1628 | - * @return bool TRUE if successful |
|
1630 | + * @return boolean|null TRUE if successful |
|
1629 | 1631 | */ |
1630 | 1632 | public static function unsubscribe_users($user_ids, $group_id) |
1631 | 1633 | { |
@@ -1644,7 +1646,7 @@ discard block |
||
1644 | 1646 | |
1645 | 1647 | /** |
1646 | 1648 | * Unsubscribe all users from one or more groups |
1647 | - * @param mixed $group_id Can be an array with group-id's or a single group-id |
|
1649 | + * @param mixed $group_ids Can be an array with group-id's or a single group-id |
|
1648 | 1650 | * @return bool TRUE if successful |
1649 | 1651 | */ |
1650 | 1652 | public static function unsubscribe_all_users($group_ids) |
@@ -1676,7 +1678,7 @@ discard block |
||
1676 | 1678 | |
1677 | 1679 | /** |
1678 | 1680 | * Unsubscribe all tutors from one or more groups |
1679 | - * @param mixed $group_id Can be an array with group-id's or a single group-id |
|
1681 | + * @param mixed $group_ids Can be an array with group-id's or a single group-id |
|
1680 | 1682 | * @see unsubscribe_all_users. This function is almost an exact copy of that function. |
1681 | 1683 | * @return bool TRUE if successful |
1682 | 1684 | * @author Patrick Cool <[email protected]>, Ghent University |
@@ -1861,6 +1863,7 @@ discard block |
||
1861 | 1863 | * |
1862 | 1864 | * @param $user_array_in list of users (must be sorted). |
1863 | 1865 | * @param string $compare_field, the field to be compared |
1866 | + * @param string $compare_field |
|
1864 | 1867 | */ |
1865 | 1868 | public static function filter_duplicates($user_array_in, $compare_field) |
1866 | 1869 | { |
@@ -138,7 +138,7 @@ |
||
138 | 138 | |
139 | 139 | /** |
140 | 140 | * Return a list an associative array where keys are the active hook observer class name |
141 | - * @param $eventName |
|
141 | + * @param string $eventName |
|
142 | 142 | * |
143 | 143 | * @return array |
144 | 144 | */ |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @author Kjell-Inge Gustafsson <[email protected]> |
138 | 138 | * @since 2.4.8 - 2008-10-21 |
139 | 139 | * @param string $value |
140 | - * @return void |
|
140 | + * @return false|null |
|
141 | 141 | */ |
142 | 142 | function setCalscale( $value ) { |
143 | 143 | if( empty( $value )) return FALSE; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | * @author Kjell-Inge Gustafsson <[email protected]> |
274 | 274 | * @since 2.4.8 - 2008-10-23 |
275 | 275 | * @param string $value |
276 | - * @return void |
|
276 | + * @return boolean |
|
277 | 277 | */ |
278 | 278 | function setVersion( $value ) { |
279 | 279 | if( empty( $value )) return FALSE; |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | * @since 2.5.1 - 2008-11-02 |
398 | 398 | * @param string $propName, optional |
399 | 399 | * @param int @propix, optional, if specific property is wanted in case of multiply occurences |
400 | - * @param bool $inclParam=FALSE |
|
400 | + * @param bool $inclParam |
|
401 | 401 | * @return mixed |
402 | 402 | */ |
403 | 403 | function getProperty( $propName=FALSE, $propix=FALSE, $inclParam=FALSE ) { |
@@ -448,9 +448,6 @@ discard block |
||
448 | 448 | * |
449 | 449 | * @author Kjell-Inge Gustafsson <[email protected]> |
450 | 450 | * @since 2.2.13 - 2007-11-04 |
451 | - * @param mixed $args variable number of function arguments, |
|
452 | - * first argument is ALWAYS component name, |
|
453 | - * second ALWAYS component value! |
|
454 | 451 | * @return bool |
455 | 452 | */ |
456 | 453 | function setProperty () { |
@@ -480,7 +477,7 @@ discard block |
||
480 | 477 | * @author Kjell-Inge Gustafsson <[email protected]> |
481 | 478 | * @since 2.4.10 - 2008-10-23 |
482 | 479 | * @param string $config |
483 | - * @return value |
|
480 | + * @return string |
|
484 | 481 | */ |
485 | 482 | function getConfig( $config ) { |
486 | 483 | switch( strtoupper( $config )) { |
@@ -701,7 +698,7 @@ discard block |
||
701 | 698 | * @since 2.4.10 - 2008-08-05 |
702 | 699 | * @param mixed $arg1 ordno / component type / component uid |
703 | 700 | * @param mixed $arg2 optional, ordno if arg1 = component type |
704 | - * @return void |
|
701 | + * @return boolean |
|
705 | 702 | */ |
706 | 703 | function deleteComponent( $arg1, $arg2=FALSE ) { |
707 | 704 | $argType = $index = null; |
@@ -1060,7 +1057,7 @@ discard block |
||
1060 | 1057 | * @param object $component calendar component |
1061 | 1058 | * @param mixed $arg1 optional, ordno/component type/ component uid |
1062 | 1059 | * @param mixed $arg2 optional, ordno if arg1 = component type |
1063 | - * @return void |
|
1060 | + * @return boolean |
|
1064 | 1061 | */ |
1065 | 1062 | function setComponent( $component, $arg1=FALSE, $arg2=FALSE ) { |
1066 | 1063 | if( '' >= $component->getConfig( 'language')) |
@@ -2309,7 +2306,7 @@ discard block |
||
2309 | 2306 | * @param int $min optional |
2310 | 2307 | * @param int $sec optional |
2311 | 2308 | * @param array $params optional |
2312 | - * @return TRUE |
|
2309 | + * @return boolean |
|
2313 | 2310 | */ |
2314 | 2311 | function setDtstamp( $year, $month=FALSE, $day=FALSE, $hour=FALSE, $min=FALSE, $sec=FALSE, $params=FALSE ) { |
2315 | 2312 | if( empty( $year )) |
@@ -2792,7 +2789,7 @@ discard block |
||
2792 | 2789 | * @param int $min optional |
2793 | 2790 | * @param int $sec optional |
2794 | 2791 | * @param array $params optional |
2795 | - * @return boll |
|
2792 | + * @return boolean |
|
2796 | 2793 | */ |
2797 | 2794 | function setLastModified( $year=FALSE, $month=FALSE, $day=FALSE, $hour=FALSE, $min=FALSE, $sec=FALSE, $params=FALSE ) { |
2798 | 2795 | if( empty( $year )) |
@@ -3213,7 +3210,6 @@ discard block |
||
3213 | 3210 | * |
3214 | 3211 | * @author Kjell-Inge Gustafsson <[email protected]> |
3215 | 3212 | * @since 2.5.1 - 2008-11-07 |
3216 | - * @param float $relid |
|
3217 | 3213 | * @param array $params, optional |
3218 | 3214 | * @param index $index, optional |
3219 | 3215 | * @return bool |
@@ -3251,7 +3247,7 @@ discard block |
||
3251 | 3247 | * @since 2.4.8 - 2008-11-04 |
3252 | 3248 | * @param string $value |
3253 | 3249 | * @param array $params optional |
3254 | - * @return void |
|
3250 | + * @return boolean |
|
3255 | 3251 | */ |
3256 | 3252 | function setRepeat( $value, $params=FALSE ) { |
3257 | 3253 | if( empty( $value )) if( $this->getConfig( 'allowEmpty' )) $value = null; else return FALSE; |
@@ -3374,7 +3370,7 @@ discard block |
||
3374 | 3370 | * @param array $rruleset |
3375 | 3371 | * @param array $params, optional |
3376 | 3372 | * @param integer $index, optional |
3377 | - * @return void |
|
3373 | + * @return boolean |
|
3378 | 3374 | */ |
3379 | 3375 | function setRrule( $rruleset, $params=FALSE, $index=FALSE ) { |
3380 | 3376 | if( empty( $rruleset )) if( $this->getConfig( 'allowEmpty' )) $rruleset = null; else return FALSE; |
@@ -3800,7 +3796,7 @@ discard block |
||
3800 | 3796 | * @since 2.4.8 - 2008-11-04 |
3801 | 3797 | * @param string $value |
3802 | 3798 | * @param string $params optional |
3803 | - * @return boll |
|
3799 | + * @return boolean |
|
3804 | 3800 | */ |
3805 | 3801 | function setTzurl( $value, $params=FALSE ) { |
3806 | 3802 | if( empty( $value )) if( $this->getConfig( 'allowEmpty' )) $value = null; else return FALSE; |
@@ -3929,7 +3925,7 @@ discard block |
||
3929 | 3925 | * @param string $label |
3930 | 3926 | * @param mixed $value |
3931 | 3927 | * @param array $params optional |
3932 | - * @return bool |
|
3928 | + * @return null|boolean |
|
3933 | 3929 | */ |
3934 | 3930 | function setXprop( $label, $value, $params=FALSE ) { |
3935 | 3931 | if( empty( $label )) return; |
@@ -4096,7 +4092,7 @@ discard block |
||
4096 | 4092 | * @author Kjell-Inge Gustafsson <[email protected]> |
4097 | 4093 | * @since 0.9.22 - 2007-04-10 |
4098 | 4094 | * @param array $params optional |
4099 | - * @param array $ctrKeys optional |
|
4095 | + * @param string[] $ctrKeys optional |
|
4100 | 4096 | * @return string |
4101 | 4097 | */ |
4102 | 4098 | function _createParams( $params=array(), $ctrKeys=array() ) { |
@@ -4138,7 +4134,6 @@ discard block |
||
4138 | 4134 | * |
4139 | 4135 | * @author Kjell-Inge Gustafsson <[email protected]> |
4140 | 4136 | * @since 2.4.16 - 2008-10-25 |
4141 | - * @param array $date, date to check |
|
4142 | 4137 | * @param int $parno, no of date parts (i.e. year, month.. .) |
4143 | 4138 | * @return array $params, property parameters |
4144 | 4139 | */ |
@@ -4194,7 +4189,6 @@ discard block |
||
4194 | 4189 | * @author Kjell-Inge Gustafsson <[email protected]> |
4195 | 4190 | * @since 2.2.11 - 2007-11-03 |
4196 | 4191 | * @param array $startdate, optional |
4197 | - * @param array $duration, optional |
|
4198 | 4192 | * @return array duration |
4199 | 4193 | */ |
4200 | 4194 | function _date2duration( $startdate=FALSE, $enddate=FALSE ) { |
@@ -4228,7 +4222,7 @@ discard block |
||
4228 | 4222 | * @since 2.4.8 - 2008-10-30 |
4229 | 4223 | * @param array $datetime datetime/(date) |
4230 | 4224 | * @param string $tz timezone |
4231 | - * @return timestamp |
|
4225 | + * @return integer |
|
4232 | 4226 | */ |
4233 | 4227 | function _date2timestamp( $datetime, $tz=null ) { |
4234 | 4228 | $output = null; |
@@ -4541,6 +4535,7 @@ discard block |
||
4541 | 4535 | * @param int $hitVal optional, return value if found |
4542 | 4536 | * @param int $elseVal optional, return value if not found |
4543 | 4537 | * @param int $preSet optional, return value if already preset |
4538 | + * @param string $expkey |
|
4544 | 4539 | * @return int |
4545 | 4540 | */ |
4546 | 4541 | function _existRem( &$array, $expkey, $expval=FALSE, $hitVal=null, $elseVal=null, $preSet=null ) { |
@@ -4650,7 +4645,7 @@ discard block |
||
4650 | 4645 | * |
4651 | 4646 | * @author Kjell-Inge Gustafsson <[email protected]> |
4652 | 4647 | * @since 2.4.8 - 2008-10-22 |
4653 | - * @param array $recurlabel |
|
4648 | + * @param string $recurlabel |
|
4654 | 4649 | * @param array $recurdata |
4655 | 4650 | * @return string |
4656 | 4651 | */ |
@@ -5196,6 +5191,10 @@ discard block |
||
5196 | 5191 | else |
5197 | 5192 | return FALSE; |
5198 | 5193 | } |
5194 | + |
|
5195 | + /** |
|
5196 | + * @param integer $wkst |
|
5197 | + */ |
|
5199 | 5198 | function _recurIntervalIx( $freq, $date, $wkst ) { |
5200 | 5199 | /* create interval index */ |
5201 | 5200 | switch( $freq ) { |
@@ -5504,7 +5503,6 @@ discard block |
||
5504 | 5503 | * |
5505 | 5504 | * @author Kjell-Inge Gustafsson <[email protected]> |
5506 | 5505 | * @since 2.4.16 - 2008-10-19 |
5507 | - * @param string $offset |
|
5508 | 5506 | * @return integer |
5509 | 5507 | */ |
5510 | 5508 | function _tz2offset( $tz ) { |
@@ -5966,8 +5964,8 @@ discard block |
||
5966 | 5964 | * @since 2.5.1 - 2008-11-02 |
5967 | 5965 | * @param string $propName, optional |
5968 | 5966 | * @param int @propix, optional, if specific property is wanted in case of multiply occurences |
5969 | - * @param bool $inclParam=FALSE |
|
5970 | - * @param bool $specform=FALSE |
|
5967 | + * @param bool $inclParam |
|
5968 | + * @param bool $specform |
|
5971 | 5969 | * @return mixed |
5972 | 5970 | */ |
5973 | 5971 | function getProperty( $propName=FALSE, $propix=FALSE, $inclParam=FALSE, $specform=FALSE ) { |
@@ -6160,9 +6158,6 @@ discard block |
||
6160 | 6158 | * |
6161 | 6159 | * @author Kjell-Inge Gustafsson <[email protected]> |
6162 | 6160 | * @since 2.5.1 - 2008-11-05 |
6163 | - * @param mixed $args variable number of function arguments, |
|
6164 | - * first argument is ALWAYS component name, |
|
6165 | - * second ALWAYS component value! |
|
6166 | 6161 | * @return void |
6167 | 6162 | */ |
6168 | 6163 | function setProperty() { |
@@ -6276,7 +6271,7 @@ discard block |
||
6276 | 6271 | * @author Kjell-Inge Gustafsson <[email protected]> |
6277 | 6272 | * @since 2.5.2 - 2008-10-23 |
6278 | 6273 | * @param mixed $unparsedtext, optional, strict rfc2445 formatted, single property string or array of property strings |
6279 | - * @return bool FALSE if error occurs during parsing |
|
6274 | + * @return boolean|null FALSE if error occurs during parsing |
|
6280 | 6275 | * |
6281 | 6276 | */ |
6282 | 6277 | function parse( $unparsedtext=null ) { |
@@ -6578,7 +6573,7 @@ discard block |
||
6578 | 6573 | * @since 2.5.1 - 2008-10-15 |
6579 | 6574 | * @param mixed $arg1 ordno / component type / component uid |
6580 | 6575 | * @param mixed $arg2 optional, ordno if arg1 = component type |
6581 | - * @return void |
|
6576 | + * @return boolean |
|
6582 | 6577 | */ |
6583 | 6578 | function deleteComponent( $arg1, $arg2=FALSE ) { |
6584 | 6579 | if( !isset( $this->components )) return FALSE; |
@@ -6781,7 +6776,7 @@ discard block |
||
6781 | 6776 | * |
6782 | 6777 | * @author Kjell-Inge Gustafsson <[email protected]> |
6783 | 6778 | * @since 2.2.8 - 2006-09-03 |
6784 | - * @param string $value |
|
6779 | + * @param string $string |
|
6785 | 6780 | * @return string |
6786 | 6781 | */ |
6787 | 6782 | function _size75( $string ) { |
@@ -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') |