Skip to content

Commit ada533a

Browse files
committed
replaced tabs with two spaces. normalized quotes
1 parent 55d428c commit ada533a

21 files changed

+741
-741
lines changed

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ php-sparkpost is maintained by Message Systems.
22

33
# Contributors
44

5-
* Jordan Nornhold <jordan.norhold@messagesystems.com>
5+
* Jordan Nornhold <jordan.nornhold@messagesystems.com>, @beardyman
66
* Rich Leland <rich.leland@messagesystems.com>, @richleland
77
* Matthew April <matthew.japril@gmail.com>

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ $sparky = new SparkPost($httpAdapter, ['key'=>'YOUR API KEY']);
5656
try {
5757
// Build your email and send it!
5858
$results = $sparky->transmission->send([
59-
'from'=>'From Envelope <from@sparkpostbox.com>',
60-
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>',
61-
'text'=>'Congratulations, {{name}}!! You just sent your very first mailing!',
59+
'from'=>'From Envelope <from@sparkpostbox.com>',
60+
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>',
61+
'text'=>'Congratulations, {{name}}!! You just sent your very first mailing!',
6262
'substitutionData'=>['name'=>'YOUR FIRST NAME']
63-
'subject'=>'First Mailing From PHP',
64-
'recipients'=>[
65-
[
66-
'address'=>[
63+
'subject'=>'First Mailing From PHP',
64+
'recipients'=>[
65+
[
66+
'address'=>[
6767
'name'=>'YOUR FULL NAME',
6868
'email'=>'YOUR EMAIL ADDRESS'
6969
]
70-
]
71-
]
72-
]);
73-
echo 'Woohoo! You just sent your first mailing!';
70+
]
71+
]
72+
]);
73+
echo 'Woohoo! You just sent your first mailing!';
7474
} catch (\Exception $err) {
7575
echo 'Whoops! Something went wrong';
7676
var_dump($err);

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"phpunit/phpunit": "4.3.*",
2323
"guzzlehttp/guzzle": "6.*",
2424
"mockery/mockery": "^0.9.4",
25-
"satooshi/php-coveralls": "dev-master"
25+
"satooshi/php-coveralls": "dev-master"
2626
},
2727
"autoload": {
28-
"psr-4": {
29-
"SparkPost\\": "lib/SparkPost/",
30-
"SparkPost\\SendGridCompatibility\\": "lib/SendGridCompatibility/",
28+
"psr-4": {
29+
"SparkPost\\": "lib/SparkPost/",
30+
"SparkPost\\SendGridCompatibility\\": "lib/SendGridCompatibility/",
3131
"SparkPost\\Test\\TestUtils\\": "test/unit/TestUtils/"
32-
}
32+
}
3333
}
3434
}

examples/transmission/get_all_transmissions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,8 +15,8 @@
1515

1616
try {
1717
$results = $sparky->transmission->all();
18-
echo 'Congrats you can use your SDK!';
18+
echo 'Congrats you can use your SDK!';
1919
} catch (\Exception $exception) {
20-
echo $exception->getMessage();
20+
echo $exception->getMessage();
2121
}
2222
?>

examples/transmission/get_transmission.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,8 +15,8 @@
1515

1616
try {
1717
$results = $sparky->transmission->find('Your Transmission ID');
18-
echo 'Congrats you can use your SDK!';
18+
echo 'Congrats you can use your SDK!';
1919
} catch (\Exception $exception) {
20-
echo $exception->getMessage();
20+
echo $exception->getMessage();
2121
}
2222
?>

examples/transmission/rfc822.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,17 +15,17 @@
1515

1616
try {
1717
$results = $sparky->transmission->send([
18-
'recipients'=>[
19-
[
20-
'address'=>[
21-
'email'=>'john.doe@example.com'
18+
'recipients'=>[
19+
[
20+
'address'=>[
21+
'email'=>'john.doe@example.com'
2222
]
23-
]
24-
],
25-
'rfc822'=>"Content-Type: text/plain\nFrom: From Envelope <from@sparkpostbox.com>\nSubject: Example Email\n\nHello World"
26-
]);
27-
echo 'Congrats you can use your SDK!';
23+
]
24+
],
25+
'rfc822'=>'Content-Type: text/plain\nFrom: From Envelope <from@sparkpostbox.com>\nSubject: Example Email\n\nHello World'
26+
]);
27+
echo 'Congrats you can use your SDK!';
2828
} catch (\Exception $exception) {
29-
echo $exception->getMessage();
29+
echo $exception->getMessage();
3030
}
3131
?>

examples/transmission/send_transmission_all_fields.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,36 +15,36 @@
1515

1616
try{
1717
$results = $sparky->transmission->send([
18-
"campaign"=>"my-campaign",
19-
"metadata"=>[
20-
"sample_campaign"=>true,
21-
"type"=>"these are custom fields"
22-
],
23-
"substitutionData"=>[
24-
"name"=>"Test Name"
25-
],
26-
"description"=>"my description",
27-
"replyTo"=>"reply@test.com",
28-
"customHeaders"=>[
29-
"X-Custom-Header"=>"Sample Custom Header"
30-
],
31-
"trackOpens"=>false,
32-
"trackClicks"=>false,
33-
"from"=>"From Envelope <from@sparkpostbox.com>",
34-
"html"=>"<p>Hello World! Your name is: {{name}}</p>",
35-
"text"=>"Hello World!",
36-
"subject"=>"Example Email: {{name}}",
37-
"recipients"=>[
38-
[
39-
"address"=>[
40-
"email"=>"john.doe@example.com"
18+
'campaign'=>'my-campaign',
19+
'metadata'=>[
20+
'sample_campaign'=>true,
21+
'type'=>'these are custom fields'
22+
],
23+
'substitutionData'=>[
24+
'name'=>'Test Name'
25+
],
26+
'description'=>'my description',
27+
'replyTo'=>'reply@test.com',
28+
'customHeaders'=>[
29+
'X-Custom-Header'=>'Sample Custom Header'
30+
],
31+
'trackOpens'=>false,
32+
'trackClicks'=>false,
33+
'from'=>'From Envelope <from@sparkpostbox.com>',
34+
'html'=>'<p>Hello World! Your name is: {{name}}</p>',
35+
'text'=>'Hello World!',
36+
'subject'=>'Example Email: {{name}}',
37+
'recipients'=>[
38+
[
39+
'address'=>[
40+
'email'=>'john.doe@example.com'
4141
]
42-
]
43-
]
44-
]);
42+
]
43+
]
44+
]);
4545

