diff --git a/function.php b/function.php index f9b16e70..0f926676 100644 --- a/function.php +++ b/function.php @@ -4,6 +4,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../')); use JetBrains\PhpStorm\Pure; +use Kiri\Abstracts\Kernel; use Kiri\Application; use Kiri\Config\ConfigProvider; use Kiri\Core\ArrayAccess; @@ -46,12 +47,14 @@ if (!function_exists('json_validate')) { if (!function_exists('application')) { /** + * @param Kernel $Kernel * @return Application - * @throws */ - function application(): Application + function application(Kernel $Kernel): Application { - return Kiri::getDi()->get(Application::class); + $application = Kiri::getDi()->get(Application::class); + $application->commands($Kernel); + return $application; } }