INFRA-132 - Change "else if" to "elseif"
[civicrm-core.git] / CRM / Contribute / PseudoConstant.php
index 53454a706909666a8a45e91d678cd0eff6de0720..3e6420392205246066597d45d036a31c7cf13f8e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -61,11 +61,11 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    */
   private static $financialAccount;
 
-    /**
-   * Contribution pages
-   * @var array
-   * @static
-   */
+  /**
+     * Contribution pages
+     * @var array
+     * @static
+     */
   private static $contributionPageActive = NULL;
 
   /**
@@ -117,7 +117,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * Get all the financial types
    *
-   * @access public
    *
    * @param int $id
    *
@@ -149,7 +148,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * Get all the financial Accounts
    *
-   * @access public
    *
    * @param int $id
    * @param int $financialAccountTypeId
@@ -160,7 +158,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    * @static
    */
   public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') {
-    $condition = NUll;
+    $condition = NULL;
     if ($financialAccountTypeId) {
       $condition = " financial_account_type_id = ". $financialAccountTypeId;
     }
@@ -189,15 +187,14 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    * Flush given pseudoconstant so it can be reread from db
    * nex time it's requested.
    *
-   * @access public
    * @static
    *
    * @param bool|string $name pseudoconstant to be flushed
    */
   public static function flush($name = 'cache') {
-   if (isset(self::$$name)) {
+    if (isset(self::$$name)) {
       self::$$name = NULL;
-    }
+   }
   }
 
   /**
@@ -205,10 +202,11 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * Get all the contribution pages
    *
-   * @param integer $id  id of the contribution page
-   * @param boolean $all do we want all pages or only active pages
+   * @param int $id
+   *   Id of the contribution page.
+   * @param bool $all
+   *   Do we want all pages or only active pages.
    *
-   * @access public
    *
    * @return array - array reference of all contribution pages if any
    * @static
@@ -239,7 +237,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * Get all the payment instruments
    *
-   * @access public
    *
    * @param string $columnName
    *
@@ -259,7 +256,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the valid accepted credit cards
    *
-   * @access public
    *
    * @return array - array reference of all payment instruments if any
    * @static
@@ -271,7 +267,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all premiums
    *
-   * @access public
    *
    * @param int $pageID
    * @return array - array of all Premiums if any
@@ -319,7 +314,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the contribution statuses
    *
-   * @access public
    *
    * @param int $id
    * @param string $columnName
@@ -344,7 +338,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the Personal campaign pages
    *
-   * @access public
    *
    * @param null $pageType
    * @param int $id
@@ -378,7 +371,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * The static array pcpStatus is returned
    *
-   * @access public
    * @static
    *
    * @param string $column
@@ -403,7 +395,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * The static array  $financialTypeAccount is returned
    *
-   * @access public
    * @static
    *
    * @param int $financialTypeId
@@ -416,7 +407,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
       CRM_Core_PseudoConstant::populate(
         self::$financialTypeAccount[$financialTypeId],
         'CRM_Financial_DAO_EntityFinancialAccount',
-        $all = true,
+        $all = TRUE,
         $retrieve = 'financial_account_id',
         $filter = NULL,
         $condition,
@@ -435,7 +426,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all batches
    *
-   * @access public
    *
    * @param int $id
    * @return array - array reference of all batches if any
@@ -462,4 +452,3 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
     return self::$batch;
   }
 }
-