From 398b66715d27df6376855411780dfd469ac0c736 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 8 Dec 2023 08:38:38 +1300 Subject: [PATCH] Remove unused variable --- CRM/Member/Form/Task/Label.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CRM/Member/Form/Task/Label.php b/CRM/Member/Form/Task/Label.php index 2162dd0d07..a25d9e4382 100644 --- a/CRM/Member/Form/Task/Label.php +++ b/CRM/Member/Form/Task/Label.php @@ -26,7 +26,7 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { * * @return void */ - public function preProcess() { + public function preProcess(): void { parent::preProcess(); $this->setContactIDs(); CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Member/Form/Task/Label.js'); @@ -38,7 +38,7 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { * * @return void */ - public function buildQuickForm() { + public function buildQuickForm(): void { CRM_Contact_Form_Task_Label::buildLabelForm($this); $this->addElement('checkbox', 'per_membership', ts('Print one label per Membership (rather than per contact)')); } @@ -49,7 +49,7 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { * @return array * array of default values */ - public function setDefaultValues() { + public function setDefaultValues(): array { $defaults = []; $format = CRM_Core_BAO_LabelFormat::getDefaultValues(); $defaults['label_name'] = $format['name'] ?? NULL; @@ -65,7 +65,7 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { * * @return void */ - public function postProcess() { + public function postProcess(): void { $formValues = $this->controller->exportValues($this->_name); $locationTypeID = $formValues['location_type_id']; $respectDoNotMail = $formValues['do_not_mail'] ?? NULL; @@ -81,16 +81,13 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { // so no-one is tempted to refer to this again after relevant values are extracted unset($formValues); - list($rows, $tokenFields) = CRM_Contact_Form_Task_LabelCommon::getRows($this->_contactIds, $locationTypeID, $respectDoNotMail, $mergeSameAddress, $mergeSameHousehold); + [$rows, $tokenFields] = CRM_Contact_Form_Task_LabelCommon::getRows($this->_contactIds, $locationTypeID, $respectDoNotMail, $mergeSameAddress, $mergeSameHousehold); - $individualFormat = FALSE; if ($mergeSameAddress) { CRM_Core_BAO_Address::mergeSameAddress($rows); - $individualFormat = TRUE; } if ($mergeSameHousehold) { $rows = CRM_Contact_Form_Task_LabelCommon::mergeSameHousehold($rows); - $individualFormat = TRUE; } // format the addresses according to CIVICRM_ADDRESS_FORMAT (CRM-1327) foreach ((array) $rows as $id => $row) { -- 2.25.1