<?php

declare(strict_types=1);

namespace Plugin\tnt_stabila_shop\src\Helper;

use Plugin\tnt_stabila_shop\src\Enums\StatusCodes;

/**
 * @extends \ArrayObject<string, mixed>
 */
class IOResponse extends \ArrayObject
{
    public static function response(string $msg, StatusCodes $code = StatusCodes::OK): void
    {
        \http_response_code($code->value);
        die($msg);
    }
}
