Skip to content

Commit

Permalink
Use never return type
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Nov 29, 2024
1 parent c25161c commit 8496f84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion formwork/src/Http/Utils/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function notFound(): void
*
* @param ResponseStatus $responseStatus Redirect HTTP response status code
*/
public static function redirect(string $uri, ResponseStatus $responseStatus = ResponseStatus::Found): void
public static function redirect(string $uri, ResponseStatus $responseStatus = ResponseStatus::Found): never
{
if ($responseStatus->type() !== ResponseStatusType::Redirection) {
throw new InvalidArgumentException(sprintf('Invalid response status "%s" for redirection, only 3XX statuses are allowed', $responseStatus->value));
Expand Down
2 changes: 1 addition & 1 deletion formwork/src/Utils/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static function dump(mixed ...$data): void
echo '<script>__formwork_dump_goto(window.location.hash.slice(1))</script>';
}

public static function dd(mixed ...$data): void
public static function dd(mixed ...$data): never
{
static::dump(...$data);
exit;
Expand Down

0 comments on commit 8496f84

Please sign in to comment.