mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-29 11:31:19 +01:00
Use never
return type
This commit is contained in:
parent
c25161cc9a
commit
8496f84d32
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user