(NFC) Update CRM/Event folder for the new coder style
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Apr 2019 02:49:09 +0000 (12:49 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Apr 2019 19:58:02 +0000 (05:58 +1000)
58 files changed:
CRM/Event/BAO/Event.php
CRM/Event/BAO/Participant.php
CRM/Event/BAO/ParticipantPayment.php
CRM/Event/BAO/ParticipantStatusType.php
CRM/Event/BAO/Query.php
CRM/Event/Badge.php
CRM/Event/Badge/Logo.php
CRM/Event/Badge/Logo5395.php
CRM/Event/Badge/NameTent.php
CRM/Event/Cart/BAO/Cart.php
CRM/Event/Cart/BAO/Conference.php
CRM/Event/Cart/BAO/EventInCart.php
CRM/Event/Cart/Controller/Checkout.php
CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php
CRM/Event/Cart/Form/MerParticipant.php
CRM/Event/Cart/Page/AddToCart.php
CRM/Event/Cart/Page/CheckoutAJAX.php
CRM/Event/Cart/Page/RemoveFromCart.php
CRM/Event/Cart/Page/ViewCart.php
CRM/Event/Cart/StateMachine/Checkout.php
CRM/Event/Form/EventFees.php
CRM/Event/Form/ManageEvent.php
CRM/Event/Form/ManageEvent/Conference.php
CRM/Event/Form/ManageEvent/EventInfo.php
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/ManageEvent/Location.php
CRM/Event/Form/ManageEvent/Registration.php
CRM/Event/Form/ManageEvent/Repeat.php
CRM/Event/Form/Participant.php
CRM/Event/Form/ParticipantView.php
CRM/Event/Form/Registration.php
CRM/Event/Form/Registration/AdditionalParticipant.php
CRM/Event/Form/Registration/Confirm.php
CRM/Event/Form/Registration/ParticipantConfirm.php
CRM/Event/Form/Registration/Register.php
CRM/Event/Form/Search.php
CRM/Event/Form/SelfSvcTransfer.php
CRM/Event/Form/SelfSvcUpdate.php
CRM/Event/Form/Task.php
CRM/Event/Form/Task/AddToGroup.php
CRM/Event/Form/Task/Badge.php
CRM/Event/Form/Task/Batch.php
CRM/Event/Form/Task/Cancel.php
CRM/Event/Form/Task/ParticipantStatus.php
CRM/Event/Form/Task/PickProfile.php
CRM/Event/Form/Task/Print.php
CRM/Event/Form/Task/SearchTaskHookSample.php
CRM/Event/Import/Field.php
CRM/Event/Import/Form/MapField.php
CRM/Event/Import/Parser.php
CRM/Event/Import/Parser/Participant.php
CRM/Event/Info.php
CRM/Event/Page/ManageEvent.php
CRM/Event/Page/ParticipantListing/Name.php
CRM/Event/Page/ParticipantListing/NameAndEmail.php
CRM/Event/Selector/Search.php
CRM/Event/Task.php
CRM/Event/Tokens.php

index 5a18b77c775aaee7c219e7e6af9e41e338bc02dd..518bc9bd0bb325e78c6398865ef82a0e251f563f 100644 (file)
@@ -920,7 +920,7 @@ WHERE civicrm_event.is_active = 1
    * @param int $id
    *   The event id to copy.
    *        boolean $afterCreate call to copy after the create function
-   *
+   * @param array $params
    * @return CRM_Event_DAO_Event
    * @throws \CRM_Core_Exception
    */
@@ -1183,10 +1183,10 @@ WHERE civicrm_event.is_active = 1
           'participantID' => $participantId,
           'conference_sessions' => $sessions,
           'credit_card_number' =>
-            CRM_Utils_System::mungeCreditCard(
+          CRM_Utils_System::mungeCreditCard(
               CRM_Utils_Array::value('credit_card_number', $participantParams)),
           'credit_card_exp_date' =>
-            CRM_Utils_Date::mysqlToIso(
+          CRM_Utils_Date::mysqlToIso(
               CRM_Utils_Date::format(
                 CRM_Utils_Array::value('credit_card_exp_date', $participantParams))),
         ]);
@@ -1587,13 +1587,13 @@ WHERE civicrm_event.is_active = 1
           }
           $values[$index] = implode(', ', $title);
         }
-        elseif ('participant_role_id' == $name OR
+        elseif ('participant_role_id' == $name or
           'participant_role' == $name
         ) {
           $roles = CRM_Event_PseudoConstant::participantRole();
           $values[$index] = $roles[$params[$name]];
         }
-        elseif ('participant_status_id' == $name OR
+        elseif ('participant_status_id' == $name or
           'participant_status' == $name
         ) {
           $status = CRM_Event_PseudoConstant::participantStatus();
@@ -1976,6 +1976,7 @@ WHERE  ce.loc_block_id = $locBlockId";
    * @return boolean
    *   true if allow registration otherwise false
    */
+
   /**
    * @param $values
    *
@@ -2013,6 +2014,7 @@ WHERE  ce.loc_block_id = $locBlockId";
    *   Key/value participant info.
    * @return boolean
    */
+
   /**
    * @param array $params
    *
index bb6f75f06dc7ed87bef54f0f77d71601c15df70f..db4bf4f7c2c1f8c57c3b2e192cea16dc7a995ee2 100644 (file)
@@ -37,21 +37,21 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
    *
    * @var array
    */
-  static $_importableFields = NULL;
+  public static $_importableFields = NULL;
 
   /**
    * Static field for all the participant information that we can potentially export.
    *
    * @var array
    */
-  static $_exportableFields = NULL;
+  public static $_exportableFields = NULL;
 
   /**
    * Static array for valid status transitions rules.
    *
    * @var array
    */
-  static $_statusTransitionsRules = [
+  public static $_statusTransitionsRules = [
     'Pending from pay later' => ['Registered', 'Cancelled'],
     'Pending from incomplete transaction' => ['Registered', 'Cancelled'],
     'On waitlist' => ['Cancelled', 'Pending from waitlist'],
@@ -238,9 +238,9 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
     $noteValue = NULL;
     $hasNoteField = FALSE;
     foreach ([
-               'note',
-               'participant_note',
-             ] as $noteFld) {
+      'note',
+      'participant_note',
+    ] as $noteFld) {
       if (array_key_exists($noteFld, $params)) {
         $noteValue = $params[$noteFld];
         $hasNoteField = TRUE;
@@ -1669,8 +1669,8 @@ UPDATE  civicrm_participant
     if (is_string($emptySeats) && $emptySeats !== NULL) {
       $maxParticipants = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $eventId, 'max_participants');
       $eventfullMsg = ts("This event currently has the maximum number of participants registered (%1). However, you can still override this limit and register additional participants using this form.", [
-          1 => $maxParticipants,
-        ]) . '<br />';
+        1 => $maxParticipants,
+      ]) . '<br />';
     }
 
     $hasWaiting = FALSE;
index a3383bfcadb88a00fedc956dea79ae1b6ed7ac2a..cb12a2ddc1d6a78d85a7d67c1d6938c2df0ab64a 100644 (file)
@@ -80,19 +80,19 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
     //generally if people are creating participant_payments via the api they won't be setting the line item correctly - we can't help them if they are doing complex transactions
     // but if they have a single line item for the contribution we can assume it should refer to the participant line
     $lineItemCount = CRM_Core_DAO::singleValueQuery("select count(*) FROM civicrm_line_item WHERE contribution_id = %1", [
-        1 => [
-          $participantPayment->contribution_id,
-          'Integer',
-        ],
-      ]);
+      1 => [
+        $participantPayment->contribution_id,
+        'Integer',
+      ],
+    ]);
     if ($lineItemCount == 1) {
       $sql = "UPDATE civicrm_line_item li
       SET entity_table = 'civicrm_participant', entity_id = %1
       WHERE contribution_id = %2 AND entity_table = 'civicrm_contribution'";
       CRM_Core_DAO::executeQuery($sql, [
-          1 => [$participantPayment->participant_id, 'Integer'],
-          2 => [$participantPayment->contribution_id, 'Integer'],
-        ]);
+        1 => [$participantPayment->participant_id, 'Integer'],
+        2 => [$participantPayment->contribution_id, 'Integer'],
+      ]);
     }
 
     return $participantPayment;
