Merge pull request #4988 from lcdservices/CRM-15849
[civicrm-core.git] / CRM / Contact / BAO / SavedSearch.php
index 8b82ca352458c03e6657f8689748249212224a2a..a42b1fe4740b33372d527355c46433b7da62ce59 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -53,7 +53,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return array
    *   contains the search name as value and and id as key
-   *
    */
   public function getAll() {
     $savedSearch = new CRM_Contact_DAO_SavedSearch();
@@ -76,7 +75,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *   (reference ) an assoc array to hold the flattened values.
    *
    * @return CRM_Contact_BAO_SavedSearch
-   * @static
    */
   public static function retrieve(&$params, &$defaults) {
     $savedSearch = new CRM_Contact_DAO_SavedSearch();
@@ -96,7 +94,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return array
    *   the values of the posted saved search
-   * @static
    */
   public static function &getFormValues($id) {
     $fv = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $id, 'form_values');
@@ -163,7 +160,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return string
    *   the where clause for this saved search
-   * @static
    */
   public static function whereClause($id, &$tables, &$whereTables) {
     $params = self::getSearchParams($id);
@@ -172,8 +168,8 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
         // this has not yet been implemented
       }
       else {
-      return CRM_Contact_BAO_Query::getWhereClause($params, NULL, $tables, $whereTables);
-    }
+        return CRM_Contact_BAO_Query::getWhereClause($params, NULL, $tables, $whereTables);
+      }
     }
     return NULL;
   }
@@ -216,8 +212,8 @@ WHERE  $where";
       }
       else {
         $tables = $whereTables = array('civicrm_contact' => 1, 'civicrm_email' => 1);
-        $where  = CRM_Contact_BAO_SavedSearch::whereClause($id, $tables, $whereTables);
-        $from   = CRM_Contact_BAO_Query::fromClause($whereTables);
+        $where = CRM_Contact_BAO_SavedSearch::whereClause($id, $tables, $whereTables);
+        $from = CRM_Contact_BAO_Query::fromClause($whereTables);
         return array($from, $where);
       }
     }
@@ -258,8 +254,6 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
         $this->where_tables = serialize($whereTables);
       }
     }
-
-    return;
   }
 
   public function save() {
@@ -279,7 +273,6 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
    *
    * @return string
    *   the name of the saved search
-   * @static
    */
   public static function getName($id, $value = 'name') {
     $group = new CRM_Contact_DAO_Group();
@@ -314,4 +307,5 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
 
     return $savedSearch;
   }
+
 }