@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function __construct(array $sender, array $recipients, array $message){ |
| 22 | 22 | $smtpConfigJson = file_get_contents("bin/configs/smtp-config.json"); |
| 23 | 23 | |
| 24 | - $smtpConfig = json_decode($smtpConfigJson); |
|
| 24 | + $smtpConfig = json_decode($smtpConfigJson); |
|
| 25 | 25 | |
| 26 | 26 | $mail = new \PHPMailer; |
| 27 | 27 | $mail->SMTPDebug = $smtpConfig->debug; |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /** |
| 3 | 3 | * @license MIT |
| 4 | 4 | * @author Samuel Adeshina <[email protected]> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | class MailerFactory |
| 19 | 19 | { |
| 20 | 20 | private $mail; |
| 21 | - public function __construct(array $sender, array $recipients, array $message){ |
|
| 21 | + public function __construct(array $sender, array $recipients, array $message) { |
|
| 22 | 22 | $smtpConfigJson = file_get_contents("bin/configs/smtp-config.json"); |
| 23 | 23 | |
| 24 | 24 | $smtpConfig = json_decode($smtpConfigJson); |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | $this->mail = $mail; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - public function send(){ |
|
| 53 | - if (!$this->mail->send()){ |
|
| 52 | + public function send() { |
|
| 53 | + if (!$this->mail->send()) { |
|
| 54 | 54 | return $this->mail->ErrorInfo; |
| 55 | 55 | } |
| 56 | 56 | |