INFRA-132 - CRM/Event - phpcbf
[civicrm-core.git] / CRM / Event / Cart / Form / Cart.php
index 831a45f8ec91d1bdab101d7d484a3bfa42bf5b40..58316bfef778eb11e16d18de01672d597ce37c77 100644 (file)
@@ -33,7 +33,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
     }
   }
 
-  function loadCart() {
+  public function loadCart() {
     if ($this->event_cart_id == NULL) {
       $this->cart = CRM_Event_Cart_BAO_Cart::find_or_create_for_current_session();
     }
@@ -44,7 +44,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
     $this->stub_out_and_inherit();
   }
 
-  function stub_out_and_inherit() {
+  public function stub_out_and_inherit() {
     $transaction = new CRM_Core_Transaction();
 
     foreach ($this->cart->get_main_events_in_carts() as $event_in_cart) {
@@ -63,7 +63,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
     $transaction->commit();
   }
 
-  function checkWaitingList() {
+  public function checkWaitingList() {
     foreach ($this->cart->events_in_carts as $event_in_cart) {
       $empty_seats = $this->checkEventCapacity($event_in_cart->event_id);
       if ($empty_seats === NULL) {
@@ -81,7 +81,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
    *
    * @return bool|int|null|string
    */
-  function checkEventCapacity($event_id) {
+  public function checkEventCapacity($event_id) {
     $empty_seats = CRM_Event_BAO_Participant::eventFull($event_id, TRUE);
     if (is_numeric($empty_seats)) {
       return $empty_seats;
@@ -97,7 +97,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
   /**
    * @return bool
    */
-  static function is_administrator() {
+  public static function is_administrator() {
     global $user;
     return CRM_Core_Permission::check('administer CiviCRM');
   }
@@ -105,7 +105,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
   /**
    * @return mixed
    */
-  function getContactID() {
+  public function getContactID() {
     //XXX when do we query 'cid' ?
     $tempID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
 
@@ -129,14 +129,15 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
    *
    * @return mixed|null
    */
-  static function find_contact($fields) {
+  public static function find_contact($fields) {
     $dedupe_params = CRM_Dedupe_Finder::formatParams($fields, 'Individual');
     $dedupe_params['check_permission'] = FALSE;
     $ids = CRM_Dedupe_Finder::dupesByParams($dedupe_params, 'Individual');
     if (is_array($ids)) {
       return array_pop($ids);
     }
-    else return NULL;
+    else { return NULL;
+    }
   }
 
   /**
@@ -145,7 +146,7 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
    *
    * @return int|mixed|null
    */
-  static function find_or_create_contact($registeringContactID = NULL, $fields = array()) {
+  public static function find_or_create_contact($registeringContactID = NULL, $fields = array()) {
     $contact_id = self::find_contact($fields);
 
     if ($contact_id) {
@@ -170,9 +171,8 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form {
    *
    * @return mixed
    */
-  function getValuesForPage($page_name) {
+  public function getValuesForPage($page_name) {
     $container = $this->controller->container();
     return $container['values'][$page_name];
   }
 }
-