INFRA-132 - Remove white space after an opening "(" or before a closing ")"
[civicrm-core.git] / CRM / Dedupe / BAO / QueryBuilder / IndividualUnsupervised.php
index 02056e3007f4bc41a0cdf824a9d869c00569c1ec..fc05be3f70f025415fc88584fa32d99fe2d27814 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
-| CiviCRM version 4.4                                                |
+| CiviCRM version 4.6                                                |
 +--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2013                                |
+| Copyright CiviCRM LLC (c) 2004-2014                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
 */
+
+/**
+ * Class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised
+ */
 class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_QueryBuilder {
 
-  static function record($rg) {
+  /**
+   * @param $rg
+   *
+   * @return array
+   */
+  public static function record($rg) {
     $civicrm_email = CRM_Utils_Array::value('civicrm_email', $rg->params, array());
 
     $params = array(
@@ -43,7 +52,12 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_
     );
   }
 
-  static function internal($rg) {
+  /**
+   * @param $rg
+   *
+   * @return array
+   */
+  public static function internal($rg) {
     $query = "
             SELECT contact1.id as id1, contact2.id as id2, {$rg->threshold} as weight
             FROM civicrm_contact as contact1
@@ -61,7 +75,7 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_
    * An alternative version which might perform a lot better
    * than the above. Will need to do some testing
    */
-  static function internalOptimized($rg) {
+  public static function internalOptimized($rg) {
     $sql = "
 CREATE TEMPORARY TABLE emails (
                                email varchar(255),
@@ -79,7 +93,7 @@ INSERT INTO emails
     FROM civicrm_email as email1
     JOIN civicrm_email as email2 USING (email)
     WHERE email1.contact_id < email2.contact_id
-    AND  " . self::internalFilters($rg, "email1.contact_id", "email2.contact_id" );
+    AND  " . self::internalFilters($rg, "email1.contact_id", "email2.contact_id");
     CRM_Core_DAO::executeQuery($sql);
 
     $query = "
@@ -94,6 +108,3 @@ AND    " . self::internalFilters($rg);
     return array("civicrm_contact.{$rg->name}.{$rg->threshold}" => $query);
   }
 };
-
-
-