diff --git a/src/System/Integrate/Console/Karnel.php b/src/System/Integrate/Console/Karnel.php index d18a3ef6..748bea6e 100644 --- a/src/System/Integrate/Console/Karnel.php +++ b/src/System/Integrate/Console/Karnel.php @@ -5,15 +5,13 @@ namespace System\Integrate\Console; use System\Console\Style\Style; -use System\Container\Container; +use System\Integrate\Application; use System\Integrate\Bootstrap\BootProviders; use System\Integrate\Bootstrap\RegisterProviders; class Karnel { - /** @var Container */ - protected $app; - + protected Application $app; /** @var int concole exit status */ protected $exit_code; @@ -25,10 +23,8 @@ class Karnel /** * Set instance. - * - * @param Container $app Application container - * */ - public function __construct(Container $app) + */ + public function __construct(Application $app) { $this->app = $app; } diff --git a/src/System/Integrate/Http/Karnel.php b/src/System/Integrate/Http/Karnel.php index 1517c9c3..180b5e17 100644 --- a/src/System/Integrate/Http/Karnel.php +++ b/src/System/Integrate/Http/Karnel.php @@ -4,19 +4,18 @@ namespace System\Integrate\Http; -use System\Container\Container; use System\Http\Request; use System\Http\Response; use System\Integrate\Bootstrap\BootProviders; use System\Integrate\Bootstrap\RegisterProviders; +use System\Integrate\Application; use System\Integrate\Exceptions\Handler; use System\Integrate\Http\Middleware\MaintenanceMiddleware; use System\Router\Router; class Karnel { - /** @var Container */ - protected $app; + protected Application $app; /** @var array Global middleware */ protected $middleware = [ @@ -34,10 +33,8 @@ class Karnel /** * Set instance. - * - * @param Container $app Application container - * */ - public function __construct(Container $app) + */ + public function __construct(Application $app) { $this->app = $app; } @@ -96,9 +93,8 @@ public function terminate(Request $request, Response $response): void $this->app->call([$middleware, 'terminate'], ['request' => $request, 'response' => $response]); } } - if (method_exists($this->app, 'terminate')) { - $this->app->{'terminate'}(); - } + + $this->app->terminate(); } /**