@@ -724,6 +724,9 @@ |
||
| 724 | 724 | $this->message = $this->StripSlashes($_POST['message']); |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | + /** |
|
| 728 | + * @param string $error |
|
| 729 | + */ |
|
| 727 | 730 | function add_error($error) |
| 728 | 731 | { |
| 729 | 732 | array_push($this->errors,$error); |
@@ -724,6 +724,9 @@ |
||
| 724 | 724 | $this->message = $this->StripSlashes($_POST['message']); |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | + /** |
|
| 728 | + * @param string $error |
|
| 729 | + */ |
|
| 727 | 730 | function add_error($error) |
| 728 | 731 | { |
| 729 | 732 | array_push($this->errors,$error); |
@@ -41,6 +41,9 @@ discard block |
||
| 41 | 41 | * Wes7ley |
| 42 | 42 | * Wesley9 |
| 43 | 43 | */ |
| 44 | +/** |
|
| 45 | + * @param string $name |
|
| 46 | + */ |
|
| 44 | 47 | function mm_is_valid_person_name($name) |
| 45 | 48 | { |
| 46 | 49 | $regex = "/^[^0-9]+$/"; |
@@ -57,6 +60,9 @@ discard block |
||
| 57 | 60 | * 532K351 |
| 58 | 61 | * @578(532) |
| 59 | 62 | */ |
| 63 | +/** |
|
| 64 | + * @param string $num |
|
| 65 | + */ |
|
| 60 | 66 | function mm_is_guid_number($num) |
| 61 | 67 | { |
| 62 | 68 | $regex = "/^[0-9]*$/"; |
@@ -110,6 +116,9 @@ discard block |
||
| 110 | 116 | * Tests a the start time and duration of the given day of the week. |
| 111 | 117 | * Also defaults the minutes to '00' if the hour is set and the minute value is null. |
| 112 | 118 | */ |
| 119 | +/** |
|
| 120 | + * @param string $day |
|
| 121 | + */ |
|
| 113 | 122 | function mm_validate_time($day, $input_array) |
| 114 | 123 | { |
| 115 | 124 | /*$start_hour = $input_array[$day . '_start_hour']; |
@@ -43,6 +43,9 @@ |
||
| 43 | 43 | /** @var string The version vector. */ |
| 44 | 44 | private $version = ''; |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $version |
|
| 48 | + */ |
|
| 46 | 49 | public function __construct($version = null, Description $description = null) |
| 47 | 50 | { |
| 48 | 51 | Assert::nullOrStringNotEmpty($version); |
@@ -43,6 +43,9 @@ |
||
| 43 | 43 | /** @var string The version vector. */ |
| 44 | 44 | private $version = ''; |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $version |
|
| 48 | + */ |
|
| 46 | 49 | public function __construct($version = null, Description $description = null) |
| 47 | 50 | { |
| 48 | 51 | Assert::nullOrStringNotEmpty($version); |
@@ -10,6 +10,12 @@ discard block |
||
| 10 | 10 | /* |
| 11 | 11 | * Packs the language variables for a single language into a single string. |
| 12 | 12 | */ |
| 13 | +/** |
|
| 14 | + * @param string|null $lwc |
|
| 15 | + * @param string|null $lwe |
|
| 16 | + * @param string|null $lop |
|
| 17 | + * @param string|null $lang |
|
| 18 | + */ |
|
| 13 | 19 | function mm_pack_language($lwc, $lwe, $lop, $lang) |
| 14 | 20 | { |
| 15 | 21 | $returner = ''; |
@@ -41,6 +47,9 @@ discard block |
||
| 41 | 47 | /* |
| 42 | 48 | * Unpacks a language string into an array of its component variable. |
| 43 | 49 | */ |
| 50 | +/** |
|
| 51 | + * @param string|null $lang |
|
| 52 | + */ |
|
| 44 | 53 | function mm_unpack_language($data_string, $lang) |
| 45 | 54 | { |
| 46 | 55 | $returner = array(); |
@@ -71,6 +80,11 @@ discard block |
||
| 71 | 80 | /* |
| 72 | 81 | * Packs the time (hour and minute) into a single string. |
| 73 | 82 | */ |
| 83 | +/** |
|
| 84 | + * @param string|null $hour |
|
| 85 | + * @param string|null $min |
|
| 86 | + * @param string|null $day |
|
| 87 | + */ |
|
| 74 | 88 | function mm_pack_time($hour, $min, $day) |
| 75 | 89 | { |
| 76 | 90 | $returner = ''; |
@@ -95,6 +109,9 @@ discard block |
||
| 95 | 109 | /* |
| 96 | 110 | * Unpacks the time into an array of hour and minute. |
| 97 | 111 | */ |
| 112 | +/** |
|
| 113 | + * @param string|null $day |
|
| 114 | + */ |
|
| 98 | 115 | function mm_unpack_time($data_string, $day) |
| 99 | 116 | { |
| 100 | 117 | $returner = array(); |
@@ -429,6 +446,9 @@ discard block |
||
| 429 | 446 | * Notify user function which uses messages_send() to send on site notifications and mail() to send e-mail. |
| 430 | 447 | * This is here because notify_user() is currently not working. |
| 431 | 448 | */ |
| 449 | +/** |
|
| 450 | + * @param string $body |
|
| 451 | + */ |
|
| 432 | 452 | function mm_notify_user($recipient, $sender, $subject, $body) { |
| 433 | 453 | //notify_user($recipient, $sender, $subject, $body, array(), 'email'); |
| 434 | 454 | |
@@ -558,6 +578,9 @@ discard block |
||
| 558 | 578 | /* |
| 559 | 579 | * Returns an accept button to a user who has received an offer if the mission is not full. |
| 560 | 580 | */ |
| 581 | +/** |
|
| 582 | + * @param ElggUser|null $applicant |
|
| 583 | + */ |
|
| 561 | 584 | function mm_finalize_button($mission, $applicant) { |
| 562 | 585 | $relationship_count = elgg_get_entities_from_relationship(array( |
| 563 | 586 | 'relationship' => 'mission_accepted', |
@@ -723,6 +746,9 @@ discard block |
||
| 723 | 746 | /* |
| 724 | 747 | * Check if the user is opted in to any of the opt-in options. |
| 725 | 748 | */ |
| 749 | +/** |
|
| 750 | + * @param ElggEntity|null $current_user |
|
| 751 | + */ |
|
| 726 | 752 | function check_if_opted_in($current_user) { |
| 727 | 753 | //Nick - adding additional checks for other opportunity types |
| 728 | 754 | if($current_user->opt_in_missions == 'gcconnex_profile:opt:yes') { |
@@ -13,6 +13,9 @@ |
||
| 13 | 13 | private $before = null; |
| 14 | 14 | private $limit = null; |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param string $object_type |
|
| 18 | + */ |
|
| 16 | 19 | public function __construct( |
| 17 | 20 | $object_type, |
| 18 | 21 | $subtype = false, |
@@ -41,6 +41,9 @@ discard block |
||
| 41 | 41 | * Wes7ley |
| 42 | 42 | * Wesley9 |
| 43 | 43 | */ |
| 44 | +/** |
|
| 45 | + * @param string $name |
|
| 46 | + */ |
|
| 44 | 47 | function mm_is_valid_person_name($name) |
| 45 | 48 | { |
| 46 | 49 | $regex = "/^[^0-9]+$/"; |
@@ -57,6 +60,9 @@ discard block |
||
| 57 | 60 | * 532K351 |
| 58 | 61 | * @578(532) |
| 59 | 62 | */ |
| 63 | +/** |
|
| 64 | + * @param string $num |
|
| 65 | + */ |
|
| 60 | 66 | function mm_is_guid_number($num) |
| 61 | 67 | { |
| 62 | 68 | $regex = "/^[0-9]*$/"; |
@@ -112,6 +118,9 @@ discard block |
||
| 112 | 118 | * Tests a the start time and duration of the given day of the week. |
| 113 | 119 | * Also defaults the minutes to '00' if the hour is set and the minute value is null. |
| 114 | 120 | */ |
| 121 | +/** |
|
| 122 | + * @param string $day |
|
| 123 | + */ |
|
| 115 | 124 | function mm_validate_time($day, $input_array) |
| 116 | 125 | { |
| 117 | 126 | $err = ''; |
@@ -10,6 +10,12 @@ discard block |
||
| 10 | 10 | /* |
| 11 | 11 | * Packs the language variables for a single language into a single string. |
| 12 | 12 | */ |
| 13 | +/** |
|
| 14 | + * @param string|null $lwc |
|
| 15 | + * @param string|null $lwe |
|
| 16 | + * @param string|null $lop |
|
| 17 | + * @param string|null $lang |
|
| 18 | + */ |
|
| 13 | 19 | function mm_pack_language($lwc, $lwe, $lop, $lang) |
| 14 | 20 | { |
| 15 | 21 | $returner = ''; |
@@ -41,6 +47,9 @@ discard block |
||
| 41 | 47 | /* |
| 42 | 48 | * Unpacks a language string into an array of its component variable. |
| 43 | 49 | */ |
| 50 | +/** |
|
| 51 | + * @param string|null $lang |
|
| 52 | + */ |
|
| 44 | 53 | function mm_unpack_language($data_string, $lang) |
| 45 | 54 | { |
| 46 | 55 | $returner = array(); |
@@ -71,6 +80,11 @@ discard block |
||
| 71 | 80 | /* |
| 72 | 81 | * Packs the time (hour and minute) into a single string. |
| 73 | 82 | */ |
| 83 | +/** |
|
| 84 | + * @param string|null $hour |
|
| 85 | + * @param string|null $min |
|
| 86 | + * @param string|null $day |
|
| 87 | + */ |
|
| 74 | 88 | function mm_pack_time($hour, $min, $day) |
| 75 | 89 | { |
| 76 | 90 | $returner = ''; |
@@ -95,6 +109,9 @@ discard block |
||
| 95 | 109 | /* |
| 96 | 110 | * Unpacks the time into an array of hour and minute. |
| 97 | 111 | */ |
| 112 | +/** |
|
| 113 | + * @param string|null $day |
|
| 114 | + */ |
|
| 98 | 115 | function mm_unpack_time($data_string, $day) |
| 99 | 116 | { |
| 100 | 117 | $returner = array(); |
@@ -427,6 +444,10 @@ discard block |
||
| 427 | 444 | * Notify user function which uses messages_send() to send on site notifications and mail() to send e-mail. |
| 428 | 445 | * This is here because notify_user() is currently not working. |
| 429 | 446 | */ |
| 447 | +/** |
|
| 448 | + * @param string $title_en |
|
| 449 | + * @param string $title_fr |
|
| 450 | + */ |
|
| 430 | 451 | function mm_notify_user($recipient, $sender, $subject, $title_en, $title_fr, $body_en, $body_fr) |
| 431 | 452 | { |
| 432 | 453 | $recipient_entity = get_entity($recipient); |
@@ -611,6 +632,9 @@ discard block |
||
| 611 | 632 | /* |
| 612 | 633 | * Returns an accept button to a user who has received an offer if the mission is not full. |
| 613 | 634 | */ |
| 635 | +/** |
|
| 636 | + * @param ElggUser|null $applicant |
|
| 637 | + */ |
|
| 614 | 638 | function mm_finalize_button($mission, $applicant) |
| 615 | 639 | { |
| 616 | 640 | $relationship_count = elgg_get_entities_from_relationship(array( |
@@ -780,6 +804,9 @@ discard block |
||
| 780 | 804 | /* |
| 781 | 805 | * Check if the user is opted in to any of the opt-in options. |
| 782 | 806 | */ |
| 807 | +/** |
|
| 808 | + * @param ElggEntity|null $current_user |
|
| 809 | + */ |
|
| 783 | 810 | function check_if_opted_in($current_user) |
| 784 | 811 | { |
| 785 | 812 | //Nick - adding additional checks for other opportunity types |