public function sendReport(BenchmarkReportInterface $report) { $sms = $this->benchmarkReportersFactory->createReporterSmsMessage($report, $this->phoneNumber); try { $this->smsApi->send($sms); } catch (\Exception $e) { throw $e; //todo add logger like monotolog or do other stuff } }
public function sendReport(BenchmarkReportInterface $report) { $email = $this->reportersFactory->createReporterEmailMessage($report, $this->email); $this->emailService->send($email); }