summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Goldman <avrahamymgoldman@gmail.com>2017-01-04 09:20:23 -0500
committerAvi Goldman <avrahamymgoldman@gmail.com>2017-01-04 09:20:23 -0500
commit0bee98bce7b94bf22906853889ee091ed50a29a2 (patch)
treee7526bae011920092aa928318749c0dae1705a37
parent73baa0387523238a0f3695c2851fca3e149672c0 (diff)
downloadphp-sparkpost-0bee98bce7b94bf22906853889ee091ed50a29a2.zip
php-sparkpost-0bee98bce7b94bf22906853889ee091ed50a29a2.tar.gz
php-sparkpost-0bee98bce7b94bf22906853889ee091ed50a29a2.tar.bz2
ran fix style
-rw-r--r--examples/message-events/get_message_events.php2
-rw-r--r--examples/templates/create_template.php12
-rw-r--r--examples/templates/preview_template.php4
-rw-r--r--examples/templates/update_template.php4
-rw-r--r--lib/SparkPost/Resource.php4
-rw-r--r--lib/SparkPost/ResourceBase.php3
-rw-r--r--lib/SparkPost/SparkPost.php18
-rw-r--r--lib/SparkPost/SparkPostException.php9
-rw-r--r--lib/SparkPost/SparkPostPromise.php3
-rw-r--r--lib/SparkPost/SparkPostResponse.php10
10 files changed, 35 insertions, 34 deletions
diff --git a/examples/message-events/get_message_events.php b/examples/message-events/get_message_events.php
index bff4300..e027df1 100644
--- a/examples/message-events/get_message_events.php
+++ b/examples/message-events/get_message_events.php
@@ -16,7 +16,7 @@ $httpClient = new GuzzleAdapter(new Client());
$sparky = new SparkPost($httpClient, $options);
$promise = $sparky->request('GET', 'message-events', [
- 'campaign_ids' => 'CAMPAIGN_ID'
+ 'campaign_ids' => 'CAMPAIGN_ID',
]);
try {
diff --git a/examples/templates/create_template.php b/examples/templates/create_template.php
index c25b900..826b076 100644
--- a/examples/templates/create_template.php
+++ b/examples/templates/create_template.php
@@ -16,12 +16,12 @@ $httpClient = new GuzzleAdapter(new Client());
$sparky = new SparkPost($httpClient, $options);
$promise = $sparky->request('POST', 'templates', [
- "name" => "PHP example template",
- "content" => [
- "from" => "from@YOUR_DOMAIN",
- "subject" => "Your Subject",
- "html" => "<b>Write your message here.</b>"
- ]
+ 'name' => 'PHP example template',
+ 'content' => [
+ 'from' => 'from@YOUR_DOMAIN',
+ 'subject' => 'Your Subject',
+ 'html' => '<b>Write your message here.</b>',
+ ],
]);
try {
diff --git a/examples/templates/preview_template.php b/examples/templates/preview_template.php
index cdfa055..0f0a1db 100644
--- a/examples/templates/preview_template.php
+++ b/examples/templates/preview_template.php
@@ -17,8 +17,8 @@ $sparky = new SparkPost($httpClient, $options);
$promise = $sparky->request('POST', 'templates/TEMPLATE_ID/preview?draft=true', [
'substitution_data' => [
- 'some_key' => 'some_value'
- ]
+ 'some_key' => 'some_value',
+ ],
]);
try {
diff --git a/examples/templates/update_template.php b/examples/templates/update_template.php
index 1f467ce..4da186c 100644
--- a/examples/templates/update_template.php
+++ b/examples/templates/update_template.php
@@ -17,8 +17,8 @@ $sparky = new SparkPost($httpClient, $options);
$promise = $sparky->request('PUT', 'templates/TEMPLATE_ID', [
'options' => [
- 'open_tracking' => true
- ]
+ 'open_tracking' => true,
+ ],
]);
try {
diff --git a/lib/SparkPost/Resource.php b/lib/SparkPost/Resource.php
index 4b3550d..84fa20f 100644
--- a/lib/SparkPost/Resource.php
+++ b/lib/SparkPost/Resource.php
@@ -3,8 +3,8 @@
namespace SparkPost;
/**
- * Class Resource
- * @package SparkPost
+ * Class Resource.
+ *
* @deprecated Soft reservations placed on name Resource (as of PHP7)
*/
class Resource extends ResourceBase
diff --git a/lib/SparkPost/ResourceBase.php b/lib/SparkPost/ResourceBase.php
index 4e11ac2..3620192 100644
--- a/lib/SparkPost/ResourceBase.php
+++ b/lib/SparkPost/ResourceBase.php
@@ -3,8 +3,7 @@
namespace SparkPost;
/**
- * Class ResourceBase
- * @package SparkPost
+ * Class ResourceBase.
*/
class ResourceBase
{
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php
index 8f61910..24b71bf 100644
--- a/lib/SparkPost/SparkPost.php
+++ b/lib/SparkPost/SparkPost.php
@@ -11,12 +11,12 @@ use Psr\Http\Message\RequestInterface;
class SparkPost
{
/**
- * @var string Library version, used for setting User-Agent.
+ * @var string Library version, used for setting User-Agent
*/
private $version = '2.0.3';
/**
- * @var HttpClient|HttpAsyncClient used to make requests.
+ * @var HttpClient|HttpAsyncClient used to make requests
*/
private $httpClient;
@@ -26,7 +26,7 @@ class SparkPost
private $messageFactory;
/**
- * @var array Options for requests.
+ * @var array Options for requests
*/
private $options;
@@ -40,11 +40,11 @@ class SparkPost
'key' => '',
'version' => 'v1',
'async' => true,
- 'debug' => false
+ 'debug' => false,
];
/**
- * @var Transmission Instance of Transmission class.
+ * @var Transmission Instance of Transmission class
*/
public $transmissions;
@@ -161,14 +161,15 @@ class SparkPost
'method' => $method,
'url' => $url,
'headers' => $headers,
- 'body' => $body
+ 'body' => $body,
];
}
/**
- * Build RequestInterface from given params
+ * Build RequestInterface from given params.
*
* @param array $requestValues
+ *
* @return RequestInterface
*/
public function buildRequest($method, $uri, $headers, $body)
@@ -266,9 +267,10 @@ class SparkPost
}
/**
- * Returns the given value if debugging, an empty instance otherwise
+ * Returns the given value if debugging, an empty instance otherwise.
*
* @param any $param
+ *
* @return any $param
*/
private function ifDebug($param)
diff --git a/lib/SparkPost/SparkPostException.php b/lib/SparkPost/SparkPostException.php
index ee4664c..8f06845 100644
--- a/lib/SparkPost/SparkPostException.php
+++ b/lib/SparkPost/SparkPostException.php
@@ -12,7 +12,7 @@ class SparkPostException extends \Exception
private $body = null;
/**
- * Array with the request values sent
+ * Array with the request values sent.
*/
private $request;
@@ -37,11 +37,12 @@ class SparkPostException extends \Exception
}
/**
- * Returns the request values sent
+ * Returns the request values sent.
*
- * @return Array $request
+ * @return array $request
*/
- public function getRequest() {
+ public function getRequest()
+ {
return $this->request;
}
diff --git a/lib/SparkPost/SparkPostPromise.php b/lib/SparkPost/SparkPostPromise.php
index 42187ca..6e4ef3f 100644
--- a/lib/SparkPost/SparkPostPromise.php
+++ b/lib/SparkPost/SparkPostPromise.php
@@ -3,7 +3,6 @@
namespace SparkPost;
use Http\Promise\Promise as HttpPromise;
-use Psr\Http\Message\RequestInterface as RequestInterface;
class SparkPostPromise implements HttpPromise
{
@@ -13,7 +12,7 @@ class SparkPostPromise implements HttpPromise
private $promise;
/**
- * Array with the request values sent
+ * Array with the request values sent.
*/
private $request;
diff --git a/lib/SparkPost/SparkPostResponse.php b/lib/SparkPost/SparkPostResponse.php
index ef1be92..846dff5 100644
--- a/lib/SparkPost/SparkPostResponse.php
+++ b/lib/SparkPost/SparkPostResponse.php
@@ -4,7 +4,6 @@ namespace SparkPost;
use Psr\Http\Message\ResponseInterface as ResponseInterface;
use Psr\Http\Message\StreamInterface as StreamInterface;
-use Psr\Http\Message\RequestInterface as RequestInterface;
class SparkPostResponse implements ResponseInterface
{
@@ -14,7 +13,7 @@ class SparkPostResponse implements ResponseInterface
private $response;
/**
- * Array with the request values sent
+ * Array with the request values sent.
*/
private $request;
@@ -30,11 +29,12 @@ class SparkPostResponse implements ResponseInterface
}
/**
- * Returns the request values sent
+ * Returns the request values sent.
*
- * @return Array $request
+ * @return array $request
*/
- public function getRequest() {
+ public function getRequest()
+ {
return $this->request;
}