Skip to content

Commit 98b91bf

Browse files
committed
Updated CodemashClient.
1 parent 345747d commit 98b91bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CodemashClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public function request(string $method, string $uri, array $options = [])
3333

3434
$request = $this->client->request($method, $uri, $options);
3535

36-
$bodyString = (string) $request->getBody();
36+
$statusCodeInt = (int) $request->getStatusCode();
3737

38-
return ! empty($bodyString) ? jsonToArray($bodyString) : (int) $request->getStatusCode();
38+
return $statusCodeInt === 204 ? $statusCodeInt : jsonToArray((string) $request->getBody());
3939
}
4040
}

0 commit comments

Comments
 (0)