From 528fef38f9df461f448314d0d97041a41c8c4791 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 19 Jan 2015 19:19:00 -0800 Subject: [PATCH] INFRA-132 - Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines --- CRM/Contact/BAO/Group.php | 1 - CRM/Contact/Form/Contact.php | 4 ---- CRM/Contact/Form/Inline/Email.php | 1 - CRM/Contact/Form/Search/Advanced.php | 1 - CRM/Contact/Form/Task/Label.php | 1 - CRM/Contribute/Form/Contribution/Confirm.php | 2 -- CRM/Core/BAO/Phone.php | 1 - CRM/Member/Form/MembershipType.php | 1 - tests/phpunit/CRM/Core/Payment/BaseIPNTest.php | 2 -- 9 files changed, 14 deletions(-) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 25549003ff..333e201d09 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -1224,7 +1224,6 @@ WHERE {$whereClause}"; $clauses[] = self::getPermissionClause(); - return implode(' AND ', $clauses); } diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 44b677a99d..cb7122d0a4 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -433,7 +433,6 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { //set address block defaults CRM_Contact_Form_Edit_Address::setDefaultValues($defaults, $this); - if (!empty($defaults['image_URL'])) { list($imageWidth, $imageHeight) = getimagesize(CRM_Utils_String::unstupifyUrl($defaults['image_URL'])); list($imageThumbWidth, $imageThumbHeight) = CRM_Contact_BAO_Contact::getThumbSize($imageWidth, $imageHeight); @@ -1180,7 +1179,6 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $errors['_qf_default'] = $duplicateContactsLinks; - // let smarty know that there are duplicates $template = CRM_Core_Smarty::singleton(); $template->assign('isDuplicate', 1); @@ -1401,7 +1399,6 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $userId = $contactId; } - // get deceased status id $allStatus = CRM_Member_PseudoConstant::membershipStatus(); $deceasedStatusId = array_search('Deceased', $allStatus); @@ -1440,7 +1437,6 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { 'max_related' => $dao->max_related, ); - CRM_Member_BAO_MembershipLog::add($membershipLog, CRM_Core_DAO::$_nullArray); //create activity when membership status is changed diff --git a/CRM/Contact/Form/Inline/Email.php b/CRM/Contact/Form/Inline/Email.php index 4f381cedeb..98c3a2a17a 100644 --- a/CRM/Contact/Form/Inline/Email.php +++ b/CRM/Contact/Form/Inline/Email.php @@ -119,7 +119,6 @@ class CRM_Contact_Form_Inline_Email extends CRM_Contact_Form_Inline { } } - if (empty($hasPrimary) && !empty($hasData)) { $errors["email[1][is_primary]"] = ts('One email should be marked as primary.'); } diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php index 63c393f29e..de9472fcc3 100644 --- a/CRM/Contact/Form/Search/Advanced.php +++ b/CRM/Contact/Form/Search/Advanced.php @@ -271,7 +271,6 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { $this->_formValues['group'] = array($this->_groupID => 1); } - //search for civicase if (is_array($this->_formValues)) { $allCases = FALSE; diff --git a/CRM/Contact/Form/Task/Label.php b/CRM/Contact/Form/Task/Label.php index 00cd4bc996..d7b9ba0672 100644 --- a/CRM/Contact/Form/Task/Label.php +++ b/CRM/Contact/Form/Task/Label.php @@ -63,7 +63,6 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task { $this->add('select', 'label_name', ts('Select Label'), array('' => ts('- select label -')) + $label, TRUE); - // add select for Location Type $this->addElement('select', 'location_type_id', ts('Select Location'), array( diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 78711ba826..c5a8048902 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -1416,7 +1416,6 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr 'actual_amount' => $scheduledAmount, ); - CRM_Pledge_BAO_PledgePayment::add($pledgePaymentParams); } @@ -1505,7 +1504,6 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr CRM_Core_BAO_Note::add($noteParams, array()); } - if (isset($params['related_contact'])) { $contactID = $params['related_contact']; } diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index 6356263669..32ea5c9be1 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -142,7 +142,6 @@ LEFT JOIN civicrm_location_type ON ( civicrm_phone.location_type_id = civicrm_lo WHERE civicrm_contact.id = %1 $cond ORDER BY civicrm_phone.is_primary DESC, phone_id ASC "; - $params = array( 1 => array( $id, diff --git a/CRM/Member/Form/MembershipType.php b/CRM/Member/Form/MembershipType.php index c922a909b4..ef83468912 100644 --- a/CRM/Member/Form/MembershipType.php +++ b/CRM/Member/Form/MembershipType.php @@ -83,7 +83,6 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig { } } - //setting default fixed_period_start_day & fixed_period_rollover_day $periods = array('fixed_period_start_day', 'fixed_period_rollover_day'); foreach ($periods as $per) { diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index d98a4283f3..84fc854150 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -291,7 +291,6 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $this->assertArrayNotHasKey('pledge_payment', $this->objects); $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']); - $this->ids['pledge_payment'][0] = 999; $result = $this->IPN->loadObjects($this->input, $this->ids, $this->objects, TRUE, $this->_processorId, array('return_error' => 1)); $this->assertArrayHasKey('error_message', $result); @@ -438,7 +437,6 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { */ public function _setUpContributionObjects($contributionPage = FALSE) { - $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->id = $this->_contributionId; $contribution->find(TRUE); -- 2.25.1