Skip to content

Commit

Permalink
Merge pull request #6 from Dylan-DPC/fix/string
Browse files Browse the repository at this point in the history
typecasted to string
  • Loading branch information
Dylan-DPC authored Oct 1, 2017
2 parents cf7d554 + 08cbc27 commit da300bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/GuzzleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function asFormParams()
/**
* @return Dpc\GuzzleClient\GuzzleClient
*/
public function asJson()
public function asJson(): self
{
$this->format = 'json';
return $this;
Expand All @@ -70,7 +70,7 @@ public function asJson()
/**
* @return string
*/
public function content() : string
public function content()
{
return $this->sendRequest();
}
Expand All @@ -81,11 +81,11 @@ public function json()
}

/**
* @return GuzzleHttp\Psr7\Stream
* @return string
*/
protected function sendRequest()
protected function sendRequest(): string
{
return $this->client->request($this->method, $this->uri, [
return (string) $this->client->request($this->method, $this->uri, [
$this->format => $this->body,
'headers' => $this->headers,
'options' => $this->options,
Expand Down

0 comments on commit da300bf

Please sign in to comment.