INFRA-132 - CRM/Event - phpcbf
[civicrm-core.git] / CRM / Event / Cart / BAO / MerParticipant.php
index 8c035b0c5eefff19b7bde86ff3e43d24125ea455..2731d858d89399b393796a868f542320d28f75c7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
-| CiviCRM version 4.5                                                |
+| CiviCRM version 4.6                                                |
 +--------------------------------------------------------------------+
 | Copyright CiviCRM LLC (c) 2004-2014                                |
 +--------------------------------------------------------------------+
@@ -37,9 +37,9 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
   /**
    * @param null $participant
    */
-  function __construct($participant = NULL) {
+  public function __construct($participant = NULL) {
     parent::__construct();
-    $a = (array)$participant;
+    $a = (array) $participant;
     $this->copyValues($a);
 
     $this->email = CRM_Utils_Array::value('email', $participant);
@@ -51,7 +51,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
    * @return CRM_Event_Cart_BAO_MerParticipant
    * @throws Exception
    */
-  static function create(&$params) {
+  public static function create(&$params) {
     $participantParams = array(
       'id' => CRM_Utils_Array::value('id', $params),
       'role_id' => self::get_attendee_role_id(),
@@ -78,7 +78,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
   /**
    * @return mixed
    */
-  static function get_attendee_role_id() {
+  public static function get_attendee_role_id() {
     $roles = CRM_Event_PseudoConstant::participantRole(NULL, "v.label='Attendee'");
     $role_names = array_keys($roles);
     return end($role_names);
@@ -87,7 +87,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
   /**
    * @return mixed
    */
-  static function get_pending_in_cart_status_id() {
+  public static function get_pending_in_cart_status_id() {
     $status_types = CRM_Event_PseudoConstant::participantStatus(NULL, "name='Pending in cart'");
     $status_names = array_keys($status_types);
     return end($status_names);
@@ -145,7 +145,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
     return array_pop($results);
   }
 
-  function load_associations() {
+  public function load_associations() {
     $contact_details = CRM_Contact_BAO_Contact::getContactDetails($this->contact_id);
     $this->email = $contact_details[1];
   }
@@ -153,7 +153,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
   /**
    * @return int
    */
-  function get_participant_index() {
+  public function get_participant_index() {
     if (!$this->cart) {
       $this->cart = CRM_Event_Cart_BAO_Cart::find_by_id($this->cart_id);
       $this->cart->load_associations();
@@ -167,7 +167,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
    *
    * @return null
    */
-  static function billing_address_from_contact($contact) {
+  public static function billing_address_from_contact($contact) {
     foreach ($contact->address as $loc) {
       if ($loc['is_billing']) {
         return $loc;
@@ -184,8 +184,7 @@ class CRM_Event_Cart_BAO_MerParticipant extends CRM_Event_BAO_Participant {
   /**
    * @return CRM_Event_Cart_Form_MerParticipant
    */
-  function get_form() {
+  public function get_form() {
     return new CRM_Event_Cart_Form_MerParticipant($this);
   }
 }
-