diff options
author | danil zakablukovskii <danil.kabluk@gmail.com> | 2016-02-27 17:13:12 +0100 |
---|---|---|
committer | danil zakablukovskii <danil.kabluk@gmail.com> | 2016-02-27 17:13:12 +0100 |
commit | f4ed2228821f3aa3357bd522489c7d1ce3c7e960 (patch) | |
tree | 4c34f003a5636d61af197918c98b125f1e9be5f4 /lib/SendGridCompatibility/SendGrid.php | |
parent | 4330e3231c54fb4b3c30aa3ac5e64e51dc3edb9d (diff) | |
download | php-sparkpost-f4ed2228821f3aa3357bd522489c7d1ce3c7e960.zip php-sparkpost-f4ed2228821f3aa3357bd522489c7d1ce3c7e960.tar.gz php-sparkpost-f4ed2228821f3aa3357bd522489c7d1ce3c7e960.tar.bz2 |
clean lib code
removed @desc tag, since it doesn't exist in phpdoc
fixed comments
fixed namespaces
added strong-typing for some methods
Diffstat (limited to 'lib/SendGridCompatibility/SendGrid.php')
-rw-r--r-- | lib/SendGridCompatibility/SendGrid.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/SendGridCompatibility/SendGrid.php b/lib/SendGridCompatibility/SendGrid.php index 7f8697a..e5b21e6 100644 --- a/lib/SendGridCompatibility/SendGrid.php +++ b/lib/SendGridCompatibility/SendGrid.php @@ -2,14 +2,15 @@ namespace SparkPost\SendGridCompatibility; use SparkPost\SparkPost; -use SparkPost\SendGridCompatibility\Email; -class SendGrid{ +class SendGrid +{ private $sparky; - public function __construct($username, $password, $options = null, $httpAdapter) { - //username isn't used in our system - $opts = array('key'=>$password); + 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); } @@ -17,8 +18,10 @@ class SendGrid{ $this->sparky = new SparkPost($httpAdapter, $opts); } - public function send(Email $email) { + public function send(Email $email) + { $this->sparky->transmission->send($email->toSparkPostTransmission()); } } + ?> |