CRM-19368 - Correcting many comment errors.
authorspalmstr <spalmstr1@gmail.com>
Fri, 30 Sep 2016 15:42:22 +0000 (16:42 +0100)
committerColeman Watts <coleman@civicrm.org>
Fri, 30 Sep 2016 20:24:40 +0000 (16:24 -0400)
CRM/Report/Form/Contact/Relationship.php

index a791872696689e15d279ca291eed2fc2b272a0ff..6666a97a49cc792ad4aa85d253c32bb5c2729416 100644 (file)
@@ -370,7 +370,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
                         ON ( {$this->_aliases['civicrm_relationship']}.relationship_type_id  =
                              {$this->_aliases['civicrm_relationship_type']}.id  ) ";
 
-    // include Email Field
+    // Include Email Field.
     if ($this->_emailField_a) {
       $this->_from .= "
              LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']}
@@ -385,7 +385,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
                             {$this->_aliases['civicrm_email_b']}.contact_id AND
                             {$this->_aliases['civicrm_email_b']}.is_primary = 1 )";
     }
-    // include Phone Field
+    // Include Phone Field.
     if ($this->_phoneField_a) {
       $this->_from .= "
              LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
@@ -532,7 +532,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
     }
     if (!empty($statistics['filters'])) {
       foreach ($statistics['filters'] as $id => $value) {
-        //for displaying relationship type filter
+        // For displaying relationship type filter.
         if ($value['title'] == 'Relationship') {
           $relTypes = CRM_Core_PseudoConstant::relationshipType();
           $op = CRM_Utils_Array::value('relationship_type_id_op', $this->_params) == 'in' ? ts('Is one of') . ' ' : ts('Is not one of') . ' ';
@@ -544,14 +544,14 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
             implode(', ', $relationshipTypes);
         }
 
-        //for displaying relationship status
+        // For displaying relationship status.
         if ($value['title'] == 'Relationship Status') {
           $isStatusFilter = TRUE;
           $statistics['filters'][$id]['value'] = $relStatus;
         }
       }
     }
-    //for displaying relationship status
+    // For displaying relationship status.
     if (!$isStatusFilter && $relStatus) {
       $statistics['filters'][] = array(
         'title' => 'Relationship Status',
@@ -598,8 +598,8 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
         $direction[] = $relType[1] . '_' . $relType[2];
         $relationshipTypes[] = intval($relType[0]);
       }
-      // Lets take the first relationship type to guide us in the relationship direction
-      // we should use.
+      // Lets take the first relationship type to guide us in the relationship
+      // direction we should use.
       $this->relationType = $direction[0];
       $this->_params['relationship_type_id_value'] = $relationshipTypes;
     }
@@ -615,7 +615,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
     $this->doTemplateAssignment($rows);
 
     if (!empty($originalRelationshipTypeIdValue)) {
-      // store its old value, CRM-5837
+      // Store its old value, CRM-5837.
       $this->_params['relationship_type_id_value'] = $originalRelationshipTypeIdValue;
     }
     $this->endPostProcess($rows);
@@ -625,12 +625,12 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
    * @param $rows
    */
   public function alterDisplay(&$rows) {
-    // custom code to alter rows
+    // Custom code to alter rows.
     $entryFound = FALSE;
 
     foreach ($rows as $rowNum => $row) {
 
-      // handle country
+      // Handle country.
       if (array_key_exists('civicrm_address_country_id', $row)) {
         if ($value = $row['civicrm_address_country_id']) {
           $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, FALSE);
@@ -702,11 +702,11 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
   public function buildValidityQuery($valid) {
     $clause = NULL;
     if ($valid == '1') {
-      // relationships dates are not expired
+      // Relationships dates are not expired.
       $clause = "((start_date <= CURDATE() OR start_date is null) AND (end_date >= CURDATE() OR end_date is null))";
     }
     elseif ($valid == '0') {
-      // relationships dates are expired or has not started yet
+      // Relationships dates are expired or has not started yet.
       $clause = "(start_date >= CURDATE() OR end_date < CURDATE())";
     }
     return $clause;