<?php

namespace App\Http\Requests;

use App\Core\Request;
use App\Exceptions\ValidationException;

class RefreshTokenRequest
{
    public static function validate(Request $request): array
    {
        $data = $request->json();
        if (empty($data['refresh_token'])) {
            throw new ValidationException('Refresh token is required', ['field' => 'refresh_token']);
        }

        return $data;
    }
}
