Completed
Pull Request — master (#1909)
by Ilia
38:06 queued 19:44
created
mod/cp_notifications/start.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
  * @param mixed  $value   The current value of the plugin hook
133 133
  * @param mixed  $params  Data passed from the trigger
134 134
  *
135
- * @return mixed if not null, this will be the new value of the plugin hook
135
+ * @return boolean if not null, this will be the new value of the plugin hook
136 136
  */
137 137
 function minor_save_hook_handler($hook, $type, $value, $params) {
138 138
 
@@ -620,7 +620,6 @@  discard block
 block discarded – undo
620 620
 /**
621 621
  * returns the headers for ical
622 622
  *
623
- * @param string 		$type_event
624 623
  * @param ElggObject 	$event
625 624
  * @param string 		$start_date
626 625
  * @param string 		$end_date
@@ -1486,6 +1485,9 @@  discard block
 block discarded – undo
1486 1485
 }
1487 1486
 
1488 1487
 
1488
+/**
1489
+ * @param string $error_message
1490
+ */
1489 1491
 function notification_logging($error_message) {
1490 1492
 	// logging mechanism
1491 1493
 	if (elgg_is_active_plugin('wet4')) {
@@ -1536,8 +1538,6 @@  discard block
 block discarded – undo
1536 1538
  * run crontab, retrieve users, send digest, reset timer (update timestamp)
1537 1539
  *
1538 1540
  * @param string $hook    The name of the plugin hook
1539
- * @param string $type    The type of the plugin hook
1540
- * @param mixed  $value   The current value of the plugin hook
1541 1541
  * @param mixed  $params  Data passed from the trigger
1542 1542
  */
1543 1543
 function cp_digest_weekly_cron_handler($hook, $entity_type, $return_value, $params) {
@@ -1580,6 +1580,7 @@  discard block
 block discarded – undo
1580 1580
  * @param string $entity_type    The type of the plugin hook
1581 1581
  * @param mixed  $return_value   The current value of the plugin hook
1582 1582
  * @param mixed  $params  Data passed from the trigger
1583
+ * @param string $cron_freq
1583 1584
  */
1584 1585
 function cp_digest_email_handler($hook, $entity_type, $return_value, $params, $cron_freq) {
1585 1586
 	$dbprefix = elgg_get_config('dbprefix');
@@ -1771,7 +1772,6 @@  discard block
 block discarded – undo
1771 1772
  *
1772 1773
  * @param string $hook    The name of the plugin hook
1773 1774
  * @param string $type    The type of the plugin hook
1774
- * @param mixed  $value   The current value of the plugin hook
1775 1775
  * @param mixed  $params  Data passed from the trigger
1776 1776
  */
1777 1777
 function cpn_email_handler_hook($hook, $type, $notification, $params) {
@@ -1785,7 +1785,6 @@  discard block
 block discarded – undo
1785 1785
  *
1786 1786
  * @param string $hook    The name of the plugin hook
1787 1787
  * @param string $type    The type of the plugin hook
1788
- * @param mixed  $value   The current value of the plugin hook
1789 1788
  * @param mixed  $params  Data passed from the trigger
1790 1789
  *
1791 1790
  * @return mixed if not null, this will be the new value of the plugin hook
Please login to merge, or discard this patch.
mod/cp_notifications/lib/functions.php 1 patch
Doc Comments   +9 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,7 @@  discard block
 block discarded – undo
6 6
  * @param integer 	$entity_guid_static
7 7
  * @param integer 	$entity_guid
8 8
  *
9
+ * @return integer
9 10
  */
10 11
 function get_forum_in_group($entity_guid_static, $entity_guid) {
11 12
 	$entity = get_entity($entity_guid);
@@ -159,7 +160,7 @@  discard block
 block discarded – undo
159 160
  * @param ElggEntity 	$entity
160 161
  * @param ElggUser 		$send_to
161 162
  * @param string 		$entity_url (default value empty)
162
- * @return Success 		true/false
163
+ * @return boolean 		true/false
163 164
  */
164 165
 function create_digest($invoked_by, $subtype, $entity, $send_to, $entity_url = '') {
165 166
 
@@ -945,6 +946,7 @@  discard block
 block discarded – undo
945 946
 
946 947
 /**
947 948
  * Helper functions for digest processing queue
949
+ * @param integer $user_guid
948 950
  */
949 951
 function enqueue( $user_guid ) {
950 952
 	// add to queue
@@ -964,6 +966,9 @@  discard block
 block discarded – undo
964 966
  * to get closer to 'exactly once', the digest function can enqueue failed attempts
965 967
  * NOTE: this won't work so well with a split read-write db setup, will likely need to be done without using elgg db functions
966 968
  */
969
+/**
970
+ * @return integer
971
+ */
967 972
 function dequeue() {
968 973
 	$query_init = "SET @uid := NULL";	// mostly for termination
969 974
 	$query_delete = "DELETE FROM notification_digest_queue WHERE user_guid = @uid := user_guid LIMIT 1";			// remove a row from queue and prepare the guid to be returned
@@ -980,6 +985,9 @@  discard block
 block discarded – undo
980 985
 	return enqueue(0) == 0;		// there is no user with guid = 0, but only one instance will successfuly insert this with user_guid being the primary key
981 986
 }
982 987
 
988
+/**
989
+ * @param string $frequency
990
+ */
983 991
 function initialize_queue( $frequency ){
984 992
 	$dbprefix = elgg_get_config('dbprefix');
985 993
 
Please login to merge, or discard this patch.