INFRA-132 - Cleanup generated dao docblocks
[civicrm-core.git] / CRM / Core / OptionGroup.php
index 0a268cb7dec417c225bfda0b07283edd9740a4d0..596450b398456d742896ed6f1e3ec062f351590b 100644 (file)
@@ -36,7 +36,7 @@ class CRM_Core_OptionGroup {
   static $_values = array();
   static $_cache = array();
 
-  /*
+  /**
    * $_domainIDGroups array maintains the list of option groups for whom
    * domainID is to be considered.
    */
@@ -113,7 +113,6 @@ class CRM_Core_OptionGroup {
    *
    * @return array
    *   the values as specified by the above params
-   * @static
    * @void
    */
   static function &values(
@@ -219,8 +218,7 @@ WHERE  v.option_group_id = g.id
    * @param bool $fresh
    *
    * @return array
-   *   of values as specified by the above params
-   * @static
+   *   Array of values as specified by the above params
    * @void
    */
   public static function &valuesByID($id, $flip = FALSE, $grouping = FALSE, $localize = FALSE, $labelColumnName = 'label', $onlyActive = TRUE, $fresh = FALSE) {
@@ -277,7 +275,6 @@ WHERE  v.option_group_id = g.id
    *
    * @return void
    *
-   * @static
    */
   public static function lookupValues(&$params, &$names, $flip = FALSE) {
     foreach ($names as $postName => $value) {
@@ -304,14 +301,14 @@ WHERE  v.option_group_id = g.id
           }
 
           if ($flip) {
-            $p        = array(1 => array($postValue, 'String'));
+            $p = array(1 => array($postValue, 'String'));
             $lookupBy = 'v.label= %1';
-            $select   = "v.value";
+            $select = "v.value";
           }
           else {
-            $p        = array(1 => array($postValue, 'Integer'));
+            $p = array(1 => array($postValue, 'Integer'));
             $lookupBy = 'v.value = %1';
-            $select   = "v.label";
+            $select = "v.label";
           }
 
           $p[2] = array($value['groupName'], 'String');
@@ -358,7 +355,7 @@ WHERE  v.option_group_id = g.id
       $query .= " AND  v.is_active = 1 ";
     }
     $p = array(
-    1 => array($groupName, 'String'),
+      1 => array($groupName, 'String'),
       2 => array($value, 'Integer'),
     );
     $dao = CRM_Core_DAO::executeQuery($query, $p);
@@ -400,7 +397,7 @@ WHERE  v.option_group_id = g.id
 ";
 
     $p = array(
-    1 => array($groupName, 'String'),
+      1 => array($groupName, 'String'),
       2 => array($label, $labelType),
     );
     $dao = CRM_Core_DAO::executeQuery($query, $p);
@@ -418,7 +415,6 @@ WHERE  v.option_group_id = g.id
    * @param string $groupName
    *   The name of the option group.
    *
-   * @static
    *
    * @return string
    *   the value from the row where is_default = true
@@ -467,7 +463,6 @@ WHERE  v.option_group_id = g.id
    * @param null $groupTitle
    *   The optional label of the option group else set to group name.
    *
-   * @static
    *
    * @return int
    *   the option group ID
@@ -475,11 +470,11 @@ WHERE  v.option_group_id = g.id
   public static function createAssoc($groupName, &$values, &$defaultID, $groupTitle = NULL) {
     self::deleteAssoc($groupName);
     if (!empty($values)) {
-      $group              = new CRM_Core_DAO_OptionGroup();
-      $group->name        = $groupName;
-      $group->title       = empty($groupTitle) ? $groupName : $groupTitle;
+      $group = new CRM_Core_DAO_OptionGroup();
+      $group->name = $groupName;
+      $group->title = empty($groupTitle) ? $groupName : $groupTitle;
       $group->is_reserved = 1;
-      $group->is_active   = 1;
+      $group->is_active = 1;
       $group->save();
 
       foreach ($values as $v) {
@@ -584,7 +579,7 @@ SELECT v.label
    AND g.name  = %1
    AND v.value = %2";
     $params = array(
-    1 => array($groupName, 'String'),
+      1 => array($groupName, 'String'),
       2 => array($value, 'String'),
     );
     return CRM_Core_DAO::singleValueQuery($query, $params);
@@ -618,7 +613,7 @@ WHERE  v.option_group_id = g.id
     }
 
     $p = array(
-    1 => array($groupName, 'String'),
+      1 => array($groupName, 'String'),
       2 => array($fieldValue, $fieldType),
     );
     $dao = CRM_Core_DAO::executeQuery($query, $p);
@@ -626,14 +621,20 @@ WHERE  v.option_group_id = g.id
 
     if ($dao->fetch()) {
       foreach (array(
-        'id', 'name', 'value', 'label', 'weight', 'description') as $fld) {
+                 'id',
+                 'name',
+                 'value',
+                 'label',
+                 'weight',
+                 'description'
+               ) as $fld) {
         $row[$fld] = $dao->$fld;
       }
     }
     return $row;
   }
 
-  /*
+  /**
    * Wrapper for calling values with fresh set to true to empty the given value
    *
    * Since there appears to be some inconsistency
@@ -641,9 +642,8 @@ WHERE  v.option_group_id = g.id
    * (for example CRM_Contribution_Pseudoconstant::paymentInstrument doesn't specify isActive
    * which is part of the cache key
    * will do a couple of variations & aspire to someone cleaning it up later
-   */
-  /**
-   * @param $name
+   *
+   * @param string $name
    * @param array $params
    */
   public static function flush($name, $params = array()) {