index b04b0fa1f82aa6f788e7de9e63255d66c8ce774b..a897d21cc34f31ca3ae819e4f43437d496353944 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatusType {
+
   /**
    * @param array $params
    *
index 5f7a1ecf78516549626e65bfe9b588fa15a5893b..5f8e8bf00023d7db07332b00f047e3c71381f5e1 100644 (file)
@@ -226,7 +226,6 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query {
     }
   }
 
-
   /**
    * @param $query
    */
@@ -384,8 +383,7 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query {
           'participant_is_pay_later',
           'participant_campaign_id',
           'participant_registered_by_id',
-        ])
-        ) {
+        ])) {
           $name = str_replace('participant_', '', $name);
           if ($name == 'is_pay_later') {
             $qillName = $name;
@@ -449,12 +447,10 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query {
       case 'event_title':
         $qillName = $name;
         if (in_array($name, [
-            'event_id',
-            'event_title',
-            'event_is_public',
-          ]
-        )
-        ) {
+          'event_id',
+          'event_title',
+          'event_is_public',
+        ])) {
           $name = str_replace('event_', '', $name);
         }
         $dataType = !empty($fields[$qillName]['type']) ? CRM_Utils_Type::typeToString($fields[$qillName]['type']) : 'String';
@@ -590,21 +586,19 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query {
     $form->assign('dataURLEventFee', $dataURLEventFee);
 
     $form->addEntityRef('event_id', ts('Event Name'), [
-        'entity' => 'Event',
-        'placeholder' => ts('- any -'),
-        'multiple' => 1,
-        'select' => ['minimumInputLength' => 0],
-      ]
-    );
+      'entity' => 'Event',
+      'placeholder' => ts('- any -'),
+      'multiple' => 1,
+      'select' => ['minimumInputLength' => 0],
+    ]);
     $form->addEntityRef('event_type_id', ts('Event Type'), [
-        'entity' => 'OptionValue',
-        'placeholder' => ts('- any -'),
-        'select' => ['minimumInputLength' => 0],
-        'api' => [
-          'params' => ['option_group_id' => 'event_type'],
-        ],
-      ]
-    );
+      'entity' => 'OptionValue',
+      'placeholder' => ts('- any -'),
+      'select' => ['minimumInputLength' => 0],
+      'api' => [
+        'params' => ['option_group_id' => 'event_type'],
+      ],
+    ]);
     $obj = new CRM_Report_Form_Event_ParticipantListing();
     $form->add('select', 'participant_fee_id',
        ts('Fee Level'),
index b485fe28720b4ebd22147e128782bbf8f44209b2..953c61b5fdb837832daca95a39c8fa1b816cdcad 100644 (file)
@@ -43,6 +43,7 @@
  *
  */
 class CRM_Event_Badge {
+
   /**
    */
   public function __construct() {
@@ -148,14 +149,14 @@ class CRM_Event_Badge {
     $y = $this->pdf->GetY();
     if ($this->debug) {
       $this->pdf->Rect($x, $y, $this->pdf->width, $this->pdf->height, 'D', [
-          'all' => [
-            'width' => 1,
-            'cap' => 'round',
-            'join' => 'round',
-            'dash' => '2,10',
-            'color' => [255, 0, 0],
-          ],
-        ]);
+        'all' => [
+          'width' => 1,
+          'cap' => 'round',
+          'join' => 'round',
+          'dash' => '2,10',
+          'color' => [255, 0, 0],
+        ],
+      ]);
     }
     $img = $this->getImageFileName($this->event->id, $img);
     if ($img) {
index a397f838ab984cb8f5bedffcdee039fecae1aada..4ac357ec25216bcc9c7b5f6a4a90c50dd721ff9b 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Badge_Logo
  */
 class CRM_Event_Badge_Logo extends CRM_Event_Badge {
+
   /**
    */
   public function __construct() {
@@ -40,12 +41,12 @@ class CRM_Event_Badge_Logo extends CRM_Event_Badge {
     $y = $this->pdf->GetY();
     $this->printBackground(TRUE);
     $this->pdf->SetLineStyle([
-        'width' => 0.1,
-        'cap' => 'round',
-        'join' => 'round',
-        'dash' => '2,2',
-        'color' => [0, 0, 200],
-      ]);
+      'width' => 0.1,
+      'cap' => 'round',
+      'join' => 'round',
+      'dash' => '2,2',
+      'color' => [0, 0, 200],
+    ]);
 
     $this->pdf->SetFontSize(8);
     $this->pdf->MultiCell($this->pdf->width - $this->lMarginLogo, 0, $participant['event_title'], $this->border, "L", 0, 1, $x + $this->lMarginLogo, $y);
index 460b465c7042bd550c9a1fecef0eaedb0ba4f660..2343909174f5327c4943670b9287183231cae274 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Badge_Logo5395
  */
 class CRM_Event_Badge_Logo5395 extends CRM_Event_Badge {
+
   /**
    */
   public function __construct() {
@@ -40,12 +41,12 @@ class CRM_Event_Badge_Logo5395 extends CRM_Event_Badge {
     $y = $this->pdf->GetY();
     $this->printBackground(TRUE);
     $this->pdf->SetLineStyle([
-        'width' => 0.1,
-        'cap' => 'round',
-        'join' => 'round',
-        'dash' => '2,2',
-        'color' => [0, 0, 200],
-      ]);
+      'width' => 0.1,
+      'cap' => 'round',
+      'join' => 'round',
+      'dash' => '2,2',
+      'color' => [0, 0, 200],
+    ]);
 
     $this->pdf->SetFontSize(9);
     $this->pdf->MultiCell($this->pdf->width - $this->lMarginLogo, 0, $participant['event_title'], $this->border, "L", 0, 1, $x + $this->lMarginLogo, $y);
index 33df180f6e66eec4ea81d1fb7b8fd14188ac666d..f2d4990bc3ededb0667eec3e4369ce7bf50507b9 100644 (file)
@@ -38,6 +38,7 @@
  *
  */
 class CRM_Event_Badge_NameTent extends CRM_Event_Badge {
+
   /**
    */
   public function __construct() {
index e56a43ae958880790350fc10aacd296125f75875..ac4090363f61f4a19649ff1c7c7406a680cbe103 100644 (file)
@@ -5,7 +5,10 @@
  */
 class CRM_Event_Cart_BAO_Cart extends CRM_Event_Cart_DAO_Cart {
   public $associations_loaded = FALSE;
-  /* event_in_cart_id => $event_in_cart */
+  /**
+   * event_in_cart_id => $event_in_cart
+   * @var array
+   */
   public $events_in_carts = [];
 
   /**
@@ -327,7 +330,6 @@ class CRM_Event_Cart_BAO_Cart extends CRM_Event_Cart_DAO_Cart {
     return $values;
   }
 
-
   /**
    * @param int $from_cart_id
    */
index a9d9b38941c1a4880445eb8f38573e3f77a69039..fd2c3f49dfba37e848f077c633ad50a33a4aa96f 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_BAO_Conference
  */
 class CRM_Event_Cart_BAO_Conference {
+
   /**
    * XXX assumes we don't allow a contact to register for the same conference more than once
    * XXX flattens the object tree for convenient templating
index aa33705627c071666ef098318643fad0defcc11b..7dd79ec72523cdc4d11cc1599d1d6dfb737e9bdd 100644 (file)
@@ -224,7 +224,6 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl
     return count($this->waiting_participants());
   }
 
-
   /**
    * @param mixed $offset
    *
index 84ed049823b62c5dab864a9fce494a9cd51a6bbe..a00044bdda636a2b1254ac672a99d12674394610 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_Controller_Checkout
  */
 class CRM_Event_Cart_Controller_Checkout extends CRM_Core_Controller {
+
   /**
    * @param null $title
    * @param bool|int $action
index 35722587e93dc2f4ac139a9e809b52ad6ba9c57c..a78d34f0263c3f8f0d8258fb0b8c7840b637793b 100644 (file)
@@ -166,10 +166,10 @@ class CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices extends CRM_Event_Cart_
             if (array_key_exists($participant->status_id, $statusTypes)) {
               $form = $mer_participant->get_form();
               $this->_errors[$form->html_field_name('email')] = ts("The participant %1 is already registered for %2 (%3).", [
-                  1 => $participant_fields['email'],
-                  2 => $event_in_cart->event->title,
-                  3 => $event_in_cart->event->start_date,
-                ]);
+                1 => $participant_fields['email'],
+                2 => $event_in_cart->event->title,
+                3 => $event_in_cart->event->start_date,
+              ]);
             }
           }
         }
index b8340e44f5016febe6eccb361071817acb0986a3..ef45df9b54fe0da6fa81a400a0cd9423a8abb54f 100644 (file)
@@ -113,7 +113,7 @@ class CRM_Event_Cart_Form_MerParticipant extends CRM_Core_Form {
    *
    * @return CRM_Event_Cart_Form_MerParticipant
    */
-  static public function get_form($participant) {
+  public static function get_form($participant) {
     return new CRM_Event_Cart_Form_MerParticipant($participant);
   }
 
index 9b3d61554f45e7d6665f251e261e068b7a5b4330..494a594e6e6f62ebdb4238590c2b097f3626e6ce 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_Page_AddToCart
  */
 class CRM_Event_Cart_Page_AddToCart extends CRM_Core_Page {
+
   /**
    * This function takes care of all the things common to all pages.
    *
@@ -22,9 +23,9 @@ class CRM_Event_Cart_Page_AddToCart extends CRM_Core_Page {
 
     $url = CRM_Utils_System::url('civicrm/event/view_cart');
     CRM_Utils_System::setUFMessage(ts("<b>%1</b> has been added to your cart. <a href='%2'>View your cart.</a>", [
-          1 => $event_in_cart->event->title,
-          2 => $url,
-        ]));
+      1 => $event_in_cart->event->title,
+      2 => $url,
+    ]));
 
     $transaction->commit();
 
index fa12bcbc46a9716ffe02a7d1e40d00f43a3586b1..19c7b8559b3520237e13a2762a8c91cadeab1f8f 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_Page_CheckoutAJAX
  */
 class CRM_Event_Cart_Page_CheckoutAJAX {
+
   public function add_participant_to_cart() {
     $transaction = new CRM_Core_Transaction();
     $cart_id = CRM_Utils_Request::retrieve('cart_id', 'Integer');
index e25ebbd26bec8ffa9ce69d0b8b99d5402e397278..90f6554f902f03999732b97d439c8375a7e7121d 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_Page_RemoveFromCart
  */
 class CRM_Event_Cart_Page_RemoveFromCart extends CRM_Core_Page {
+
   /**
    * This function takes care of all the things common to all pages.
    *
index 84e20dd64e2d9efd221576f22860c51247c35185..b2a0a7ce0bdb09836cac12f16cfab8e2def0c07b 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_Page_ViewCart
  */
 class CRM_Event_Cart_Page_ViewCart extends CRM_Core_Page {
+
   /**
    * @return string
    */
index 8ba98dc22d2c38d23be353752ee872576cc1c1ad..3ca22852815a1208ceea95682a9175ad2f57c21c 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Event_Cart_StateMachine_Checkout
  */
 class CRM_Event_Cart_StateMachine_Checkout extends CRM_Core_StateMachine {
+
   /**
    * @param object $controller
    * @param const|int $action
index 655a7b93b2f1e441623f5bf2037b026f589ed153..f5972943bfdef98855b698d5f467ec6a8f5ccc61 100644 (file)
@@ -225,12 +225,12 @@ class CRM_Event_Form_EventFees {
       $contribution->id = $contriId;
       $contribution->find(TRUE);
       foreach ([
-                 'financial_type_id',
-                 'payment_instrument_id',
-                 'contribution_status_id',
-                 'receive_date',
-                 'total_amount',
-               ] as $f) {
+        'financial_type_id',
+        'payment_instrument_id',
+        'contribution_status_id',
+        'receive_date',
+        'total_amount',
+      ] as $f) {
         $defaults[$form->_pId][$f] = $contribution->$f;
       }
     }
index 08dedbe50987d2c4f2375a8d91c70cd0b657d4c6..cd013d81cc3aa8b76b8a38ee31ffe7d9608f6a72 100644 (file)
@@ -75,11 +75,13 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form {
   /**
    * The campaign id of the existing event, we use this to know if we need to update
    * the participant records
+   * @var int
    */
   protected $_campaignID = NULL;
 
   /**
    * Check if repeating event.
+   * @var bool
    */
   public $_isRepeatingEvent;
 
index e03b13a756d4d74b4325112f0cf1e43c95770724..2a47fa85c9041929b66f6dd6cbf7921e792d2ffa 100644 (file)
@@ -38,6 +38,7 @@ class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent {
 
   /**
    * Page action.
+   * @var int
    */
   public $_action;
 
@@ -57,11 +58,10 @@ class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent {
     );
 
     $this->addEntityRef('parent_event_id', ts('Parent Event'), [
-        'entity' => 'Event',
-        'placeholder' => ts('- any -'),
-        'select' => ['minimumInputLength' => 0],
-      ]
-    );
+      'entity' => 'Event',
+      'placeholder' => ts('- any -'),
+      'select' => ['minimumInputLength' => 0],
+    ]);
 
     parent::buildQuickForm();
   }
index c51030db06a10a506f521a4c5b9b2f3e7ae8887c..31317c09aa8d0fff18bea5c9a54815b1f1b79ca2 100644 (file)
@@ -37,6 +37,7 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent {
 
   /**
    * Event type.
+   * @var int
    */
   protected $_eventType = NULL;
 
index 7c79b05846ca6ce25d722df7b2e0dc4ebef4a3d7..3a02919e228bd67f8a84a0e82dbda266f13686ba 100644 (file)
@@ -47,11 +47,13 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
 
   /**
    * Page action.
+   * @var int
    */
   public $_action;
 
   /**
    * In Date.
+   * @var string
    */
   private $_inDate;
 
index e51f1a3f45ab3e01cc93b2730d26f2ce1a538244..b33eafe0a4205523283ec64a8849b865a2b4b397 100644 (file)
@@ -64,6 +64,7 @@ class CRM_Event_Form_ManageEvent_Location extends CRM_Event_Form_ManageEvent {
 
   /**
    * Get the db values for this form.
+   * @var array
    */
   public $_values = [];
 
@@ -242,10 +243,10 @@ class CRM_Event_Form_ManageEvent_Location extends CRM_Event_Form_ManageEvent {
 
     $defaultLocationType = CRM_Core_BAO_LocationType::getDefault();
     foreach ([
-               'address',
-               'phone',
-               'email',
-             ] as $block) {
+      'address',
+      'phone',
+      'email',
+    ] as $block) {
       if (empty($params[$block]) || !is_array($params[$block])) {
         continue;
       }
index a3441f82a75e1161af1a888c5b17efa715244834..0c62605713f5d74781a32d6ffa6fe48deeae1e6e 100644 (file)
@@ -356,9 +356,9 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
     ];
 
     $configs['allowCoreTypes'] = array_merge([
-        'Contact',
-        'Individual',
-      ], CRM_Contact_BAO_ContactType::subTypes('Individual'));
+      'Contact',
+      'Individual',
+    ], CRM_Contact_BAO_ContactType::subTypes('Individual'));
     $configs['allowCoreTypes'][] = 'Participant';
     if (CRM_Core_Permission::check('manage event profiles') && !CRM_Core_Permission::check('administer CiviCRM')) {
       $configs['usedFor'][] = 'CiviEvent';
@@ -794,7 +794,8 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
 
     // format params
     $params['is_online_registration'] = CRM_Utils_Array::value('is_online_registration', $params, FALSE);
-    $params['is_confirm_enabled'] = CRM_Utils_Array::value('is_confirm_enabled', $params, FALSE); // CRM-11182
+    // CRM-11182
+    $params['is_confirm_enabled'] = CRM_Utils_Array::value('is_confirm_enabled', $params, FALSE);
     $params['is_multiple_registrations'] = CRM_Utils_Array::value('is_multiple_registrations', $params, FALSE);
     $params['allow_same_participant_emails'] = CRM_Utils_Array::value('allow_same_participant_emails', $params, FALSE);
     $params['requires_approval'] = CRM_Utils_Array::value('requires_approval', $params, FALSE);
index 58ef8f6e2061dc549ac7cc3a14400c0d95005038..f02716591d66fde53b21c62a0f7da0a8c40e298b 100644 (file)
@@ -14,15 +14,16 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent {
 
   /**
    * Parent Event Start Date.
+   * @var string
    */
   protected $_parentEventStartDate = NULL;
 
   /**
    * Parent Event End Date.
+   * @var string
    */
   protected $_parentEventEndDate = NULL;
 
-
   public function preProcess() {
     parent::preProcess();
     $this->assign('selectedChild', 'repeat');
@@ -168,7 +169,7 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent {
    *
    * @return array
    */
-  static public function getParticipantCountforEvent($listOfRelatedEntities = []) {
+  public static function getParticipantCountforEvent($listOfRelatedEntities = []) {
     $participantDetails = [];
     if (!empty($listOfRelatedEntities)) {
       $implodeRelatedEntities = implode(',', array_map(function ($entity) {
@@ -195,7 +196,7 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent {
    * This function checks if there was any registration for related event ids,
    * and returns array of ids with no registrations
    *
-   * @param string or int or object... $eventID
+   * @param mixed $eventID string, int or object
    *
    * @return array
    */
index 70b2a84c075ed96a5fda150aecf9f6056e42cdc0..0b0b31e0dcf2ff42c5874882f8d7ae53d5253b41 100644 (file)
@@ -85,13 +85,13 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
   protected $_noteId = NULL;
 
   /**
-   * @deprecated
    *
    * Use parent $this->contactID
    *
    * The id of the contact associated with this participation.
    *
    * @var int
+   * @deprecated
    */
   public $_contactId;
 
@@ -112,52 +112,61 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
   /**
    * If event is paid or unpaid.
+   * @var bool
    */
   public $_isPaidEvent;
 
   /**
    * Page action.
+   * @var int
    */
   public $_action;
 
   /**
    * Role Id.
+   * @var int
    */
   protected $_roleId = NULL;
 
   /**
    * Event Type Id.
+   * @var int
    */
   protected $_eventTypeId = NULL;
 
   /**
    * Participant status Id.
+   * @var int
    */
   protected $_statusId = NULL;
 
   /**
    * Cache all the participant statuses.
+   * @var array
    */
   protected $_participantStatuses;
 
   /**
    * Participant mode.
+   * @var string
    */
   public $_mode = NULL;
 
   /**
    * Event ID preselect.
+   * @var int
    */
   public $_eID = NULL;
 
   /**
    * Line Item for Price Set.
+   * @var array
    */
   public $_lineItem = NULL;
 
   /**
    * Contribution mode for event registration for offline mode.
-   *
+   * @var string
    * @deprecated
    */
   public $_contributeMode = 'direct';
@@ -166,32 +175,37 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
   /**
    * Store id of role custom data type ( option value )
+   * @var int
    */
   protected $_roleCustomDataTypeID;
 
   /**
    * Store id of event Name custom data type ( option value)
+   * @var int
    */
   protected $_eventNameCustomDataTypeID;
 
   /**
    * Selected discount id.
+   * @var int
    */
   public $_originalDiscountId = NULL;
 
   /**
    * Event id.
+   * @var int
    */
   public $_eventId = NULL;
 
   /**
    * Id of payment, if any
+   * @var int
    */
   public $_paymentId = NULL;
 
   /**
-   * @todo add explanatory note about this
    * @var null
+   * @todo add explanatory note about this
    */
   public $_onlinePendingContributionId = NULL;
 
@@ -612,26 +626,25 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
         }
       }
       $this->addButtons([
-          [
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-            'isDefault' => TRUE,
-          ],
-          [
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ],
-        ]
-      );
+        [
+          'type' => 'next',
+          'name' => ts('Delete'),
+          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+          'isDefault' => TRUE,
+        ],
+        [
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ],
+      ]);
       return;
     }
 
     if ($this->_single && $this->_context == 'standalone') {
       $this->addEntityRef('contact_id', ts('Contact'), [
-          'create' => TRUE,
-          'api' => ['extra' => ['email']],
-        ], TRUE);
+        'create' => TRUE,
+        'api' => ['extra' => ['email']],
+      ], TRUE);
     }
 
     $eventFieldParams = [
@@ -726,9 +739,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
     }
 
     $this->addSelect('status_id', $checkCancelledJs + [
-        'options' => $statusOptions,
-        'option_url' => 'civicrm/admin/participant_status',
-      ], TRUE);
+      'options' => $statusOptions,
+      'option_url' => 'civicrm/admin/participant_status',
+    ], TRUE);
 
     $this->addElement('checkbox', 'is_notify', ts('Send Notification'), NULL);
 
@@ -1127,9 +1140,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
       // set source if not set
       if (empty($params['source'])) {
         $this->_params['participant_source'] = ts('Offline Registration for Event: %2 by: %1', [
-            1 => $userName,
-            2 => $eventTitle,
-          ]);
+          1 => $userName,
+          2 => $eventTitle,
+        ]);
       }
       else {
         $this->_params['participant_source'] = $params['source'];
@@ -1360,9 +1373,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
         if (!$this->_onlinePendingContributionId) {
           if (empty($params['source'])) {
             $contributionParams['source'] = ts('%1 : Offline registration (by %2)', [
-                1 => $eventTitle,
-                2 => $userName,
-              ]);
+              1 => $eventTitle,
+              2 => $userName,
+            ]);
           }
           else {
             $contributionParams['source'] = $params['source'];
index ddafbc922602f65cd02ddb21dc7f6597a21dee21..8b51c854655b81eece308abe5e965a2ee5683d85 100644 (file)
@@ -255,14 +255,13 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
    */
   public function buildQuickForm() {
     $this->addButtons([
-        [
-          'type' => 'cancel',
-          'name' => ts('Done'),
-          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-          'isDefault' => TRUE,
-        ],
-      ]
-    );
+      [
+        'type' => 'cancel',
+        'name' => ts('Done'),
+        'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+        'isDefault' => TRUE,
+      ],
+    ]);
   }
 
 }
index c104fa17555d6b9fd8833abcb108215517d43b91..2e60b956e41a84821cff7ecb83aa2a3c738d4abe 100644 (file)
@@ -154,11 +154,14 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
 
   public $_pcpId;
 
-  /* Is event already full.
+  /**
+   * Is event already full.
    *
    * @var boolean
+   *
    */
 
+
   public $_isEventFull;
 
   public $_lineItem;
@@ -168,9 +171,8 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
   public $_forcePayement;
 
   /**
+   * @var bool
    * @deprecated
-   *
-   * @var
    */
   public $_isBillingAddressRequiredForPayLater;
 
@@ -1255,10 +1257,10 @@ WHERE  v.option_group_id = g.id
       return;
     }
     foreach (array(
-               'constantValues',
-               'submitValues',
-               'defaultValues',
-             ) as $val) {
+      'constantValues',
+      'submitValues',
+      'defaultValues',
+    ) as $val) {
       $values = $form->{"_$val"};
       if (!is_array($values) || empty($values)) {
         continue;
index 0d3fd08099c69c54d9a0716ef867e183075b8e07..afaaf1a4d4ff8e5af2c408043fb9bf9da1c4e1d2 100644 (file)
@@ -39,6 +39,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
 
   /**
    * Pre-registered additional participant id.
+   * @var int
    */
   public $additionalParticipantId = NULL;
 
@@ -182,17 +183,17 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
     $first_name = $last_name = NULL;
     $pre = $post = [];
     foreach ([
-               'pre',
-               'post',
-             ] as $keys) {
+      'pre',
+      'post',
+    ] as $keys) {
       if (isset($this->_values['additional_custom_' . $keys . '_id'])) {
         $this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys));
         $$keys = CRM_Core_BAO_UFGroup::getFields($this->_values['additional_custom_' . $keys . '_id']);
       }
       foreach ([
-                 'first_name',
-                 'last_name',
-               ] as $name) {
+        'first_name',
+        'last_name',
+      ] as $name) {
         if (array_key_exists($name, $$keys) &&
           CRM_Utils_Array::value('is_required', CRM_Utils_Array::value($name, $$keys))
         ) {
@@ -263,22 +264,22 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
           $this->set('allowWaitlist', $this->_allowWaitlist);
           if ($this->_requireApproval) {
             $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed). Registration for this event requires approval. You will receive an email once your registration has been reviewed.", [
-                1 => ++$processedCnt,
-                2 => $spaces,
-              ]);
+              1 => ++$processedCnt,
+              2 => $spaces,
+            ]);
           }
           else {
             $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed).", [
-                1 => ++$processedCnt,
-                2 => $spaces,
-              ]);
+              1 => ++$processedCnt,
+              2 => $spaces,
+            ]);
           }
         }
         else {
           $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed). Please go back to the main registration page and reduce the number of additional people. You will also need to complete payment information.", [
-              1 => ++$processedCnt,
-              2 => $spaces,
-            ]);
+            1 => ++$processedCnt,
+            2 => $spaces,
+          ]);
           $allowToProceed = FALSE;
         }
         CRM_Core_Session::setStatus($statusMessage, ts('Registration Error'), 'error');
