Skip to content

Commit

Permalink
Fix return types for multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
rpungello committed Aug 5, 2024
1 parent 17e2476 commit f2c7e50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rpungello/sdk-client",
"version": "1.10.1",
"version": "1.10.2",
"description": "Generic client for creating PHP-based SDKs using Spatie's DTOs for data transfer",
"keywords": [
"rpungello",
Expand Down
8 changes: 4 additions & 4 deletions src/SdkClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ public function postMultipart(string $uri, array $body, array $headers = []): Re
* @param string $uri
* @param array $body
* @param array $headers
* @return ResponseInterface
* @return array
* @throws GuzzleException
*/
public function postMultipartAsJson(string $uri, array $body, array $headers = []): ResponseInterface
public function postMultipartAsJson(string $uri, array $body, array $headers = []): array
{
return json_decode(
$this->postMultipart($uri, $body, $headers)->getBody()->getContents(),
Expand All @@ -171,10 +171,10 @@ public function postMultipartAsJson(string $uri, array $body, array $headers = [
* @param array $body
* @param string $dtoClass
* @param array $headers
* @return ResponseInterface
* @return DataTransferObject
* @throws GuzzleException
*/
public function postMultipartAsDto(string $uri, array $body, string $dtoClass, array $headers = []): ResponseInterface
public function postMultipartAsDto(string $uri, array $body, string $dtoClass, array $headers = []): DataTransferObject
{
return new $dtoClass($this->postMultipartAsJson($uri, $body, $headers));
}
Expand Down

0 comments on commit f2c7e50

Please sign in to comment.