Commit 59c27f91 authored by mattwire's avatar mattwire
Browse files

Code cleanup

parent 685d8999
...@@ -94,10 +94,12 @@ trait CRM_Core_Payment_MJWIPNTrait { ...@@ -94,10 +94,12 @@ trait CRM_Core_Payment_MJWIPNTrait {
* If not set, we respect the value set on the ContributionRecur entity (for recurring contributions) * If not set, we respect the value set on the ContributionRecur entity (for recurring contributions)
* or the value set on the ContributionPage entity (for non-recurring contributions). * or the value set on the ContributionPage entity (for non-recurring contributions).
* *
* @param int $contributionID
*
* @return int * @return int
* @throws \CiviCRM_API3_Exception * @throws \CiviCRM_API3_Exception
*/ */
public function getSendEmailReceipt($contributionId) { public function getSendEmailReceipt(int $contributionID) {
if (isset($this->is_email_receipt)) { if (isset($this->is_email_receipt)) {
return (int) $this->is_email_receipt; return (int) $this->is_email_receipt;
} }
...@@ -117,7 +119,7 @@ trait CRM_Core_Payment_MJWIPNTrait { ...@@ -117,7 +119,7 @@ trait CRM_Core_Payment_MJWIPNTrait {
try { try {
$this->is_email_receipt = \Civi\Api4\Contribution::get(FALSE) $this->is_email_receipt = \Civi\Api4\Contribution::get(FALSE)
->addSelect('contribution_page.is_email_receipt') ->addSelect('contribution_page.is_email_receipt')
->addWhere('id', '=', $contributionId) ->addWhere('id', '=', $contributionID)
->execute() ->execute()
->first()['contribution_page.is_email_receipt'] ?? 0; ->first()['contribution_page.is_email_receipt'] ?? 0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment