<?php
declare(strict_types=1);

namespace App\Middleware;

use App\Core\Response;
use App\Core\MiddlewareInterface;

/**
 * Ensures tenant context is present
 */
class TenantMiddleware implements MiddlewareInterface
{
    public function handle(): bool
    {
        if (!isset($_REQUEST['tenant_id'])) {
            Response::error('Tenant context missing', [], 403);
            return false;
        }
        return true;
    }
}
