Skip to content

Commit 7f0c906

Browse files
committed
set param defaults in resource class
1 parent ec54edf commit 7f0c906

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/SparkPost/Resource.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(SparkPost $sparkpost, $endpoint)
3131
*
3232
* @see SparkPost->request()
3333
*/
34-
public function get($uri, $payload, $headers)
34+
public function get($uri = '', $payload = [], $headers = [])
3535
{
3636
return $this->request('GET', $uri, $payload, $headers);
3737
}
@@ -41,7 +41,7 @@ public function get($uri, $payload, $headers)
4141
*
4242
* @see SparkPost->request()
4343
*/
44-
public function put($uri, $payload, $headers)
44+
public function put($uri = '', $payload = [], $headers = [])
4545
{
4646
return $this->request('PUT', $uri, $payload, $headers);
4747
}
@@ -51,7 +51,7 @@ public function put($uri, $payload, $headers)
5151
*
5252
* @see SparkPost->request()
5353
*/
54-
public function post($payload, $headers)
54+
public function post($payload = [], $headers = [])
5555
{
5656
return $this->request('POST', '', $payload, $headers);
5757
}
@@ -61,7 +61,7 @@ public function post($payload, $headers)
6161
*
6262
* @see SparkPost->request()
6363
*/
64-
public function delete($uri, $payload, $headers)
64+
public function delete($uri = '', $payload = [], $headers = [])
6565
{
6666
return $this->request('DELETE', $uri, $payload, $headers);
6767
}

0 commit comments

Comments
 (0)