summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Piasecki <jakub@piaseccy.pl>2016-10-13 13:37:01 +0200
committerGitHub <noreply@github.com>2016-10-13 13:37:01 +0200
commite9419a0b71b2bfbe0dd097f03b71da1294984885 (patch)
tree5e965ecdbb67af41c5f1b588c0a6d8f5511ebd92
parent8c75ab08e18bc349e39582c6f8d17a9970c4a3c0 (diff)
downloadphp-sparkpost-e9419a0b71b2bfbe0dd097f03b71da1294984885.zip
php-sparkpost-e9419a0b71b2bfbe0dd097f03b71da1294984885.tar.gz
php-sparkpost-e9419a0b71b2bfbe0dd097f03b71da1294984885.tar.bz2
Setters should return current object.
-rw-r--r--lib/SparkPost/SparkPost.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php
index 0d3c6b5..c880940 100644
--- a/lib/SparkPost/SparkPost.php
+++ b/lib/SparkPost/SparkPost.php
@@ -208,6 +208,8 @@ class SparkPost
* Sets $httpClient to be used for request.
*
* @param HttpClient|HttpAsyncClient $httpClient - the client to be used for request
+ *
+ * @return SparkPost
*/
public function setHttpClient($httpClient)
{
@@ -216,12 +218,16 @@ class SparkPost
}
$this->httpClient = $httpClient;
+
+ return $this;
}
/**
* Sets the options from the param and defaults for the SparkPost object.
*
* @param array $options - either an string API key or an array of options
+ *
+ * @return SparkPost
*/
public function setOptions($options)
{
@@ -243,6 +249,8 @@ class SparkPost
$this->options[$option] = $value;
}
}
+
+ return $this;
}
/**