summaryrefslogtreecommitdiffstats
path: root/lib/SendGridCompatibility/SendGrid.php
diff options
context:
space:
mode:
authorJason Rhodes <jason.matthew.rhodes@gmail.com>2016-05-03 22:10:04 -0400
committerRichard Leland <rich@richleland.com>2016-05-03 22:10:04 -0400
commitd4c3a89c103e551a3cd71d20f36414095158365b (patch)
tree86ff4277800b41e1cf9def71b1753d53c0b25def /lib/SendGridCompatibility/SendGrid.php
parentd96d825aa138af92628ec7311c05e9659917ba79 (diff)
downloadphp-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.zip
php-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.tar.gz
php-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.tar.bz2
Add php-cs-fixer as composer script and make initial fix-style run
* Add php-cs-fixer as composer script * Make initial fix-style run * Fix indentation on all files * Add editorconfig file
Diffstat (limited to 'lib/SendGridCompatibility/SendGrid.php')
-rw-r--r--lib/SendGridCompatibility/SendGrid.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/lib/SendGridCompatibility/SendGrid.php b/lib/SendGridCompatibility/SendGrid.php
index 1671e6b..c5e84c1 100644
--- a/lib/SendGridCompatibility/SendGrid.php
+++ b/lib/SendGridCompatibility/SendGrid.php
@@ -1,23 +1,26 @@
<?php
+
namespace SparkPost\SendGridCompatibility;
use SparkPost\SparkPost;
-class SendGrid{
- private $sparky;
+class SendGrid
+{
+ private $sparky;
- public function __construct($username, $password, $options = null, $httpAdapter) {
- //username isn't used in our system
- $opts = array('key'=>$password);
- if (!is_null($options)) {
- $opts = array_merge($opts, $options);
- }
+ public function __construct($username, $password, $options = null, $httpAdapter)
+ {
+ //username isn't used in our system
+ $opts = array('key' => $password);
+ if (!is_null($options)) {
+ $opts = array_merge($opts, $options);
+ }
- $this->sparky = new SparkPost($httpAdapter, $opts);
- }
+ $this->sparky = new SparkPost($httpAdapter, $opts);
+ }
- public function send(Email $email) {
- $this->sparky->transmission->send($email->toSparkPostTransmission());
- }
+ public function send(Email $email)
+ {
+ $this->sparky->transmission->send($email->toSparkPostTransmission());
+ }
}
-?>