INFRA-132 - Move stray comments into docblocks
[civicrm-core.git] / CRM / Report / Utils / Get.php
index b8b4fd61e28da396bc29bd609709e819aa6f5448..17cbbce44e8df5b673d0a93ee8bad68d3dd38733 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  */
 class CRM_Report_Utils_Get {
 
-  static function getTypedValue($name, $type) {
+  /**
+   * @param string $name
+   * @param $type
+   *
+   * @return mixed|null
+   */
+  public static function getTypedValue($name, $type) {
     $value = CRM_Utils_Array::value($name, $_GET);
     if ($value === NULL) {
       return NULL;
@@ -46,7 +52,12 @@ class CRM_Report_Utils_Get {
     );
   }
 
-  static function dateParam($fieldName, &$field, &$defaults) {
+  /**
+   * @param string $fieldName
+   * @param $field
+   * @param $defaults
+   */
+  public static function dateParam($fieldName, &$field, &$defaults) {
     // type = 12 (datetime) is not recognized by Utils_Type::escape() method,
     // and therefore the below hack
     $type = 4;
@@ -84,7 +95,12 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  static function stringParam($fieldName, &$field, &$defaults) {
+  /**
+   * @param string $fieldName
+   * @param $field
+   * @param $defaults
+   */
+  public static function stringParam($fieldName, &$field, &$defaults) {
     $fieldOP = CRM_Utils_Array::value("{$fieldName}_op", $_GET, 'like');
 
     switch ($fieldOP) {
@@ -105,6 +121,7 @@ class CRM_Report_Utils_Get {
       case 'nnll':
         $defaults["{$fieldName}_op"] = $fieldOP;
         break;
+
       case 'in':
       case 'notin':
       case 'mhas':
@@ -117,7 +134,12 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  static function intParam($fieldName, &$field, &$defaults) {
+  /**
+   * @param string $fieldName
+   * @param $field
+   * @param $defaults
+   */
+  public static function intParam($fieldName, &$field, &$defaults) {
     $fieldOP = CRM_Utils_Array::value("{$fieldName}_op", $_GET, 'eq');
 
     switch ($fieldOP) {
@@ -168,15 +190,24 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  static function processChart(&$defaults) {
+  /**
+   * @param $defaults
+   */
+  public static function processChart(&$defaults) {
     $chartType = CRM_Utils_Array::value("charts", $_GET);
     if (in_array($chartType, array(
-      'barChart', 'pieChart'))) {
+      'barChart',
+      'pieChart'
+    ))) {
       $defaults["charts"] = $chartType;
     }
   }
 
-  static function processFilter(&$fieldGrp, &$defaults) {
+  /**
+   * @param $fieldGrp
+   * @param $defaults
+   */
+  public static function processFilter(&$fieldGrp, &$defaults) {
     // process only filters for now
     foreach ($fieldGrp as $tableName => $fields) {
       foreach ($fields as $fieldName => $field) {
@@ -201,8 +232,11 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  //unset default filters
-  static function unsetFilters(&$defaults) {
+  /**
+   * unset default filters
+   * @param $defaults
+   */
+  public static function unsetFilters(&$defaults) {
     static $unsetFlag = TRUE;
     if ($unsetFlag) {
       foreach ($defaults as $field_name => $field_value) {
@@ -219,7 +253,11 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  static function processGroupBy(&$fieldGrp, &$defaults) {
+  /**
+   * @param $fieldGrp
+   * @param $defaults
+   */
+  public static function processGroupBy(&$fieldGrp, &$defaults) {
     // process only group_bys for now
     $flag = FALSE;
 
@@ -243,7 +281,11 @@ class CRM_Report_Utils_Get {
     }
   }
 
-  static function processFields(&$reportFields, &$defaults) {
+  /**
+   * @param $reportFields
+   * @param $defaults
+   */
+  public static function processFields(&$reportFields, &$defaults) {
     //add filters from url
     if (is_array($reportFields)) {
       if ($urlFields = CRM_Utils_Array::value("fld", $_GET)) {
@@ -265,4 +307,3 @@ class CRM_Report_Utils_Get {
     }
   }
 }
-