<?php

declare(strict_types=1);

use App\Kernel;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return static function (array $context): Kernel {
    if (!is_string($context['APP_ENV'])) {
        throw new UnexpectedValueException('APP_ENV must be a string.');
    }
    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
