Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-04-18-48-05
[civicrm-core.git] / CRM / Utils / PseudoConstant.php
index 8587f14ff355398f472febd053bc2735b9ddd475..2409cdbd2fdc516cb99c7532c80f0346b8bccb00 100644 (file)
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * Utilities for manipulating/inspecting CRM_*_PseudoConstant classes
  */
 class CRM_Utils_PseudoConstant {
-  /*
-   * CiviCRM pseudoconstant classes for wrapper functions
+  /**
+   * CiviCRM pseudoconstant classes for wrapper functions.
    */
   private static $constantClasses = array(
     'CRM_Core_PseudoConstant',
@@ -45,13 +45,12 @@ class CRM_Utils_PseudoConstant {
   private static $constants = NULL;
 
   /**
-   * Get constant
+   * Get constant.
    *
    * Wrapper for Pseudoconstant methods. We use this so the calling function
    * doesn't need to know which class the Pseudoconstant is on
    * (some are on the Contribute_Pseudoconsant Class etc
    *
-   * @static
    *
    * @param $constant
    *
@@ -66,13 +65,12 @@ class CRM_Utils_PseudoConstant {
   }
 
   /**
-   * Flush constant
+   * Flush constant.
    *
    * Wrapper for Pseudoconstant methods. We use this so the calling function
    * doesn't need to know which class the Pseudoconstant is on
    * (some are on the Contribute_Pseudoconsant Class etc
    *
-   * @static
    *
    * @param $constant
    *
@@ -92,7 +90,7 @@ class CRM_Utils_PseudoConstant {
   }
 
   /**
-   * Determine where a constant lives
+   * Determine where a constant lives.
    *
    * If there's a full, preloaded map, use it. Otherwise, use search
    * class space.
@@ -122,7 +120,7 @@ class CRM_Utils_PseudoConstant {
    * This may be inefficient and should generally be avoided.
    *
    * @return array
-   *   of string, constant names
+   *   Array of string, constant names
    */
   public static function findConstants() {
     if (self::$constants === NULL) {
@@ -145,7 +143,7 @@ class CRM_Utils_PseudoConstant {
    * @param $class
    *
    * @return array
-   *   of string, constant names
+   *   Array of string, constant names
    */
   public static function findConstantsByClass($class) {
     $clazz = new ReflectionClass($class);
@@ -168,4 +166,5 @@ class CRM_Utils_PseudoConstant {
     }
     CRM_Core_PseudoConstant::flush();
   }
+
 }