INFRA-132 - Cleanup generated dao docblocks
[civicrm-core.git] / CRM / Core / PseudoConstant.php
index 69e4be356d91e424f71792df7212a17c2c08bd0e..7a5665f4525aabf039b2e8babd31a120071f8816 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Core_PseudoConstant {
 
   /**
-   * static cache for pseudoconstant arrays
+   * Static cache for pseudoconstant arrays
    * @var array
-   * @static
    */
   private static $cache;
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * activity type
    * @var array
-   * @static
    */
   private static $activityType;
 
   /**
-   * states, provinces
+   * States, provinces
    * @var array
-   * @static
    */
   private static $stateProvince;
 
   /**
-   * counties
+   * Counties
    * @var array
-   * @static
    */
   private static $county;
 
   /**
-   * states/provinces abbreviations
+   * States/provinces abbreviations
    * @var array
-   * @static
    */
   private static $stateProvinceAbbreviation;
 
   /**
-   * country
+   * Country
    * @var array
-   * @static
    */
   private static $country;
 
   /**
-   * countryIsoCode
+   * CountryIsoCode
    * @var array
-   * @static
    */
   private static $countryIsoCode;
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * group
    * @var array
-   * @static
    */
   private static $group;
 
   /**
-   * groupIterator
+   * GroupIterator
    * @var mixed
-   * @static
    */
   private static $groupIterator;
 
   /**
-   * relationshipType
+   * RelationshipType
    * @var array
-   * @static
    */
   private static $relationshipType;
 
   /**
-   * civicrm groups that are not smart groups
+   * Civicrm groups that are not smart groups
    * @var array
-   * @static
    */
   private static $staticGroup;
 
   /**
-   * currency codes
+   * Currency codes
    * @var array
-   * @static
    */
   private static $currencyCode;
 
   /**
-   * payment processor
+   * Payment processor
    * @var array
-   * @static
    */
   private static $paymentProcessor;
 
   /**
-   * payment processor types
+   * Payment processor types
    * @var array
-   * @static
    */
   private static $paymentProcessorType;
 
   /**
    * World Region
    * @var array
-   * @static
    */
   private static $worldRegions;
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * activity status
    * @var array
-   * @static
    */
   private static $activityStatus;
 
   /**
    * Visibility
    * @var array
-   * @static
    */
   private static $visibility;
 
   /**
    * Greetings
    * @var array
-   * @static
    */
   private static $greeting;
 
   /**
    * Default Greetings
    * @var array
-   * @static
    */
   private static $greetingDefaults;
 
   /**
    * Extensions of type module
    * @var array
-   * @static
    */
   private static $extensions;
 
   /**
    * Financial Account Type
    * @var array
-   * @static
    */
   private static $accountOptionValues;
 
   /**
    * Tax Rates
    * @var array
-   * @static
    */
   private static $taxRates;
 
@@ -214,9 +192,9 @@ class CRM_Core_PseudoConstant {
    * NOTE: Rather than calling this function directly use CRM_*_BAO_*::buildOptions()
    * @see http://wiki.civicrm.org/confluence/display/CRMDOC/Pseudoconstant+%28option+list%29+Reference
    *
-   * @param String $daoName
-   * @param String $fieldName
-   * @param Array $params
+   * @param string $daoName
+   * @param string $fieldName
+   * @param array $params
    * - name       string  name of the option group
    * - flip       boolean results are return in id => label format if false
    *                            if true, the results are reversed
@@ -228,11 +206,11 @@ class CRM_Core_PseudoConstant {
    * - orderColumn string the column to use for sorting, defaults to 'weight' column if one exists, else defaults to labelColumn
    * - onlyActive boolean return only the action option values
    * - fresh      boolean ignore cache entries and go back to DB
-   * @param String $context: Context string
+   * @param string $context : Context string
    *
-   * @return Array|bool - array on success, FALSE on error.
+   * @return Array|bool
+   *   array on success, FALSE on error.
    *
-   * @static
    */
   public static function get($daoName, $fieldName, $params = array(), $context = NULL) {
     CRM_Core_DAO::buildOptionsContext($context);
@@ -295,7 +273,7 @@ class CRM_Core_PseudoConstant {
       $pseudoconstant = $fieldSpec['pseudoconstant'];
 
       // if callback is specified..
-      if(!empty($pseudoconstant['callback'])) {
+      if (!empty($pseudoconstant['callback'])) {
         list($className, $fnName) = explode('::', $pseudoconstant['callback']);
         if (method_exists($className, $fnName)) {
           return call_user_func(array($className, $fnName));
@@ -310,7 +288,7 @@ class CRM_Core_PseudoConstant {
       );
 
       // Fetch option group from option_value table
-      if(!empty($pseudoconstant['optionGroupName'])) {
+      if (!empty($pseudoconstant['optionGroupName'])) {
         if ($context == 'validate') {
           $params['labelColumn'] = 'name';
         }
@@ -380,9 +358,9 @@ class CRM_Core_PseudoConstant {
             $wheres[] = 'domain_id = ' . CRM_Core_Config::domainID();
           }
           $queryParams = array(
-             1 => array($params['keyColumn'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
-             2 => array($params['labelColumn'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
-             3 => array($pseudoconstant['table'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
+            1 => array($params['keyColumn'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
+            2 => array($params['labelColumn'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
+            3 => array($pseudoconstant['table'], 'String', CRM_Core_DAO::QUERY_FORMAT_NO_QUOTES),
           );
           // Add orderColumn param
           if (!empty($params['orderColumn'])) {
@@ -443,9 +421,9 @@ class CRM_Core_PseudoConstant {
   /**
    * Fetch the translated label for a field given its key
    *
-   * @param String $baoName
-   * @param String $fieldName
-   * @param String|Int $key
+   * @param string $baoName
+   * @param string $fieldName
+   * @param string|Int $key
    *
    * TODO: Accept multivalued input?
    *
@@ -454,7 +432,7 @@ class CRM_Core_PseudoConstant {
    *   NULL if the given key has no corresponding option
    *   String if label is found
    */
-  static function getLabel($baoName, $fieldName, $key) {
+  public static function getLabel($baoName, $fieldName, $key) {
     $values = $baoName::buildOptions($fieldName, 'get');
     if ($values === FALSE) {
       return FALSE;
@@ -465,16 +443,16 @@ class CRM_Core_PseudoConstant {
   /**
    * Fetch the machine name for a field given its key
    *
-   * @param String $baoName
-   * @param String $fieldName
-   * @param String|Int $key
+   * @param string $baoName
+   * @param string $fieldName
+   * @param string|Int $key
    *
    * @return bool|null|string
    *   FALSE if the given field has no associated option list
    *   NULL if the given key has no corresponding option
    *   String if label is found
    */
-  static function getName($baoName, $fieldName, $key) {
+  public static function getName($baoName, $fieldName, $key) {
     $values = $baoName::buildOptions($fieldName, 'validate');
     if ($values === FALSE) {
       return FALSE;
@@ -485,16 +463,16 @@ class CRM_Core_PseudoConstant {
   /**
    * Fetch the key for a field option given its name
    *
-   * @param String $baoName
-   * @param String $fieldName
-   * @param String|Int $value
+   * @param string $baoName
+   * @param string $fieldName
+   * @param string|Int $value
    *
    * @return bool|null|string|number
    *   FALSE if the given field has no associated option list
    *   NULL if the given key has no corresponding option
    *   String|Number if key is found
    */
-  static function getKey($baoName, $fieldName, $value) {
+  public static function getKey($baoName, $fieldName, $value) {
     $values = $baoName::buildOptions($fieldName, 'validate');
     if ($values === FALSE) {
       return FALSE;
@@ -507,7 +485,7 @@ class CRM_Core_PseudoConstant {
    * @param $fieldSpec
    * @return string|null
    */
-  static function getOptionEditUrl($fieldSpec) {
+  public static function getOptionEditUrl($fieldSpec) {
     // If it's an option group, that's easy
     if (!empty($fieldSpec['pseudoconstant']['optionGroupName'])) {
       return 'civicrm/admin/options/' . $fieldSpec['pseudoconstant']['optionGroupName'];
@@ -531,27 +509,31 @@ class CRM_Core_PseudoConstant {
 
   /**
    * DEPRECATED generic populate method
-   * All pseudoconstant functions that use this method are also deprecated.
+   * All pseudoconstant functions that use this method are also @deprecated
    *
    * The static array $var is populated from the db
    * using the <b>$name DAO</b>.
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param array $var the associative array we will fill
-   * @param string $name the name of the DAO
-   * @param boolean $all get all objects. default is to get only active ones.
-   * @param string $retrieve the field that we are interested in (normally name, differs in some objects)
-   * @param string $filter the field that we want to filter the result set with
-   * @param string $condition the condition that gets passed to the final query as the WHERE clause
+   * @param array $var
+   *   The associative array we will fill.
+   * @param string $name
+   *   The name of the DAO.
+   * @param bool $all
+   *   Get all objects. default is to get only active ones.
+   * @param string $retrieve
+   *   The field that we are interested in (normally name, differs in some objects).
+   * @param string $filter
+   *   The field that we want to filter the result set with.
+   * @param string $condition
+   *   The condition that gets passed to the final query as the WHERE clause.
    *
    * @param null $orderby
    * @param string $key
    * @param null $force
    *
    * @return void
-   * @access public
-   * @static
    */
   public static function populate(
     &$var,
@@ -565,13 +547,13 @@ class CRM_Core_PseudoConstant {
     $force = NULL
   ) {
     $cacheKey = "CRM_PC_{$name}_{$all}_{$key}_{$retrieve}_{$filter}_{$condition}_{$orderby}";
-    $cache    = CRM_Utils_Cache::singleton();
-    $var      = $cache->get($cacheKey);
+    $cache = CRM_Utils_Cache::singleton();
+    $var = $cache->get($cacheKey);
     if ($var && empty($force)) {
       return $var;
     }
 
-    $object = new $name ( );
+    $object = new $name ();
 
     $object->selectAdd();
     $object->selectAdd("$key, $retrieve");
@@ -603,8 +585,6 @@ class 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
    */
@@ -618,18 +598,15 @@ class CRM_Core_PseudoConstant {
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * Get all Activty types.
    *
    * The static array activityType is returned
    *
-   * @internal param bool $all - get All Activity  types - default is to get only active ones.
    *
-   * @access public
-   * @static
-   *
-   * @return array - array reference of all activity types.
+   * @return array
+   *   array reference of all activity types.
    */
   public static function &activityType() {
     $args = func_get_args();
@@ -701,14 +678,13 @@ class CRM_Core_PseudoConstant {
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @access public
-   * @static
    *
-   * @param bool|int $id -  Optional id to return
+   * @param bool|int $id - Optional id to return
    *
    * @param bool $limit
    *
-   * @return array - array reference of all State/Provinces.
+   * @return array
+   *   array reference of all State/Provinces.
    */
   public static function &stateProvince($id = FALSE, $limit = TRUE) {
     if (($id && !CRM_Utils_Array::value($id, self::$stateProvince)) || !self::$stateProvince || !$id) {
@@ -716,8 +692,8 @@ class CRM_Core_PseudoConstant {
       $config = CRM_Core_Config::singleton();
       if ($limit) {
         $countryIsoCodes = self::countryIsoCode();
-        $limitCodes      = $config->provinceLimit();
-        $limitIds        = array();
+        $limitCodes = $config->provinceLimit();
+        $limitIds = array();
         foreach ($limitCodes as $code) {
           $limitIds = array_merge($limitIds, array_keys($countryIsoCodes, $code));
         }
@@ -735,8 +711,8 @@ class CRM_Core_PseudoConstant {
       if ($tsLocale != '' and $tsLocale != 'en_US') {
         $i18n = CRM_Core_I18n::singleton();
         $i18n->localizeArray(self::$stateProvince, array(
-            'context' => 'province',
-          ));
+          'context' => 'province',
+        ));
         self::$stateProvince = CRM_Utils_Array::asort(self::$stateProvince);
       }
     }
@@ -757,14 +733,13 @@ class CRM_Core_PseudoConstant {
    *
    * Same as above, except gets the abbreviations instead of the names.
    *
-   * @access public
-   * @static
    *
-   * @param bool|int $id -     Optional id to return
+   * @param bool|int $id - Optional id to return
    *
    * @param bool $limit
    *
-   * @return array - array reference of all State/Province abbreviations.
+   * @return array
+   *   array reference of all State/Province abbreviations.
    */
   public static function &stateProvinceAbbreviation($id = FALSE, $limit = TRUE) {
     if ($id > 1) {
@@ -786,10 +761,10 @@ WHERE  id = %1";
       $whereClause = FALSE;
 
       if ($limit) {
-        $config          = CRM_Core_Config::singleton();
+        $config = CRM_Core_Config::singleton();
         $countryIsoCodes = self::countryIsoCode();
-        $limitCodes      = $config->provinceLimit();
-        $limitIds        = array();
+        $limitCodes = $config->provinceLimit();
+        $limitIds = array();
         foreach ($limitCodes as $code) {
           $tmpArray = array_keys($countryIsoCodes, $code);
 
@@ -825,14 +800,13 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @access public
-   * @static
    *
    * @param bool|int $id - Optional id to return
    *
    * @param bool $applyLimit
    *
-   * @return array - array reference of all countries.
+   * @return array
+   *   array reference of all countries.
    */
   public static function country($id = FALSE, $applyLimit = TRUE) {
     if (($id && !CRM_Utils_Array::value($id, self::$country)) || !self::$country || !$id) {
@@ -878,8 +852,8 @@ WHERE  id = %1";
       if ($tsLocale != '' and $tsLocale != 'en_US') {
         $i18n = CRM_Core_I18n::singleton();
         $i18n->localizeArray(self::$country, array(
-            'context' => 'country',
-          ));
+          'context' => 'country',
+        ));
         self::$country = CRM_Utils_Array::asort(self::$country);
       }
     }
@@ -903,12 +877,11 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @access public
-   * @static
    *
    * @param bool $id
    *
-   * @return array - array reference of all country ISO codes.
+   * @return array
+   *   array reference of all country ISO codes.
    */
   public static function &countryIsoCode($id = FALSE) {
     if (!self::$countryIsoCode) {
@@ -926,7 +899,7 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * Get all groups from database
    *
@@ -936,13 +909,14 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param string $groupType type of group(Access/Mailing)
-   * @param bool|\boolen $excludeHidden exclude hidden groups.
+   * @param string $groupType
+   *   Type of group(Access/Mailing).
+   * @param bool $excludeHidden
+   *   Exclude hidden groups.
    *
-   * @access public
-   * @static
    *
-   * @return array - array reference of all groups.
+   * @return array
+   *   array reference of all groups.
    */
   public static function &allGroup($groupType = NULL, $excludeHidden = TRUE) {
     $condition = CRM_Contact_BAO_Group::groupTypeCondition($groupType, $excludeHidden);
@@ -968,19 +942,15 @@ WHERE  id = %1";
    * called for the first time
    *
    *
-   * @access public
-   * @static
    *
    * @param bool $styledLabels
    *
-   * @return mixed - instance of CRM_Contact_BAO_GroupNesting
+   * @return CRM_Contact_BAO_GroupNesting
    */
   public static function &groupIterator($styledLabels = FALSE) {
     if (!self::$groupIterator) {
-      /*
-        When used as an object, GroupNesting implements Iterator
-        and iterates nested groups in a logical manner for us
-      */
+      // When used as an object, GroupNesting implements Iterator
+      // and iterates nested groups in a logical manner for us
       self::$groupIterator = new CRM_Contact_BAO_GroupNesting($styledLabels);
     }
     return self::$groupIterator;
@@ -995,13 +965,14 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param string $groupType type of group(Access/Mailing)
-   * @param bool $excludeHidden exclude hidden groups.
+   * @param string $groupType
+   *   Type of group(Access/Mailing).
+   * @param bool $excludeHidden
+   *   Exclude hidden groups.
    *
-   * @access public
-   * @static
    *
-   * @return array - array reference of all groups.
+   * @return array
+   *   array reference of all groups.
    */
   public static function group($groupType = NULL, $excludeHidden = TRUE) {
     return CRM_Core_Permission::group($groupType, $excludeHidden);
@@ -1028,14 +999,13 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @access public
-   * @static
    *
    * @param bool $onlyPublic
    * @param null $groupType
    * @param bool $excludeHidden
    *
-   * @return array - array reference of all groups.
+   * @return array
+   *   array reference of all groups.
    */
   public static function &staticGroup($onlyPublic = FALSE, $groupType = NULL, $excludeHidden = TRUE) {
     if (!self::$staticGroup) {
@@ -1067,13 +1037,14 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param string $valueColumnName db column name/label.
-   * @param boolean $reset          reset relationship types if true
+   * @param string $valueColumnName
+   *   Db column name/label.
+   * @param bool $reset
+   *   Reset relationship types if true.
    *
-   * @access public
-   * @static
    *
-   * @return array - array reference of all relationship types.
+   * @return array
+   *   array reference of all relationship types.
    */
   public static function &relationshipType($valueColumnName = 'label', $reset = FALSE) {
     if (!CRM_Utils_Array::value($valueColumnName, self::$relationshipType) || $reset) {
@@ -1106,14 +1077,13 @@ WHERE  id = %1";
   }
 
   /**
-   * get all the ISO 4217 currency codes
+   * Get all the ISO 4217 currency codes
    *
    * so far, we use this for validation only, so there's no point of putting this into the database
    *
-   * @access public
    *
-   * @return array - array reference of all currency codes
-   * @static
+   * @return array
+   *   array reference of all currency codes
    */
   public static function &currencyCode() {
     if (!self::$currencyCode) {
@@ -1399,12 +1369,11 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @access public
-   * @static
    *
-   * @param bool|int $id -  Optional id to return
+   * @param bool|int $id - Optional id to return
    *
-   * @return array - array reference of all Counties
+   * @return array
+   *   array reference of all Counties
    */
   public static function &county($id = FALSE) {
     if (!self::$county) {
@@ -1425,20 +1394,21 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    * Get all active payment processors
    *
    * The static array paymentProcessor is returned
    *
-   * @access public
-   * @static
    *
-   * @param boolean $all - get payment processors     - default is to get only active ones.
-   * @param boolean $test - get test payment processors
+   * @param bool $all
+   *   Get payment processors - default is to get only active ones.
+   * @param bool $test
+   *   Get test payment processors.
    *
    * @param null $additionalCond
    *
-   * @return array - array of all payment processors
+   * @return array
+   *   array of all payment processors
    */
   public static function &paymentProcessor($all = FALSE, $test = FALSE, $additionalCond = NULL) {
     $condition = "is_test = ";
@@ -1461,22 +1431,22 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * The static array paymentProcessorType is returned
    *
-   * @access public
-   * @static
    *
-   * @param boolean $all - get payment processors     - default is to get only active ones.
+   * @param bool $all
+   *   Get payment processors - default is to get only active ones.
    *
-   * @param null $id
+   * @param int $id
    * @param string $return
    *
-   * @return array - array of all payment processor types
+   * @return array
+   *   array of all payment processor types
    */
   public static function &paymentProcessorType($all = FALSE, $id = NULL, $return = 'title') {
-    $cacheKey = $id . '_' .$return;
+    $cacheKey = $id . '_' . $return;
     if (empty(self::$paymentProcessorType[$cacheKey])) {
       self::populate(self::$paymentProcessorType[$cacheKey], 'CRM_Financial_DAO_PaymentProcessorType', $all, $return, 'is_active', NULL, "is_default, $return", 'id');
     }
@@ -1489,12 +1459,11 @@ WHERE  id = %1";
   /**
    * Get all the World Regions from Database
    *
-   * @access public
    *
    * @param bool $id
    *
-   * @return array - array reference of all World Regions
-   * @static
+   * @return array
+   *   array reference of all World Regions
    */
   public static function &worldRegion($id = FALSE) {
     if (!self::$worldRegions) {
@@ -1514,18 +1483,17 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * Get all Activity Statuses.
    *
    * The static array activityStatus is returned
    *
-   * @access public
-   * @static
    *
    * @param string $column
    *
-   * @return array - array reference of all activity statuses
+   * @return array
+   *   array reference of all activity statuses
    */
   public static function &activityStatus($column = 'label') {
     if (NULL === self::$activityStatus) {
@@ -1541,33 +1509,32 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    *
    * Get all Visibility levels.
    *
    * The static array visibility is returned
    *
-   * @access public
-   * @static
    *
    * @param string $column
    *
-   * @return array - array reference of all Visibility levels.
+   * @return array
+   *   array reference of all Visibility levels.
    */
   public static function &visibility($column = 'label') {
     if (!isset(self::$visibility)) {
-      self::$visibility = array( );
+      self::$visibility = array();
     }
 
     if (!isset(self::$visibility[$column])) {
       self::$visibility[$column] = CRM_Core_OptionGroup::values('visibility', FALSE, FALSE, FALSE, NULL, $column);
-  }
+    }
 
     return self::$visibility[$column];
   }
 
   /**
-   * @param $countryID
+   * @param int $countryID
    * @param string $field
    *
    * @return array
@@ -1622,7 +1589,7 @@ ORDER BY name";
   }
 
   /**
-   * @param $stateID
+   * @param int $stateID
    *
    * @return array
    */
@@ -1683,13 +1650,12 @@ ORDER BY name";
    * Given a state ID return the country ID, this allows
    * us to populate forms and values for downstream code
    *
-   * @param $stateID int
+   * @param int $stateID
    *
-   * @return int the country id that the state belongs to
-   * @static
-   * @public
+   * @return int
+   *   the country id that the state belongs to
    */
-  static function countryIDForStateID($stateID) {
+  public static function countryIDForStateID($stateID) {
     if (empty($stateID)) {
       return CRM_Core_DAO::$_nullObject;
     }
@@ -1709,14 +1675,14 @@ WHERE  id = %1
    *
    * The static array of greeting is returned
    *
-   * @access public
-   * @static
    *
-   * @param $filter - get All Email Greetings - default is to get only active ones.
+   * @param $filter
+   *   Get All Email Greetings - default is to get only active ones.
    *
    * @param string $columnName
    *
-   * @return array - array reference of all greetings.
+   * @return array
+   *   array reference of all greetings.
    */
   public static function greeting($filter, $columnName = 'label') {
     $index = $filter['greeting_type'] . '_' . $columnName;
@@ -1760,16 +1726,17 @@ WHERE  id = %1
   /**
    * Construct array of default greeting values for contact type
    *
-   * @access public
-   * @static
-   *
-   * @return array - array reference of default greetings.
    *
+   * @return array
+   *   array reference of default greetings.
    */
   public static function &greetingDefaults() {
     if (!self::$greetingDefaults) {
       $defaultGreetings = array();
-      $contactTypes = self::get('CRM_Contact_DAO_Contact', 'contact_type', array('keyColumn' => 'id', 'labelColumn' => 'name'));
+      $contactTypes = self::get('CRM_Contact_DAO_Contact', 'contact_type', array(
+          'keyColumn' => 'id',
+          'labelColumn' => 'name'
+        ));
 
       foreach ($contactTypes as $filter => $contactType) {
         $filterCondition = " AND (v.filter = 0 OR v.filter = $filter) AND v.is_default = 1 ";
@@ -1794,10 +1761,9 @@ WHERE  id = %1
    * FIXME: This is called by civix but not by any core code. We
    * should provide an API call which civix can use instead.
    *
-   * @access public
-   * @static
    *
-   * @return array - array($fullyQualifiedName => $label) list of extensions
+   * @return array
+   *   array($fullyQualifiedName => $label) list of extensions
    */
   public static function &getExtensions() {
     if (!self::$extensions) {
@@ -1821,20 +1787,20 @@ WHERE  id = %1
    *
    * The static array option values is returned
    *
-   * @access public
-   * @static
    *
-   * @param boolean $optionGroupName - get All  Option Group values- default is to get only active ones.
+   * @param bool $optionGroupName
+   *   Get All Option Group values- default is to get only active ones.
    *
-   * @param null $id
+   * @param int $id
    * @param null $condition
    *
-   * @return array - array reference of all Option Group Name
+   * @return array
+   *   array reference of all Option Group Name
    */
-  public static function accountOptionValues($optionGroupName, $id = null, $condition = null) {
+  public static function accountOptionValues($optionGroupName, $id = NULL, $condition = NULL) {
     $cacheKey = $optionGroupName . '_' . $condition;
     if (empty(self::$accountOptionValues[$cacheKey])) {
-      self::$accountOptionValues[$cacheKey] = CRM_Core_OptionGroup::values($optionGroupName, false, false, false, $condition);
+      self::$accountOptionValues[$cacheKey] = CRM_Core_OptionGroup::values($optionGroupName, FALSE, FALSE, FALSE, $condition);
     }
     if ($id) {
       return CRM_Utils_Array::value($id, self::$accountOptionValues[$cacheKey]);
@@ -1846,11 +1812,11 @@ WHERE  id = %1
   /**
    * Fetch the list of active extensions of type 'module'
    *
-   * @param $fresh bool whether to forcibly reload extensions list from canonical store
-   * @access public
-   * @static
+   * @param bool $fresh
+   *   Whether to forcibly reload extensions list from canonical store.
    *
-   * @return array - array(array('prefix' => $, 'file' => $))
+   * @return array
+   *   array(array('prefix' => $, 'file' => $))
    */
   public static function getModuleExtensions($fresh = FALSE) {
     return CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles($fresh);
@@ -1862,10 +1828,8 @@ WHERE  id = %1
    *
    * The static array tax rates is returned
    *
-   * @access public
-   * @static
-   *
-   * @return array - array list of tax rates with the financial type
+   * @return array
+   *   array list of tax rates with the financial type
    */
   public static function getTaxRates() {
     if (!self::$taxRates) {
@@ -1889,4 +1853,3 @@ WHERE  id = %1
     return self::$taxRates;
   }
 }
-