Skip to content

Commit 68332a6

Browse files
committed
MA-946 #time 3h 30m Removed Compatibility layer code and finished
Documentation.
1 parent 02c1073 commit 68332a6

File tree

8 files changed

+24
-122
lines changed

8 files changed

+24
-122
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/
22
.project
33
.settings
4-
.buildPath
4+
.buildpath
55
test/output/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ try {
7575
## Development
7676

7777
### Setup
78-
We use [Robo](http://robo.li/) for our task runner, please follow the instructions on their website to install Robo.
78+
We use [Robo](http://robo.li/) for our task runner.
7979

80-
Run `composer install` inside the directory to install dependecies and development tools.
80+
Run `composer install` inside the directory to install dependecies and development tools including Robo.
8181

8282
### Testing
8383
Once all the dependencies are installed, you can execute the unit tests using `vendor\bin\robo test`

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/MessageSystems/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private function __construct(){}
2323
* @param Array $configMap - Hashmap that contains config values for the SDK to connect to SparkPost
2424
* @throws \Exception
2525
*/
26-
public static function setConfig($configMap) {
26+
public static function setConfig(array $configMap) {
2727
//check for API key because its required
2828
if (!isset($configMap['key']) || empty(trim($configMap['key']))){
2929
throw new \Exception('You must provide an API key');

lib/MessageSystems/SendGridCompatibility/Email.php

Lines changed: 0 additions & 84 deletions
This file was deleted.

lib/MessageSystems/SendGridCompatibility/SDK.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/MessageSystems/Transmission.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ public function setRfc822Content ($rfc) {
420420
* @param array $headers Key-value pairs of headers to add to the content of a Transmission
421421
* @return \MessageSystems\Transmission Object
422422
*/
423-
public function setContentHeaders (Array $headers) {
423+
public function setContentHeaders (array $headers) {
424424
$this->model['content']['headers'] = $headers;
425425
return $this;
426426
}
@@ -439,7 +439,7 @@ public function setContentHeaders (Array $headers) {
439439
* @param array $recipient An associative array of recipient data to send a Transmission
440440
* @return \MessageSystems\Transmission Object
441441
*/
442-
public function addRecipient (Array $recipient) {
442+
public function addRecipient (array $recipient) {
443443
if(!is_array($this->model['recipients'])) {
444444
$this->model['recipients'] = [];
445445
}
@@ -460,7 +460,7 @@ public function addRecipient (Array $recipient) {
460460
* @param array $recipients An array of associative arrays containing recipient data
461461
* @return \MessageSystems\Transmission Object
462462
*/
463-
public function addRecipients (Array $recipients) {
463+
public function addRecipients (array $recipients) {
464464
if(!is_array($this->model['recipients'])) {
465465
$this->model['recipients'] = [];
466466
}

lib/SparkPost.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@ class SparkPost {
88

99
public $transmission;
1010

11-
public function __construct($globalOpts) {
11+
/**
12+
* @desc Sets up the config for the sdk suite
13+
* @param array $globalOpts
14+
*/
15+
public function __construct(array $globalOpts) {
1216
Configuration::setConfig($globalOpts);
1317
}
1418

15-
public function Transmission(Array $options = null) {
19+
/**
20+
* @desc Creates a new Transmission object and returns it.
21+
* @param array $options Transmission constructor options
22+
* @see \MessageSystems\Transmission
23+
* @return \MessageSystems\Transmission
24+
*/
25+
public function Transmission(array $options = null) {
1626
$this->transmission = new Transmission($options);
1727
return $this->transmission;
1828
}

0 commit comments

Comments
 (0)