Passed
Push — distributed_digests ( 63d323...74ebac )
by Ilia
19:46
created
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.