1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 05:07:36 +02:00
CS fixes
This commit is contained in:
Ricardo Fontanelli
2016-05-23 22:52:24 -03:00
parent a9e990ac5e
commit 446613af47

View File

@@ -26,13 +26,13 @@ class SendGridrHandler extends MailHandler
*/ */
protected $apiUser; protected $apiUser;
/** /**
* The SendGrid API Key * The SendGrid API Key
* @var string * @var string
*/ */
protected $apiKey; protected $apiKey;
/** /**
* The email addresses to which the message will be sent * The email addresses to which the message will be sent
* @var string * @var string
*/ */
@@ -53,7 +53,7 @@ class SendGridrHandler extends MailHandler
/** /**
* @param string $apiUser The SendGrid API User * @param string $apiUser The SendGrid API User
* @param string $apiKey The SendGrid API Key * @param string $apiKey The SendGrid API Key
* @param string $from The sender of the email * @param string $from The sender of the email
* @param string|array $to The recipients of the email * @param string|array $to The recipients of the email
* @param string $subject The subject of the mail * @param string $subject The subject of the mail
* @param int $level The minimum logging level at which this handler will be triggered * @param int $level The minimum logging level at which this handler will be triggered
@@ -74,16 +74,16 @@ class SendGridrHandler extends MailHandler
*/ */
protected function send($content, array $records) protected function send($content, array $records)
{ {
$message = array(); $message = array();
$message['api_user'] = $this->apiUser, $message['api_user'] = $this->apiUser,
$message['api_key'] = $this->apiKey; $message['api_key'] = $this->apiKey;
$message['from'] = $this->from; $message['from'] = $this->from;
foreach ($this->to AS $v) { foreach ($this->to AS $v) {
$message['to[]'] = $v; $message['to[]'] = $v;
} }
$message['subject'] = $this->subject; $message['subject'] = $this->subject;
$message['text'] = $content; $message['text'] = $content;
$message['date'] = date('r'); $message['date'] = date('r');
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json');