Reformat DAO files to pass linting and use short array syntax
[civicrm-core.git] / CRM / Event / DAO / Participant.php
index 1bbcdaa8424a5b03579f3158f3171d9b133dc121..f67959c5b4586227c51b7eda9354ec048676176b 100644 (file)
@@ -1,29 +1,5 @@
 <?php
-/*
-+--------------------------------------------------------------------+
-| CiviCRM version 4.7                                                |
-+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2017                                |
-+--------------------------------------------------------------------+
-| This file is a part of CiviCRM.                                    |
-|                                                                    |
-| CiviCRM is free software; you can copy, modify, and distribute it  |
-| under the terms of the GNU Affero General Public License           |
-| Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
-|                                                                    |
-| CiviCRM is distributed in the hope that it will be useful, but     |
-| WITHOUT ANY WARRANTY; without even the implied warranty of         |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
-| See the GNU Affero General Public License for more details.        |
-|                                                                    |
-| You should have received a copy of the GNU Affero General Public   |
-| License and the CiviCRM Licensing Exception along                  |
-| with this program; if not, contact CiviCRM LLC                     |
-| at info[AT]civicrm[DOT]org. If you have questions about the        |
-| GNU Affero General Public License or the licensing of CiviCRM,     |
-| see the CiviCRM license FAQ at http://civicrm.org/licensing        |
-+--------------------------------------------------------------------+
-*/
+
 /**
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2017
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
  * (GenCodeChecksum:444d0ee69773ce242341f8544e192087)
  */
