Typos, simplify if statement
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 5 Dec 2018 18:10:12 +0000 (18:10 +0000)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 5 Dec 2018 18:11:45 +0000 (18:11 +0000)
CRM/Dedupe/Finder.php
CRM/Event/Form/Registration/Confirm.php

index 1929b9e38b83ae68dc73614456c41cdf9bee9126..2819819adf7ceb92064373ec88e8538fd11fe2f9 100644 (file)
@@ -97,7 +97,7 @@ class CRM_Dedupe_Finder {
    *
    * check_permission is a boolean flag to indicate if permission should be considered.
    * default is to always check permissioning but public pages for example might not want
-   * permission to be checked for anonymous users. Refer CRM-6211. We might be beaking
+   * permission to be checked for anonymous users. Refer CRM-6211. We might be breaking
    * Multi-Site dedupe for public pages.
    *
    * @param array $params
index 29b5c5a2795101aee1807f226db7061e0661074c..04fd0addd37b29fdcc62e777c33e4c4ad214b860 100644 (file)
@@ -547,13 +547,12 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
           $value['participant_status_id'] = $value['participant_status'] = array_search('Awaiting approval', $waitingStatuses);
         }
 
-        //there might be case user seleted pay later and
+        //there might be case user selected pay later and
         //now becomes part of run time waiting list.
         $value['is_pay_later'] = FALSE;
       }
-
-      // required only if paid event
-      if ($this->_values['event']['is_monetary'] && !($this->_allowWaitlist || $this->_requireApproval)) {
+      elseif ($this->_values['event']['is_monetary']) {
+        // required only if paid event
         if (is_array($this->_paymentProcessor)) {
           $payment = $this->_paymentProcessor['object'];
         }
@@ -799,7 +798,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
                 if ($participantNum === NULL) {
                   break;
                 }
-                //unset current particpant so we don't check them again
+                //unset current participant so we don't check them again
                 unset($copyParticipantCountLines[$participantNum]);
               }
             }
@@ -832,7 +831,6 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
 
           // call postprocess hook before leaving
           $this->postProcessHook();
-          // this does not return
 
           $this->processPayment($payment, $primaryParticipant);
         }
@@ -850,14 +848,14 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
         NULL, $primaryContactId, $isTest,
         TRUE
       );
-      //lets send  mails to all with meaningful text, CRM-4320.
+      //let's send mails to all with meaningful text, CRM-4320.
       $this->assign('isOnWaitlist', $this->_allowWaitlist);
       $this->assign('isRequireApproval', $this->_requireApproval);
 
       //need to copy, since we are unsetting on the way.
       $copyParticipantCount = $participantCount;
 
-      //lets carry all paticipant params w/ values.
+      //let's carry all participant params w/ values.
       foreach ($additionalIDs as $participantID => $contactId) {
         $participantNum = NULL;
         if ($participantID == $registerByID) {
@@ -952,8 +950,10 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
    * @param int $contactID
    * @param bool $pending
    * @param bool $isAdditionalAmount
+   * @param array $paymentProcessor
    *
    * @return \CRM_Contribute_BAO_Contribution
+   * @throws \CRM_Core_Exception
    */
   public static function processContribution(
     &$form, $params, $result, $contactID,