<?php
/// file: app/Core/Redirect.php

declare(strict_types=1);

namespace App\Core;

final class Redirect
{
    public static function to(string $url, int $code = 302): Response
    {
        return (new Response('', $code))->header('Location', $url);
    }
}
