Merge pull request #7531 from JKingsnorth/CRM-17261
[civicrm-core.git] / CRM / Member / PseudoConstant.php
index 9003803fd6af2b448592f392a6c203c647420634..d16e0c7cae8ca3abe4c809625b754c45d4f271b1 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | 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-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant {
 
   /**
-   * Membership types
+   * Membership types.
    * @var array
-   * @static
    */
   private static $membershipType;
 
   /**
-   * Membership types
+   * Membership types.
    * @var array
-   * @static
    */
   private static $membershipStatus;
 
   /**
-   * Get all the membership types
+   * Get all the membership types.
    *
-   * @access public
    *
    * @param int $id
    * @param bool $force
    *
-   * @return array - array reference of all membership types if any
-   * @static
+   * @return array
+   *   array reference of all membership types if any
    */
-  public static function &membershipType($id = NULL, $force = FALSE) {
+  public static function membershipType($id = NULL, $force = TRUE) {
     if (!self::$membershipType || $force) {
       CRM_Core_PseudoConstant::populate(self::$membershipType,
         'CRM_Member_DAO_MembershipType',
@@ -84,17 +81,18 @@ class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
-   * Get all the membership statuss
+   * Get all the membership statuss.
    *
-   * @access public
    *
    * @param int $id
    * @param null $cond
    * @param string $column
    * @param bool $force
    *
-   * @return array - array reference of all membership statuss if any
-   * @static
+   * @param bool $allStatus
+   *
+   * @return array
+   *    array reference of all membership statuses if any
    */
   public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE, $allStatus = FALSE) {
     if (self::$membershipStatus === NULL) {
@@ -127,15 +125,13 @@ class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant {
    * Flush given pseudoconstant so it can be reread from db
    * next 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;
     }
   }
-}
 
+}