Skip to content

Commit

Permalink
Merge pull request #39 from rux15/master
Browse files Browse the repository at this point in the history
Fix issues for Relational Data Service endpoints
  • Loading branch information
tim-bezhashvyly authored Aug 31, 2017
2 parents 1dbed36 + c6a108f commit e10f173
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
25 changes: 13 additions & 12 deletions src/Snowcap/Emarsys/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

interface HttpClient
{
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const DELETE = 'DELETE';
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const DELETE = 'DELETE';
const PATCH = 'PATCH';

/**
* @param string $method
* @param string $uri
* @param string[] $headers
* @param array $body
* @return string
*/
public function send($method, $uri, array $headers, array $body);
/**
* @param string $method
* @param string $uri
* @param string[] $headers
* @param array $body
* @return string
*/
public function send($method, $uri, array $headers, array $body);
}
6 changes: 3 additions & 3 deletions src/Snowcap/Emarsys/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class Response
* @param array $result
* @throws ClientException
*/
function __construct(array $result = array())
public function __construct(array $result = array())
{
if (!isset($result['replyCode']) || !isset($result['replyText']) || !isset($result['data'])) {
if (!isset($result['replyCode']) || !isset($result['replyText'])) {
throw new ClientException('Invalid result structure');
}

$this->replyCode = $result['replyCode'];
$this->replyText = $result['replyText'];
$this->data = $result['data'];
$this->data = isset($result['data']) ? $result['data'] : [];
}

/**
Expand Down

0 comments on commit e10f173

Please sign in to comment.