Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/307646

Change subject: Fix dumb omitted return statement
......................................................................

Fix dumb omitted return statement

And add comment.

Change-Id: Ic4a52199ebd58735f428c4191264a506927a5e37
---
M CrmLink/Messages/DonationInterfaceMessage.php
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/46/307646/1

diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index aee02d3..2dbb3be 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -3,7 +3,7 @@
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
 
 /**
- * Message sent to the 'cc-limbo' queue when a payment has been initiated and 
sent off to the gateway.
+ * Message sent to the pending queue when a payment has been initiated and 
sent off to the gateway.
  */
 class DonationInterfaceMessage extends KeyedOpaqueStorableObject {
        public $captured = '';
@@ -38,13 +38,20 @@
        public $utm_medium = '';
        public $utm_source = '';
 
+       /**
+        * @param array $values
+        * @return DonationInterfaceMessage
+        */
        public static function fromValues( $values = array() ) {
                $message = new DonationInterfaceMessage();
                foreach ( $values as $key => $value ) {
+                       // If we're creating this from a database row with some 
extra
+                       // info such as the pending_id, only include the real 
properties
                        if( property_exists( 'DonationInterfaceMessage', $key ) 
) {
                                $message->$key = $value;
                        }
                }
                $message->correlationId = 
"{$message->gateway}-{$message->order_id}";
+               return $message;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/307646
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4a52199ebd58735f428c4191264a506927a5e37
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to