Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-alpha.21'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Jul 1, 2023
2 parents b84e693 + 495b796 commit add3495
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.0-alpha.21] - 2023-07-01

### Refactor

- Fix incorrect type hint for code parameter in Payload and Response classes

## [1.0.0-alpha.20] - 2023-07-01

### Documentation
Expand Down
4 changes: 2 additions & 2 deletions src/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class Payload implements PayloadInterface
* @param PayloadStatus $status The status of the payload.
* @param mixed|null $data The data of the payload.
* @param string|null $message The message of the payload.
* @param integer|null $code The code of the payload.
* @param int|null $code The code of the payload.
*/
public function __construct(
private readonly PayloadStatus $status,
Expand Down Expand Up @@ -62,7 +62,7 @@ public static function fail(mixed $data = null): self
* Create an error payload.
*
* @param string $message The message of the payload.
* @param integer|null $code The code of the payload.
* @param int|null $code The code of the payload.
* @param mixed|null $data The data of the payload.
*
* @return self The created error payload.
Expand Down
2 changes: 1 addition & 1 deletion src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function withFailPayload(mixed $data = null): self
* Set the response payload as an error.
*
* @param string $message The error message.
* @param integer|null $code The error code.
* @param int|null $code The error code.
* @param mixed|null $data The error data.
*/
public function withErrorPayload(string $message, ?int $code = null, mixed $data = null): self
Expand Down
2 changes: 1 addition & 1 deletion src/ResponseFactoryDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
/**
* Create a new response instance with the specified status code and reason phrase.
*
* @param integer $code The status code for the response.
* @param int $code The status code for the response.
* @param string $reasonPhrase The reason phrase associated with the status code.
*
* @return ResponseInterface The newly created response instance.
Expand Down

0 comments on commit add3495

Please sign in to comment.