-require_once 'CRM/Core/DAO.php';
-require_once 'CRM/Utils/Type.php';
+
 /**
- * CRM_Event_DAO_Participant constructor.
+ * Database access object for the Participant entity.
  */
 class CRM_Event_DAO_Participant extends CRM_Core_DAO {
+
   /**
    * Static instance to hold the table name.
    *
    * @var string
    */
   static $_tableName = 'civicrm_participant';
+
   /**
    * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
-   * @var boolean
+   * @var bool
    */
-  static $_log = true;
+  static $_log = TRUE;
+
   /**
    * Participant Id
    *
    * @var int unsigned
    */
   public $id;
+
   /**
    * FK to Contact ID
    *
    * @var int unsigned
    */
   public $contact_id;
+
   /**
    * FK to Event ID
    *
    * @var int unsigned
    */
   public $event_id;
+
   /**
    * Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.
    *
    * @var int unsigned
    */
   public $status_id;
+
   /**
    * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
    *
    * @var string
    */
   public $role_id;
+
   /**
    * When did contact register for event?
    *
    * @var datetime
    */
   public $register_date;
+
   /**
    * Source of this event registration.
    *
    * @var string
    */
   public $source;
+
   /**
    * Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
    we store the label value and not the key
@@ -99,330 +84,342 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO {
    * @var text
    */
   public $fee_level;
+
   /**
-   *
    * @var boolean
    */
   public $is_test;
+
   /**
-   *
    * @var boolean
    */
   public $is_pay_later;
+
   /**
    * actual processor fee if known - may be 0.
    *
    * @var float
    */
   public $fee_amount;
+
   /**
    * FK to Participant ID
    *
    * @var int unsigned
    */
   public $registered_by_id;
+
   /**
    * FK to Discount ID
    *
    * @var int unsigned
    */
   public $discount_id;
+
   /**
    * 3 character string, value derived from config setting.
    *
    * @var string
    */
   public $fee_currency;
+
   /**
    * The campaign for which this participant has been registered.
    *
    * @var int unsigned
    */
   public $campaign_id;
+
   /**
    * Discount Amount
    *
    * @var int unsigned
    */
   public $discount_amount;
+
   /**
    * FK to civicrm_event_carts
    *
    * @var int unsigned
    */
   public $cart_id;
+
   /**
    * On Waiting List
    *
    * @var int
    */
   public $must_wait;
+
   /**
    * FK to Contact ID
    *
    * @var int unsigned
    */
   public $transferred_to_contact_id;
+
   /**
    * Class constructor.
    */
-  function __construct() {
+  public function __construct() {
     $this->__table = 'civicrm_participant';
     parent::__construct();
   }
+
   /**
    * Returns foreign keys and entity references.
    *
    * @return array
    *   [CRM_Core_Reference_Interface]
    */
-  static function getReferenceColumns() {
+  public static function getReferenceColumns() {
     if (!isset(Civi::$statics[__CLASS__]['links'])) {
       Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_id', 'civicrm_event', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_participant_status_type', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'registered_by_id', 'civicrm_participant', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'discount_id', 'civicrm_discount', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'cart_id', 'civicrm_event_carts', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'transferred_to_contact_id', 'civicrm_contact', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_id', 'civicrm_event', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'status_id', 'civicrm_participant_status_type', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'registered_by_id', 'civicrm_participant', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'discount_id', 'civicrm_discount', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'cart_id', 'civicrm_event_carts', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'transferred_to_contact_id', 'civicrm_contact', 'id');
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
     }
     return Civi::$statics[__CLASS__]['links'];
   }
+
   /**
    * Returns all the column names of this table
    *
    * @return array
    */
-  static function &fields() {
+  public static function &fields() {
     if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = array(
-        'participant_id' => array(
+      Civi::$statics[__CLASS__]['fields'] = [
+        'participant_id' => [
           'name' => 'id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Participant ID') ,
+          'title' => ts('Participant ID'),
           'description' => 'Participant Id',
-          'required' => true,
-          'import' => true,
+          'required' => TRUE,
+          'import' => TRUE,
           'where' => 'civicrm_participant.id',
           'headerPattern' => '/(^(participant(.)?)?id$)/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'participant_contact_id' => array(
+        ],
+        'participant_contact_id' => [
           'name' => 'contact_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Contact ID') ,
+          'title' => ts('Contact ID'),
           'description' => 'FK to Contact ID',
-          'required' => true,
-          'import' => true,
+          'required' => TRUE,
+          'import' => TRUE,
           'where' => 'civicrm_participant.contact_id',
           'headerPattern' => '/contact(.?id)?/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Contact_DAO_Contact',
-        ,
-        'event_id' => array(
+        ],
+        'event_id' => [
           'name' => 'event_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event') ,
+          'title' => ts('Event'),
           'description' => 'FK to Event ID',
-          'required' => true,
-          'import' => true,
+          'required' => TRUE,
+          'import' => TRUE,
           'where' => 'civicrm_participant.event_id',
           'headerPattern' => '/event id$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Event_DAO_Event',
-        ,
-        'participant_status_id' => array(
+        ],
+        'participant_status_id' => [
           'name' => 'status_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Participant Status') ,
+          'title' => ts('Participant Status'),
           'description' => 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
-          'required' => true,
-          'import' => true,
+          'required' => TRUE,
+          'import' => TRUE,
           'where' => 'civicrm_participant.status_id',
           'headerPattern' => '/(participant.)?(status)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'default' => '1',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Event_DAO_ParticipantStatusType',
-          'html' => array(
+          'html' => [
             'type' => 'Select',
-          ,
-          'pseudoconstant' => array(
+          ],
+          'pseudoconstant' => [
             'table' => 'civicrm_participant_status_type',
             'keyColumn' => 'id',
             'labelColumn' => 'label',
-          )
-        ,
-        'participant_role_id' => array(
+          ]
+        ],
+        'participant_role_id' => [
           'name' => 'role_id',
           'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Participant Role') ,
+          'title' => ts('Participant Role'),
           'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
           'maxlength' => 128,
           'size' => CRM_Utils_Type::HUGE,
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.role_id',
           'headerPattern' => '/(participant.)?(role)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'default' => 'NULL',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
-          'html' => array(
+          'html' => [
             'type' => 'Select',
-          ,
-          'pseudoconstant' => array(
+          ],
+          'pseudoconstant' => [
             'optionGroupName' => 'participant_role',
             'optionEditPath' => 'civicrm/admin/options/participant_role',
-          )
-        ,
-        'participant_register_date' => array(
+          ]
+        ],
+        'participant_register_date' => [
           'name' => 'register_date',
           'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
-          'title' => ts('Register date') ,
+          'title' => ts('Register date'),
           'description' => 'When did contact register for event?',
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.register_date',
           'headerPattern' => '/^(r(egister\s)?date)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-          'html' => array(
+          'html' => [
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
-          ,
-        ,
-        'participant_source' => array(
+          ],
+        ],
+        'participant_source' => [
           'name' => 'source',
           'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Participant Source') ,
+          'title' => ts('Participant Source'),
           'description' => 'Source of this event registration.',
           'maxlength' => 128,
           'size' => CRM_Utils_Type::HUGE,
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.source',
           'headerPattern' => '/(participant.)?(source)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'participant_fee_level' => array(
+        ],
+        'participant_fee_level' => [
           'name' => 'fee_level',
           'type' => CRM_Utils_Type::T_TEXT,
-          'title' => ts('Fee level') ,
+          'title' => ts('Fee level'),
           'description' => 'Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
       we store the label value and not the key
     ',
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.fee_level',
           'headerPattern' => '/^(f(ee\s)?level)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
-        ,
-        'participant_is_test' => array(
+        ],
+        'participant_is_test' => [
           'name' => 'is_test',
           'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('Test') ,
-          'import' => true,
+          'title' => ts('Test'),
+          'import' => TRUE,
           'where' => 'civicrm_participant.is_test',
           'headerPattern' => '',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'participant_is_pay_later' => array(
+        ],
+        'participant_is_pay_later' => [
           'name' => 'is_pay_later',
           'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('Is Pay Later') ,
-          'import' => true,
+          'title' => ts('Is Pay Later'),
+          'import' => TRUE,
           'where' => 'civicrm_participant.is_pay_later',
           'headerPattern' => '/(is.)?(pay(.)?later)$/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'participant_fee_amount' => array(
+        ],
+        'participant_fee_amount' => [
           'name' => 'fee_amount',
           'type' => CRM_Utils_Type::T_MONEY,
-          'title' => ts('Fee Amount') ,
+          'title' => ts('Fee Amount'),
           'description' => 'actual processor fee if known - may be 0.',
-          'precision' => array(
+          'precision' => [
             20,
             2
-          ,
-          'import' => true,
+          ],
+          'import' => TRUE,
           'where' => 'civicrm_participant.fee_amount',
           'headerPattern' => '/fee(.?am(ou)?nt)?/i',
           'dataPattern' => '/^\d+(\.\d{2})?$/',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'participant_registered_by_id' => array(
+        ],
+        'participant_registered_by_id' => [
           'name' => 'registered_by_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Registered By ID') ,
+          'title' => ts('Registered By ID'),
           'description' => 'FK to Participant ID',
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.registered_by_id',
           'headerPattern' => '',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'default' => 'NULL',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Event_DAO_Participant',
-        ,
-        'participant_discount_id' => array(
+        ],
+        'participant_discount_id' => [
           'name' => 'discount_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Discount ID') ,
+          'title' => ts('Discount ID'),
           'description' => 'FK to Discount ID',
           'default' => 'NULL',
           'table_name' => 'civicrm_participant',
@@ -430,136 +427,140 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO {
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Core_DAO_Discount',
-        ,
-        'participant_fee_currency' => array(
+        ],
+        'participant_fee_currency' => [
           'name' => 'fee_currency',
           'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Fee Currency') ,
+          'title' => ts('Fee Currency'),
           'description' => '3 character string, value derived from config setting.',
           'maxlength' => 3,
           'size' => CRM_Utils_Type::FOUR,
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.fee_currency',
           'headerPattern' => '/(fee)?.?cur(rency)?/i',
           'dataPattern' => '/^[A-Z]{3}$/i',
-          'export' => true,
+          'export' => TRUE,
           'default' => 'NULL',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-          'html' => array(
+          'html' => [
             'type' => 'Select',
-          ,
-          'pseudoconstant' => array(
+          ],
+          'pseudoconstant' => [
             'table' => 'civicrm_currency',
             'keyColumn' => 'name',
             'labelColumn' => 'full_name',
             'nameColumn' => 'name',
-          )
-        ,
-        'participant_campaign_id' => array(
+          ]
+        ],
+        'participant_campaign_id' => [
           'name' => 'campaign_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Campaign') ,
+          'title' => ts('Campaign'),
           'description' => 'The campaign for which this participant has been registered.',
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.campaign_id',
           'headerPattern' => '',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Campaign_DAO_Campaign',
-          'pseudoconstant' => array(
+          'pseudoconstant' => [
             'table' => 'civicrm_campaign',
             'keyColumn' => 'id',
             'labelColumn' => 'title',
-          )
-        ,
-        'discount_amount' => array(
+          ]
+        ],
+        'discount_amount' => [
           'name' => 'discount_amount',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Discount Amount') ,
+          'title' => ts('Discount Amount'),
           'description' => 'Discount Amount',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'cart_id' => array(
+        ],
+        'cart_id' => [
           'name' => 'cart_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Cart ID') ,
+          'title' => ts('Event Cart ID'),
           'description' => 'FK to civicrm_event_carts',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Event_Cart_DAO_Cart',
-        ,
-        'must_wait' => array(
+        ],
+        'must_wait' => [
           'name' => 'must_wait',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Must Wait on List') ,
+          'title' => ts('Must Wait on List'),
           'description' => 'On Waiting List',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
-        ,
-        'transferred_to_contact_id' => array(
+        ],
+        'transferred_to_contact_id' => [
           'name' => 'transferred_to_contact_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Transferred to Contact ID') ,
+          'title' => ts('Transferred to Contact ID'),
           'description' => 'FK to Contact ID',
-          'import' => true,
+          'import' => TRUE,
           'where' => 'civicrm_participant.transferred_to_contact_id',
           'headerPattern' => '/transfer(.?id)?/i',
           'dataPattern' => '',
-          'export' => true,
+          'export' => TRUE,
           'default' => 'NULL',
           'table_name' => 'civicrm_participant',
           'entity' => 'Participant',
           'bao' => 'CRM_Event_BAO_Participant',
           'localizable' => 0,
           'FKClassName' => 'CRM_Contact_DAO_Contact',
-        ,
-      );
+        ],
+      ];
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
     }
     return Civi::$statics[__CLASS__]['fields'];
   }
+
   /**
    * Return a mapping from field-name to the corresponding key (as used in fields()).
    *
    * @return array
    *   Array(string $name => string $uniqueName).
    */
-  static function &fieldKeys() {
+  public static function &fieldKeys() {
     if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
       Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
     }
     return Civi::$statics[__CLASS__]['fieldKeys'];
   }
+
   /**
    * Returns the names of this table
    *
    * @return string
    */
-  static function getTableName() {
+  public static function getTableName() {
     return self::$_tableName;
   }
+
   /**
    * Returns if this table needs to be logged
    *
-   * @return boolean
+   * @return bool
    */
-  function getLog() {
+  public function getLog() {
     return self::$_log;
   }
+
   /**
    * Returns the list of fields that can be imported
    *
@@ -567,10 +568,11 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO {
    *
    * @return array
    */
-  static function &import($prefix = false) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant', $prefix, array());
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant', $prefix, []);
     return $r;
   }
+
   /**
    * Returns the list of fields that can be exported
    *
@@ -578,32 +580,38 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO {
    *
    * @return array
    */
-  static function &export($prefix = false) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant', $prefix, array());
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant', $prefix, []);
     return $r;
   }
+
   /**
    * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
    */
   public static function indices($localize = TRUE) {
-    $indices = array(
-      'index_status_id' => array(
+    $indices = [
+      'index_status_id' => [
         'name' => 'index_status_id',
-        'field' => array(
+        'field' => [
           0 => 'status_id',
-        ,
-        'localizable' => false,
+        ],
+        'localizable' => FALSE,
         'sig' => 'civicrm_participant::0::status_id',
-      ,
-      'index_role_id' => array(
+      ],
+      'index_role_id' => [
         'name' => 'index_role_id',
-        'field' => array(
+        'field' => [
           0 => 'role_id',
-        ,
-        'localizable' => false,
+        ],
+        'localizable' => FALSE,
         'sig' => 'civicrm_participant::0::role_id',
-      ,
-    );
+      ],
+    ];
     return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
   }
+
 }