46-
echo 'Congrats you can use your SDK!';
46+
echo 'Congrats you can use your SDK!';
4747
} catch (\Exception $exception) {
48-
echo $exception->getMessage();
48+
echo $exception->getMessage();
4949
}
5050
?>

examples/transmission/simple_send.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,20 +15,20 @@
1515

1616
try {
1717
$results = $sparky->transmission->send([
18-
"from"=>"From Envelope <from@sparkpostbox.com>",
19-
"html"=>"<p>Hello World!</p>",
20-
"text"=>"Hello World!",
21-
"subject"=>"Example Email",
22-
"recipients"=>[
23-
[
24-
"address"=>[
25-
"email"=>"john.doe@example.com"
18+
'from'=>'From Envelope <from@sparkpostbox.com>',
19+
'html'=>'<p>Hello World!</p>',
20+
'text'=>'Hello World!',
21+
'subject'=>'Example Email',
22+
'recipients'=>[
23+
[
24+
'address'=>[
25+
'email'=>'john.doe@example.com'
2626
]
27-
]
28-
]
29-
]);
30-
echo 'Congrats you can use your SDK!';
27+
]
28+
]
29+
]);
30+
echo 'Congrats you can use your SDK!';
3131
} catch (\Exception $exception) {
32-
echo $exception->getMessage();
32+
echo $exception->getMessage();
3333
}
3434
?>

examples/transmission/stored_recipients_inline_content.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -16,16 +16,16 @@
1616
try {
1717

1818
$results = $sparky->transmission->send([
19-
"campaign"=>"my-campaign",
20-
"from"=>"From Envelope <from@sparkpostbox.com>",
21-
"html"=>"<p>Hello World! Your name is: {{name}}</p>",
22-
"text"=>"Hello World!",
23-
"subject"=>"Example Email: {{name}}",
24-
"recipientList"=>'Example List'
25-
]);
19+
'campaign'=>'my-campaign',
20+
'from'=>'From Envelope <from@sparkpostbox.com>',
21+
'html'=>'<p>Hello World! Your name is: {{name}}</p>',
22+
'text'=>'Hello World!',
23+
'subject'=>'Example Email: {{name}}',
24+
'recipientList'=>'Example List'
25+
]);
2626

27-
echo 'Congrats you can use your SDK!';
27+
echo 'Congrats you can use your SDK!';
2828
} catch (\Exception $exception) {
29-
echo $exception->getMessage();
29+
echo $exception->getMessage();
3030
}
3131
?>

examples/transmission/stored_template_send.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,18 +15,18 @@
1515

1616
try {
1717
$results = $sparky->transmission->send([
18-
"from"=>"From Envelope <from@sparkpostbox.com>",
19-
"recipients"=>[
20-
[
21-
"address"=>[
22-
"email"=>"john.doe@example.com"
18+
'from'=>'From Envelope <from@sparkpostbox.com>',
19+
'recipients'=>[
20+
[
21+
'address'=>[
22+
'email'=>'john.doe@example.com'
2323
]
2424
]
25-
],
26-
"template"=>"my-first-email"
27-
]);
28-
echo 'Congrats you can use your SDK!';
25+
],
26+
'template'=>'my-first-email'
27+
]);
28+
echo 'Congrats you can use your SDK!';
2929
} catch (\Exception $exception) {
30-
echo $exception->getMessage();
30+
echo $exception->getMessage();
3131
}
3232
?>

examples/unwrapped/create_template.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

55
//pull in API key config
6-
$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
6+
$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
77
$config = json_decode($configFile, true);
88

99
use SparkPost\SparkPost;
@@ -15,20 +15,20 @@
1515

1616
try {
1717
// define the endpoint
18-
$sparky->setupUnwrapped('templates');
18+
$sparky->setupUnwrapped('templates');
1919

20-
$templateConfig = [
21-
'name' => 'Summer Sale!',
20+
$templateConfig = [
21+
'name' => 'Summer Sale!',
2222
'id'=>'jordan-test-summer-sale',
23-
'content'=> [
23+
'content'=> [
2424
'from' => 'from@sparkpostbox.com',
25-
'subject' => 'Summer deals',
26-
'html' => '<b>Check out these deals!</b>'
25+
'subject' => 'Summer deals',
26+
'html' => '<b>Check out these deals!</b>'
2727
]
28-
];
29-
$results = $sparky->templates->create($templateConfig);
30-
echo 'Congrats you can use your SDK!';
28+
];
29+
$results = $sparky->templates->create($templateConfig);
30+
echo 'Congrats you can use your SDK!';
3131
} catch (\Exception $exception) {
32-
echo $exception->getMessage();
32+
echo $exception->getMessage();
3333
}
3434
?>

0 commit comments

Comments
 (0)