Skip to content

Commit

Permalink
Merge pull request #25830 from eileenmcnaughton/skip_member
Browse files Browse the repository at this point in the history
[PHP8.2] Remove unused variabls from `Member_Form_Task_PDFLetter::postProcessMembers`
  • Loading branch information
demeritcowboy authored Mar 16, 2023
2 parents cd8186a + b80e676 commit 0b89476
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions CRM/Member/Form/Task/PDFLetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ class CRM_Member_Form_Task_PDFLetter extends CRM_Member_Form_Task {
/**
* Build all the data structures needed to build the form.
*
* @return void
* @throws \CRM_Core_Exception
*/
public function preProcess() {
$this->skipOnHold = $this->skipDeceased = FALSE;
parent::preProcess();
$this->setContactIDs();
$this->preProcessPDF();
Expand All @@ -66,32 +65,28 @@ public function buildQuickForm() {
*
*
* @return void
* @throws \CRM_Core_Exception
*/
public function postProcess() {
// TODO: rewrite using contribution token and one letter by contribution
$this->setContactIDs();
$skipOnHold = $this->skipOnHold ?? FALSE;
$skipDeceased = $this->skipDeceased ?? TRUE;
$this->postProcessMembers($this->_memberIds, $skipOnHold, $skipDeceased, $this->_contactIds);
$this->postProcessMembers($this->_memberIds, $this->_contactIds);
}

/**
* Process the form after the input has been submitted and validated.
*
* @param $membershipIDs
* @param $skipOnHold
* @param $skipDeceased
* @param $contactIDs
*
* @throws \CRM_Core_Exception
* @todo this is horrible copy & paste code because there is so much risk of breakage
* in fixing the existing pdfLetter classes to be suitably generic
*
*/
public function postProcessMembers($membershipIDs, $skipOnHold, $skipDeceased, $contactIDs) {
public function postProcessMembers($membershipIDs, $contactIDs) {
$form = $this;
$formValues = $form->controller->exportValues($form->getName());
[$formValues, $html_message, $messageToken, $returnProperties] = $this->processMessageTemplate($formValues);
[$formValues, $html_message, $messageToken] = $this->processMessageTemplate($formValues);

$html
= $this->generateHTML(
Expand Down

0 comments on commit 0b89476

Please sign in to comment.