Skip to content

Commit

Permalink
Merge pull request #18 from tiny-blocks/fix/http-response
Browse files Browse the repository at this point in the history
fix: Fix typing for HttpResponse.php.
  • Loading branch information
gustavofreze committed Jul 1, 2023
2 parents a67b51d + faed32b commit a1d1a17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ public static function ok(mixed $data, ?HttpHeaders $headers = null): ResponseIn
return Response::from(code: HttpCode::OK, data: $data, headers: $headers);
}

public static function created(mixed $data, HttpHeaders $headers = null): ResponseInterface
public static function created(mixed $data, ?HttpHeaders $headers = null): ResponseInterface
{
return Response::from(code: HttpCode::CREATED, data: $data, headers: $headers);
}

public static function accepted(mixed $data, HttpHeaders $headers = null): ResponseInterface
public static function accepted(mixed $data, ?HttpHeaders $headers = null): ResponseInterface
{
return Response::from(code: HttpCode::ACCEPTED, data: $data, headers: $headers);
}

public static function noContent(HttpHeaders $headers = null): ResponseInterface
public static function noContent(?HttpHeaders $headers = null): ResponseInterface
{
return Response::from(code: HttpCode::NO_CONTENT, data: null, headers: $headers);
}
Expand Down

0 comments on commit a1d1a17

Please sign in to comment.