diff --git a/app/src/Bootstrap/AppManager.php b/app/src/Bootstrap/AppManager.php index c03a72f..983f741 100644 --- a/app/src/Bootstrap/AppManager.php +++ b/app/src/Bootstrap/AppManager.php @@ -18,11 +18,6 @@ class AppManager Providers\TwigProvider::class, ]; - /** @const Constant description */ - protected const MIDDLEWARES = [ - // ... - ]; - /** @var Container The applicaiton container */ protected $container; @@ -48,10 +43,8 @@ class AppManager public function __invoke(): App { $this->registerProviders(); - $app = Bridge::create($this->container); - $this->registerMiddlewares($app); - return $app; + return Bridge::create($this->container); } /** @@ -69,20 +62,4 @@ class AppManager } ); } - - /** - * Register application middleware. - * - * @param \Slim\App $app - * - * @return void - */ - protected function registerMiddlewares(App $app): void - { - Collection::make(self::MIDDLEWARES)->each( - function (string $middleware) use ($app) { - $app->add($middleware); - } - ); - } }