Skip to content

Commit

Permalink
Merge pull request #24105 from eileenmcnaughton/priv
Browse files Browse the repository at this point in the history
Make unshared function private, remove unused return
  • Loading branch information
seamuslee001 authored Aug 1, 2022
2 parents 25f1f7d + f2a5231 commit 64964b6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions CRM/Event/Form/ParticipantFeeSelection.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function preProcess() {
}
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, TRUE);

list($this->_contributorDisplayName, $this->_contributorEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactId);
[$this->_contributorDisplayName, $this->_contributorEmail] = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactId);
$this->assign('displayName', $this->_contributorDisplayName);
$this->assign('email', $this->_contributorEmail);

Expand Down Expand Up @@ -239,7 +239,7 @@ public function postProcess() {
$fetchParticipantVals = ['id' => $this->_participantId];
CRM_Event_BAO_Participant::getValues($fetchParticipantVals, $participantDetails);
$participantParams = array_merge($params, $participantDetails[$this->_participantId]);
$mailSent = $this->emailReceipt($participantParams);
$this->emailReceipt($participantParams);
}

// update participant
Expand All @@ -266,10 +266,8 @@ public function postProcess() {

/**
* @param array $params
*
* @return mixed
*/
public function emailReceipt(&$params) {
private function emailReceipt(array $params) {
$updatedLineItem = CRM_Price_BAO_LineItem::getLineItems($this->_participantId, 'participant', FALSE, FALSE);
$lineItem = [];
if ($updatedLineItem) {
Expand Down Expand Up @@ -347,7 +345,7 @@ public function emailReceipt(&$params) {
$template = CRM_Core_Smarty::singleton();

// Retrieve the name and email of the contact - this will be the TO for receipt email
list($this->_contributorDisplayName, $this->_contributorEmail, $this->_toDoNotEmail) = CRM_Contact_BAO_Contact::getContactDetails($this->_contactId);
[$this->_contributorDisplayName, $this->_contributorEmail, $this->_toDoNotEmail] = CRM_Contact_BAO_Contact::getContactDetails($this->_contactId);

$this->_contributorDisplayName = ($this->_contributorDisplayName == ' ') ? $this->_contributorEmail : $this->_contributorDisplayName;

Expand Down Expand Up @@ -378,8 +376,7 @@ public function emailReceipt(&$params) {
$sendTemplateParams['bcc'] = $this->_fromEmails['bcc'] ?? NULL;
}

list($mailSent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
return $mailSent;
CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
}

}

0 comments on commit 64964b6

Please sign in to comment.