Skip to content

Commit 0bee98b

Browse files
committed
ran fix style
1 parent 73baa03 commit 0bee98b

File tree

10 files changed

+35
-34
lines changed

10 files changed

+35
-34
lines changed

examples/message-events/get_message_events.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
$sparky = new SparkPost($httpClient, $options);
1717

1818
$promise = $sparky->request('GET', 'message-events', [
19-
'campaign_ids' => 'CAMPAIGN_ID'
19+
'campaign_ids' => 'CAMPAIGN_ID',
2020
]);
2121

2222
try {

examples/templates/create_template.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
$sparky = new SparkPost($httpClient, $options);
1717

1818
$promise = $sparky->request('POST', 'templates', [
19-
"name" => "PHP example template",
20-
"content" => [
21-
"from" => "from@YOUR_DOMAIN",
22-
"subject" => "Your Subject",
23-
"html" => "<b>Write your message here.</b>"
24-
]
19+
'name' => 'PHP example template',
20+
'content' => [
21+
'from' => 'from@YOUR_DOMAIN',
22+
'subject' => 'Your Subject',
23+
'html' => '<b>Write your message here.</b>',
24+
],
2525
]);
2626

2727
try {

examples/templates/preview_template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
$promise = $sparky->request('POST', 'templates/TEMPLATE_ID/preview?draft=true', [
1919
'substitution_data' => [
20-
'some_key' => 'some_value'
21-
]
20+
'some_key' => 'some_value',
21+
],
2222
]);
2323

2424
try {

examples/templates/update_template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
$promise = $sparky->request('PUT', 'templates/TEMPLATE_ID', [
1919
'options' => [
20-
'open_tracking' => true
21-
]
20+
'open_tracking' => true,
21+
],
2222
]);
2323

2424
try {

lib/SparkPost/Resource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace SparkPost;
44

55
/**
6-
* Class Resource
7-
* @package SparkPost
6+
* Class Resource.
7+
*
88
* @deprecated Soft reservations placed on name Resource (as of PHP7)
99
*/
1010
class Resource extends ResourceBase

lib/SparkPost/ResourceBase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
namespace SparkPost;
44

55
/**
6-
* Class ResourceBase
7-
* @package SparkPost
6+
* Class ResourceBase.
87
*/
98
class ResourceBase
109
{

lib/SparkPost/SparkPost.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
class SparkPost
1212
{
1313
/**
14-
* @var string Library version, used for setting User-Agent.
14+
* @var string Library version, used for setting User-Agent
1515
*/
1616
private $version = '2.0.3';
1717

1818
/**
19-
* @var HttpClient|HttpAsyncClient used to make requests.
19+
* @var HttpClient|HttpAsyncClient used to make requests
2020
*/
2121
private $httpClient;
2222

@@ -26,7 +26,7 @@ class SparkPost
2626
private $messageFactory;
2727

2828
/**
29-
* @var array Options for requests.
29+
* @var array Options for requests
3030
*/
3131
private $options;
3232

@@ -40,11 +40,11 @@ class SparkPost
4040
'key' => '',
4141
'version' => 'v1',
4242
'async' => true,
43-
'debug' => false
43+
'debug' => false,
4444
];
4545

4646
/**
47-
* @var Transmission Instance of Transmission class.
47+
* @var Transmission Instance of Transmission class
4848
*/
4949
public $transmissions;
5050

@@ -161,14 +161,15 @@ public function buildRequestValues($method, $uri, $payload, $headers)
161161
'method' => $method,
162162
'url' => $url,
163163
'headers' => $headers,
164-
'body' => $body
164+
'body' => $body,
165165
];
166166
}
167167

168168
/**
169-
* Build RequestInterface from given params
169+
* Build RequestInterface from given params.
170170
*
171171
* @param array $requestValues
172+
*
172173
* @return RequestInterface
173174
*/
174175
public function buildRequest($method, $uri, $headers, $body)
@@ -266,9 +267,10 @@ public function setOptions($options)
266267
}
267268

268269
/**
269-
* Returns the given value if debugging, an empty instance otherwise
270+
* Returns the given value if debugging, an empty instance otherwise.
270271
*
271272
* @param any $param
273+
*
272274
* @return any $param
273275
*/
274276
private function ifDebug($param)

lib/SparkPost/SparkPostException.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SparkPostException extends \Exception
1212
private $body = null;
1313

1414
/**
15-
* Array with the request values sent
15+
* Array with the request values sent.
1616
*/
1717
private $request;
1818

@@ -37,11 +37,12 @@ public function __construct(\Exception $exception, $request)
3737
}
3838

3939
/**
40-
* Returns the request values sent
40+
* Returns the request values sent.
4141
*
42-
* @return Array $request
42+
* @return array $request
4343
*/
44-
public function getRequest() {
44+
public function getRequest()
45+
{
4546
return $this->request;
4647
}
4748

lib/SparkPost/SparkPostPromise.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace SparkPost;
44

55
use Http\Promise\Promise as HttpPromise;
6-
use Psr\Http\Message\RequestInterface as RequestInterface;
76

87
class SparkPostPromise implements HttpPromise
98
{
@@ -13,7 +12,7 @@ class SparkPostPromise implements HttpPromise
1312
private $promise;
1413

1514
/**
16-
* Array with the request values sent
15+
* Array with the request values sent.
1716
*/
1817
private $request;
1918

lib/SparkPost/SparkPostResponse.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Psr\Http\Message\ResponseInterface as ResponseInterface;
66
use Psr\Http\Message\StreamInterface as StreamInterface;
7-
use Psr\Http\Message\RequestInterface as RequestInterface;
87

98
class SparkPostResponse implements ResponseInterface
109
{
@@ -14,7 +13,7 @@ class SparkPostResponse implements ResponseInterface
1413
private $response;
1514

1615
/**
17-
* Array with the request values sent
16+
* Array with the request values sent.
1817
*/
1918
private $request;
2019

@@ -30,11 +29,12 @@ public function __construct(ResponseInterface $response, $request)
3029
}
3130

3231
/**
33-
* Returns the request values sent
32+
* Returns the request values sent.
3433
*
35-
* @return Array $request
34+
* @return array $request
3635
*/
37-
public function getRequest() {
36+
public function getRequest()
37+
{
3838
return $this->request;
3939
}
4040

0 commit comments

Comments
 (0)