Removed unused AppManager::registerMiddleware() method

This commit is contained in:
Chris Kankiewicz
2020-02-08 00:07:54 -07:00
parent 4da6bbb107
commit a5e3b73222

View File

@@ -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);
}
);
}
}