@@ -355,25 +356,23 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
     //CRM-4320
     if ($allowToProceed) {
       $buttons = array_merge($buttons, [
-          [
-            'type' => 'upload',
-            'name' => ts('Continue'),
-            'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-            'isDefault' => TRUE,
-            'js' => $js,
-          ],
-        ]
-      );
+        [
+          'type' => 'upload',
+          'name' => ts('Continue'),
+          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+          'isDefault' => TRUE,
+          'js' => $js,
+        ],
+      ]);
       if ($includeSkipButton) {
         $buttons = array_merge($buttons, [
-            [
-              'type' => 'next',
-              'name' => ts('Skip Participant'),
-              'subName' => 'skip',
-              'icon' => 'fa-fast-forward',
-            ],
-          ]
-        );
+          [
+            'type' => 'next',
+            'name' => ts('Skip Participant'),
+            'subName' => 'skip',
+            'icon' => 'fa-fast-forward',
+          ],
+        ]);
       }
     }
     $this->addButtons($buttons);
@@ -493,9 +492,9 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
             $totalParticipants > $self->_availableRegistrations
           ) {
             $errors['_qf_default'] = ts('Sorry, it looks like this event only has %2 spaces available, and you are trying to register %1 participants. Please change your selections accordingly.', [
-                1 => $totalParticipants,
-                2 => $self->_availableRegistrations,
-              ]);
+              1 => $totalParticipants,
+              2 => $self->_availableRegistrations,
+            ]);
           }
         }
       }
