Use never return type

This commit is contained in:
Giuseppe Criscione 2024-11-29 21:58:39 +01:00
parent c25161cc9a
commit 8496f84d32
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class Header
*
* @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));

View File

@ -157,7 +157,7 @@ class Debug
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;