public function verify(Borrower $borrower, User $user, $data) { $borrower->setActivationStatus($data['isEligibleByAdmin'] ? Borrower::ACTIVATION_APPROVED : Borrower::ACTIVATION_DECLINED); $borrower->save(); if ($borrower->isActivationApproved()) { $this->borrowerMailer->sendApprovedConfirmationMail($borrower); } else { $this->borrowerMailer->sendDeclinedConfirmationMail($borrower); $this->siftScienceService->sendBorrowerDeclinedEvent($borrower); } }