@@ -739,7 +738,8 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
 
     // Check whether to process the registration now, calling processRegistration()
     if (
-      !$this->_values['event']['is_confirm_enabled'] // CRM-11182 - Optional confirmation screen
+    // CRM-11182 - Optional confirmation screen
+      !$this->_values['event']['is_confirm_enabled']
       && !$this->_values['event']['is_monetary']
       && CRM_Utils_Array::value('additional_participants', $this->_params[0])
       && $this->isLastParticipant()
index cdff40124f856146b9acc842a362a7292ed8b2f4..7ba4fdb95a0805d4669c656168d9c9bb652bb14f 100644 (file)
@@ -55,6 +55,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
    * These should get a standardised format in the beginPostProcess function.
    *
    * These fields are common to many forms. Some may override this.
+   * @var array
    */
   protected $submittableMoneyFields = ['total_amount', 'net_amount', 'non_deductible_amount', 'fee_amount', 'tax_amount', 'amount'];
 
@@ -224,9 +225,9 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
         if (is_array($v)) {
           $this->cleanMoneyFields($v);
           foreach ([
-                     'first_name',
-                     'last_name',
-                   ] as $name) {
+            'first_name',
+            'last_name',
+          ] as $name) {
             if (isset($v['billing_' . $name]) &&
               !isset($v[$name])
             ) {
@@ -315,18 +316,17 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
 
     $contribButton = ts('Continue');
     $this->addButtons([
-        [
-          'type' => 'back',
-          'name' => ts('Go Back'),
-        ],
-        [
-          'type' => 'next',
-          'name' => $contribButton,
-          'isDefault' => TRUE,
-          'js' => ['onclick' => "return submitOnce(this,'" . $this->_name . "','" . ts('Processing') . "');"],
-        ],
-      ]
-    );
+      [
+        'type' => 'back',
+        'name' => ts('Go Back'),
+      ],
+      [
+        'type' => 'next',
+        'name' => $contribButton,
+        'isDefault' => TRUE,
+        'js' => ['onclick' => "return submitOnce(this,'" . $this->_name . "','" . ts('Processing') . "');"],
+      ],
+    ]);
 
     $defaults = [];
     $fields = [];
index d672a1e95646e5597512a3bcd279cae66bcee4a7..e64d4e9e3443933fa801da0d8bfe0887a3fc7e5f 100644 (file)
  */
 class CRM_Event_Form_Registration_ParticipantConfirm extends CRM_Event_Form_Registration {
   // optional credit card return status code
-  // CRM-6060
+  /**
+   * CRM-6060
+   * @var string
+   */
   protected $_cc = NULL;
 
   /**
@@ -120,13 +123,13 @@ class CRM_Event_Form_Registration_ParticipantConfirm extends CRM_Event_Form_Regi
       else {
         if ($this->_cc == 'fail') {
           $statusMsg = '<div class="bold">' . ts('Your Credit Card transaction was not successful. No money has yet been charged to your card.') . '</div><div><br />' . ts('Click the "Confirm Registration" button to complete your registration in %1, or click "Cancel Registration" if you are no longer interested in attending this event.', [
-              1 => $values['title'],
-            ]) . '</div>';
+            1 => $values['title'],
+          ]) . '</div>';
         }
         else {
           $statusMsg = '<div class="bold">' . ts('Confirm your registration for %1.', [
-              1 => $values['title'],
-            ]) . '</div><div><br />' . ts('Click the "Confirm Registration" button to begin, or click "Cancel Registration" if you are no longer interested in attending this event.') . '</div>';
+            1 => $values['title'],
+          ]) . '</div><div><br />' . ts('Click the "Confirm Registration" button to begin, or click "Cancel Registration" if you are no longer interested in attending this event.') . '</div>';
         }
         $buttons = array_merge($buttons, [
           [
index 98f2e6ddd4e4dd7fc31db2ab8431fe57b59086ca..fd5a218f3e8eb809bf1d405c101384859c0c8e90 100644 (file)
@@ -37,11 +37,13 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
 
   /**
    * The fields involved in this page.
+   * @var array
    */
   public $_fields;
 
   /**
    * The status message that user view.
+   * @var sting
    */
   protected $_waitlistMsg = NULL;
   protected $_requireApprovalMsg = NULL;
@@ -58,6 +60,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
    *
    * This can be set using hook_civicrm_buildForm() to override the registration dupe check.
    * CRM-7604
+   * @var bool
    */
   public $_skipDupeRegistrationCheck = FALSE;
 
@@ -478,15 +481,14 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
       }
 
       $this->addButtons([
-          [
-            'type' => 'upload',
-            'name' => $buttonLabel,
-            'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-            'isDefault' => TRUE,
-            'js' => $js,
-          ],
-        ]
-      );
+        [
+          'type' => 'upload',
+          'name' => $buttonLabel,
+          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+          'isDefault' => TRUE,
+          'js' => $js,
+        ],
+      ]);
     }
 
     $this->addFormRule(['CRM_Event_Form_Registration_Register', 'formRule'], $this);
@@ -508,7 +510,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
    * @param int $discountId
    *   Discount id for the event.
    */
-  static public function buildAmount(&$form, $required = TRUE, $discountId = NULL) {
+  public static function buildAmount(&$form, $required = TRUE, $discountId = NULL) {
     // build amount only when needed, skip incase of event full and waitlisting is enabled
     // and few other conditions check preProcess()
     if (property_exists($form, '_noFees') && $form->_noFees) {
@@ -1162,7 +1164,8 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
 
       if (
         empty($params['additional_participants'])
-        && !$this->_values['event']['is_confirm_enabled'] // CRM-11182 - Optional confirmation screen
+      // CRM-11182 - Optional confirmation screen
+        && !$this->_values['event']['is_confirm_enabled']
       ) {
         $this->processRegistration($this->_params);
       }
index d6c28eac5bd7bfdd52a2a4db3b4445b4de587e3b..71e58e1f3fac64417391f98055ade153d66fc8e1 100644 (file)
@@ -63,6 +63,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search {
 
   /**
    * Prefix for the controller.
+   * @var string
    */
   protected $_prefix = "event_";
 
index 57821565f1a0bea0e8be854b0bee5c99e228c321..c3af950956bf15b805d848a6eccd8400d01c3374 100644 (file)
@@ -113,32 +113,32 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form {
   /**
    * particpant values
    *
-   * @array string
+   * @var string
    */
   protected $_part_values;
   /**
    * details
    *
-   * @array string
+   * @var array
    */
   protected $_details = [];
   /**
    * line items
    *
-   * @array string
+   * @var array
    */
   protected $_line_items = [];
   /**
    * contact_id
    *
-   * @array string
+   * @var int
    */
   protected $contact_id;
 
   /**
    * Is backoffice form?
    *
-   * @array bool
+   * @var bool
    */
   protected $isBackoffice = FALSE;
 
@@ -315,7 +315,7 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form {
     $query = "select event_id from civicrm_participant where contact_id = " . $contact_id;
     $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
-      $to_event_id[]  = $dao->event_id;
+      $to_event_id[] = $dao->event_id;
     }
     if (!empty($to_event_id)) {
       foreach ($to_event_id as $id) {
index 189cc5b88f78b01c5aa2ce38e32bb732bc2880f0..de7e8090fc232f0f7756429601998af3a5a1dc8d 100644 (file)
@@ -110,9 +110,10 @@ class CRM_Event_Form_SelfSvcUpdate extends CRM_Core_Form {
   /**
    * Is backoffice form?
    *
-   * @array bool
+   * @var bool
    */
   protected $isBackoffice = FALSE;
+
   /**
    * Set variables up before form is built based on participant ID from URL
    *
@@ -206,6 +207,7 @@ class CRM_Event_Form_SelfSvcUpdate extends CRM_Core_Form {
     // for self update (event.start_date > today, event can be 'self_updated'
     // retrieve contact name and email, and let user verify his/her identity
   }
+
   /**
    * buildQuickForm -populate input variables for source Event
    * to cancel or transfer to another person
index 038e8276d23aa4c2e96fb263e6649f1f6f9c6b41..87e0a07a0c2990a5008a11d81667a5fd8760c26d 100644 (file)
@@ -149,17 +149,16 @@ class CRM_Event_Form_Task extends CRM_Core_Form_Task {
    */
   public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
     $this->addButtons([
-        [
-          'type' => $nextType,
-          'name' => $title,
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => $backType,
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => $nextType,
+        'name' => $title,
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => $backType,
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
 }
index 79f3d5dce6af0aba9763cb13a7c5fc7611e01618..42c63d4aa01779630859741a7b6ca58f53c14785 100644 (file)
@@ -235,22 +235,22 @@ class CRM_Event_Form_Task_AddToGroup extends CRM_Event_Form_Task {
 
     $status = [
       ts('%count contact added to group', [
-          'count' => $added,
-          'plural' => '%count contacts added to group',
+        'count' => $added,
+        'plural' => '%count contacts added to group',
       ]),
     ];
     if ($notAdded) {
       $status[] = ts('%count contact was already in group', [
-          'count' => $notAdded,
-          'plural' => '%count contacts were already in group',
-        ]);
+        'count' => $notAdded,
+        'plural' => '%count contacts were already in group',
+      ]);
     }
     $status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
     CRM_Core_Session::setStatus($status, ts('Added Contact to %1', [
-          1 => $groupName,
-          'count' => $added,
-          'plural' => 'Added Contacts to %1',
-        ]), 'success', ['expires' => 0]);
+      1 => $groupName,
+      'count' => $added,
+      'plural' => 'Added Contacts to %1',
+    ]), 'success', ['expires' => 0]);
   }
 
 }
index 836e9364b80bfda91adf1b623c43950d4eb10ac2..3f7d87586d5ecf63c630d3ea9b5ad96a9ab0ec16 100644 (file)
@@ -46,6 +46,7 @@ class CRM_Event_Form_Task_Badge extends CRM_Event_Form_Task {
 
   /**
    * Component clause.
+   * @var string
    */
   public $_componentClause;
 
index ce01d3ab39d53e86b7e60f733cb21e95b706bf0a..e57358f3319ccceceaf6402f62afbf0cdc05aa89 100644 (file)
@@ -45,16 +45,19 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
 
   /**
    * Maximum profile fields that will be displayed.
+   * @var int
    */
   protected $_maxFields = 9;
 
   /**
    * Variable to store redirect path.
+   * @var string
    */
   protected $_userContext;
 
   /**
    * Variable to store previous status id.
+   * @var array
    */
   protected $_fromStatusIds;
 
@@ -128,17 +131,16 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
     $this->_fields = array_slice($this->_fields, 0, $this->_maxFields);
 
     $this->addButtons([
-        [
-          'type' => 'submit',
-          'name' => ts('Update Participant(s)'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'submit',
+        'name' => ts('Update Participant(s)'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
 
     $this->assign('profileTitle', $this->_title);
     $this->assign('componentIds', $this->_participantIds);
@@ -278,7 +280,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
    * @param int $participantId
    * @param int $statusId
    *
-   * @return Ambigous|void
+   * @return mixed
    */
   public static function updatePendingOnlineContribution($participantId, $statusId) {
     if (!$participantId || !$statusId) {
@@ -417,10 +419,10 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
 
     //set values for ipn code.
     foreach ([
-               'fee_amount',
-               'check_number',
-               'payment_instrument_id',
-             ] as $field) {
+      'fee_amount',
+      'check_number',
+      'payment_instrument_id',
+    ] as $field) {
       if (!$input[$field] = CRM_Utils_Array::value($field, $params)) {
         $input[$field] = $contribution->$field;
       }
index 3dd82dbcb83f2dd9a7e480ebeb5228ac3b2a73ef..2fc163490da3c0a4a7d0ac5d4af03dcedef469b3 100644 (file)
@@ -40,6 +40,7 @@ class CRM_Event_Form_Task_Cancel extends CRM_Event_Form_Task {
 
   /**
    * Variable to store redirect path.
+   * @var string
    */
   protected $_userContext;
 
index aafe0bfceb930d27c98fdd679379aba8d8a0ea79..64414a8fc739d8cc0fb080fa36e4f3ce469179a7 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Event_Form_Task_ParticipantStatus extends CRM_Event_Form_Task_Batch {
+
   public function buildQuickForm() {
     // CRM_Event_Form_Task_Batch::buildQuickForm() gets ufGroupId
     // from the form, so set it here to the id of the reserved profile
index 0bb08aca8b742cdbee6f82a7fe5c6cb15fa54da3..8d916b2275a850b82977d929ef858291140b85d1 100644 (file)
@@ -47,11 +47,13 @@ class CRM_Event_Form_Task_PickProfile extends CRM_Event_Form_Task {
 
   /**
    * Maximum event participations that should be allowed to update.
+   * @var int
    */
   protected $_maxParticipations = 100;
 
   /**
    * Variable to store redirect path.
+   * @var string
    */
   protected $_userContext;
 
index 9cc1d1992bbb645a6e1a56f37a21b4f564f6348e..828e572ded7106c964f270c257cbd9288195314a 100644 (file)
@@ -78,18 +78,17 @@ class CRM_Event_Form_Task_Print extends CRM_Event_Form_Task {
     // just need to add a javacript to popup the window for printing
     //
     $this->addButtons([
-        [
-          'type' => 'next',
-          'name' => ts('Print Participant List'),
-          'js' => ['onclick' => 'window.print()'],
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'back',
-          'name' => ts('Done'),
-        ],
-      ]
-    );
+      [
+        'type' => 'next',
+        'name' => ts('Print Participant List'),
+        'js' => ['onclick' => 'window.print()'],
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'back',
+        'name' => ts('Done'),
+      ],
+    ]);
   }
 
   /**
index e0bf5f553159193a4450f222aaf601989a2afe10..3e143e1154715e55d1dc970edf9f6ceb5b56249b 100644 (file)
@@ -78,13 +78,12 @@ class CRM_Event_Form_Task_SearchTaskHookSample extends CRM_Event_Form_Task {
    */
   public function buildQuickForm() {
     $this->addButtons([
-        [
-          'type' => 'done',
-          'name' => ts('Done'),
-          'isDefault' => TRUE,
-        ],
-      ]
-    );
+      [
+        'type' => 'done',
+        'name' => ts('Done'),
+        'isDefault' => TRUE,
+      ],
+    ]);
   }
 
 }
index 57b92f75bd1c4a636502ecf64e45e3b474d5d540..773a066c63b9ddafc0af14c2bce70a5b129b096e 100644 (file)
  */
 class CRM_Event_Import_Field {
 
-  /**#@+
+  /**
+   * #@+
    * @var string
    */
 
   /**
    * Name of the field
+   * @var string
    */
   public $_name;
 
   /**
    * Title of the field to be used in display
+   * @var string
    */
   public $_title;
 
index 2013c17bad3ef8e48ab59a474c760f572599f889..161ee1f843af3f6435a794346be9736fb26ac432 100644 (file)
@@ -38,7 +38,6 @@
  */
 class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
 
-
   /**
    * Set variables up before form is built.
    *
@@ -263,22 +262,21 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
     $this->setDefaults($defaults);
 
     $this->addButtons(array(
-        array(
-          'type' => 'back',
-          'name' => ts('Previous'),
-        ),
-        array(
-          'type' => 'next',
-          'name' => ts('Continue'),
-          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
+      array(
+        'type' => 'back',
+        'name' => ts('Previous'),
+      ),
+      array(
+        'type' => 'next',
+        'name' => ts('Continue'),
+        'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+        'isDefault' => TRUE,
+      ),
+      array(
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ),
+    ));
   }
 
   /**
@@ -343,8 +341,8 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
             }
             else {
               $errors['_qf_default'] .= ts('Missing required contact matching fields.') . " $fieldMessage " . ts('(Sum of all weights should be greater than or equal to threshold: %1).', array(
-                  1 => $threshold,
-                )) . ' ' . ts('Or Provide Contact ID or External ID.') . '<br />';
+                1 => $threshold,
+              )) . ' ' . ts('Or Provide Contact ID or External ID.') . '<br />';
             }
           }
           elseif (!in_array('event_title', $importKeys)) {
index 000d96db6ba2e098d095cbc13d39ed243919ed6a..ba14c1bc2d7f206cd120eb0b4b8405674c66c3fb 100644 (file)
@@ -36,22 +36,26 @@ abstract class CRM_Event_Import_Parser extends CRM_Import_Parser {
 
   protected $_fileName;
 
-  /**#@+
+  /**
+   * #@+
    * @var integer
    */
 
   /**
    * Imported file size
+   * @var int
    */
   protected $_fileSize;
 
   /**
    * Seperator being used
+   * @var string
    */
   protected $_seperator;
 
   /**
    * Total number of lines in file
+   * @var int
    */
   protected $_lineCount;
 
@@ -254,31 +258,25 @@ abstract class CRM_Event_Import_Parser extends CRM_Import_Parser {
       if ($this->_invalidRowCount) {
         // removed view url for invlaid contacts
         $headers = array_merge([
-            ts('Line Number'),
-            ts('Reason'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('Reason'),
+        ], $customHeaders);
         $this->_errorFileName = self::errorFileName(self::ERROR);
         self::exportCSV($this->_errorFileName, $headers, $this->_errors);
       }
       if ($this->_conflictCount) {
         $headers = array_merge([
-            ts('Line Number'),
-            ts('Reason'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('Reason'),
+        ], $customHeaders);
         $this->_conflictFileName = self::errorFileName(self::CONFLICT);
         self::exportCSV($this->_conflictFileName, $headers, $this->_conflicts);
       }
       if ($this->_duplicateCount) {
         $headers = array_merge([
-            ts('Line Number'),
-            ts('View Participant URL'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('View Participant URL'),
+        ], $customHeaders);
 
         $this->_duplicateFileName = self::errorFileName(self::DUPLICATE);
         self::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
index 3c328d7e081426ce0379a63da1e3e1c2d645f639..7c41ed110a5a06a3c4fe82f06d787009e5e19e4e 100644 (file)
@@ -50,7 +50,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   /**
    * Array of successfully imported participants id's
    *
-   * @array
+   * @var array
    */
   protected $_newParticipants;
 
index 098d6351a8bfb8e38da0c99cac2d3c44018a76df..8e3e5338cafaa36a66cf0dc4db9a2d90a813596f 100644 (file)
@@ -38,6 +38,7 @@
 class CRM_Event_Info extends CRM_Core_Component_Info {
 
   /**
+   * @var string
    * @inheritDoc
    */
   protected $keyword = 'event';
index 03dfcebc0b090681175f68a3602faea6e80d3586..afc523e0347e41242ce1d240ae740f5f52f7a6f5 100644 (file)
@@ -43,17 +43,17 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
    *
    * @var array
    */
-  static $_actionLinks = NULL;
+  public static $_actionLinks = NULL;
 
   /**
    * The event links to display for the browse screen.
    * @var array
    */
-  static $_eventLinks = NULL;
+  public static $_eventLinks = NULL;
 
-  static $_links = NULL;
+  public static $_links = NULL;
 
-  static $_tabLinks = NULL;
+  public static $_tabLinks = NULL;
 
   protected $_pager = NULL;
 
index 39d3fc6cc9525c881cbcfbb9368c8ec5fada1bc5..d21bcddaef2538797672b4972523eb6ea789ec15 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Event_Page_ParticipantListing_Name extends CRM_Event_Page_ParticipantListing_Simple {
+
   public function preProcess() {
     $this->_participantListingType = 'Name';
 
index ae482189750a6d3b5efbef3f53eef6e25b3e67f6..0b4c586936bc9cb2be9ba49d5b989abbea21a263 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Event_Page_ParticipantListing_NameAndEmail extends CRM_Event_Page_ParticipantListing_Simple {
+
   public function preProcess() {
     $this->_participantListingType = 'Name and Email';
 
index 2e6532adcba3819642f832e402b69004dbb99b4f..fb79e008db8ede43dde4c4b0d8e13580a68a0e72 100644 (file)
@@ -46,20 +46,20 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
    *
    * @var array
    */
-  static $_links = NULL;
+  public static $_links = NULL;
 
   /**
    * We use desc to remind us what that column is, name is used in the tpl
    *
    * @var array
    */
-  static $_columnHeaders;
+  public static $_columnHeaders;
 
   /**
    * Properties of contact we're interested in displaying
    * @var array
    */
-  static $_properties = [
+  public static $_properties = [
     'contact_id',
     'contact_type',
     'sort_name',
index 9e8542e103b51da96d074d1dc6851bd433d8fcfc..82afc9194757d4779e15441f8e4acfa215b1aaf4 100644 (file)
  */
 class CRM_Event_Task extends CRM_Core_Task {
 
+  /**
+   * Event tasks
+   */
   const
-    // Event tasks
     CANCEL_REGISTRATION = 301,
     PARTICIPANT_STATUS = 302;
 
-  static $objectType = 'event';
+  /**
+   * @var string
+   */
+  public static $objectType = 'event';
 
   /**
    * These tasks are the core set of tasks that the user can perform
    * on a contact / group of contacts
    *
-   * @return array The set of tasks for a group of contacts
-   *            [ 'title' => The Task title,
-   *              'class' => The Task Form class name,
-   *              'result => Boolean.  FIXME: Not sure what this is for
-   *            ]
+   * @return array
+   *   The set of tasks for a group of contacts
+   *    [ 'title' => The Task title,
+   *      'class' => The Task Form class name,
+   *      'result => Boolean.  FIXME: Not sure what this is for
+   *    ]
    */
   public static function tasks() {
     if (!self::$_tasks) {
index fa26f56b613f3459df73e2a7cc195d0dca8cb69f..1f1b1f716e681e1d6938085b0c416e2415538005 100644 (file)
@@ -70,8 +70,7 @@ class CRM_Event_Tokens extends \Civi\Token\AbstractTokenSubscriber {
    */
   public function checkActive(\Civi\Token\TokenProcessor $processor) {
     // Extracted from scheduled-reminders code. See the class description.
-    return
-      !empty($processor->context['actionMapping'])
+    return !empty($processor->context['actionMapping'])
       && $processor->context['actionMapping']->getEntity() === 'civicrm_participant';
   }
 
@@ -85,7 +84,8 @@ class CRM_Event_Tokens extends \Civi\Token\AbstractTokenSubscriber {
       return;
     }
 
-    $e->query->select('e.*'); // FIXME: seems too broad.
+    // FIXME: seems too broad.
+    $e->query->select('e.*');
     $e->query->select('ov.label as event_type, ev.title, ev.id as event_id, ev.start_date, ev.end_date, ev.summary, ev.description, address.street_address, address.city, address.state_province_id, address.postal_code, email.email as contact_email, phone.phone as contact_phone');
     $e->query->join('participant_stuff', "
 !casMailingJoinType civicrm_event ev ON e.event_id = ev.id