From: Eileen McNaughton Date: Mon, 20 Nov 2023 08:43:26 +0000 (+1300) Subject: Remove unused property from previously shared code X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=594b1e29a1366b2bb812481b3bbb81997ed150a2;p=civicrm-core.git Remove unused property from previously shared code --- diff --git a/CRM/Contribute/Form/Contribution/ThankYou.php b/CRM/Contribute/Form/Contribution/ThankYou.php index 546e57ee0c..181bf9fa55 100644 --- a/CRM/Contribute/Form/Contribution/ThankYou.php +++ b/CRM/Contribute/Form/Contribution/ThankYou.php @@ -36,8 +36,10 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont /** * Set variables up before form is built. + * + * @throws \CRM_Contribute_Exception_InactiveContributionPageException */ - public function preProcess() { + public function preProcess(): void { parent::preProcess(); $this->_params = $this->get('params'); @@ -130,7 +132,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont $this->assign('useForMember', $this->get('useForMember')); if (!empty($this->_values['honoree_profile_id']) && !empty($params['soft_credit_type_id'])) { - $softCreditTypes = CRM_Core_OptionGroup::values("soft_credit_type", FALSE); + $softCreditTypes = CRM_Core_OptionGroup::values('soft_credit_type', FALSE); $this->assign('soft_credit_type', $softCreditTypes[$params['soft_credit_type_id']]); CRM_Contribute_BAO_ContributionSoft::formatHonoreeProfileFields($this, $params['honor']); @@ -184,7 +186,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont } $this->_separateMembershipPayment = $this->get('separateMembershipPayment'); - $this->assign("is_separate_payment", $this->_separateMembershipPayment); + $this->assign('is_separate_payment', $this->_separateMembershipPayment); if (empty($this->_ccid)) { $this->buildCustom($this->_values['custom_pre_id'], 'customPre', TRUE); @@ -220,7 +222,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont $defaults = []; $fields = []; foreach ($this->_fields as $name => $dontCare) { - if ($name != 'onbehalf' || $name != 'honor') { + if ($name !== 'onbehalf' || $name !== 'honor') { $fields[$name] = 1; } } @@ -349,7 +351,6 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont } $membershipTypeValues = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, $membershipTypeIds); - $this->_membershipTypeValues = $membershipTypeValues; $endDate = NULL; // Check if we support auto-renew on this contribution page