mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-29 08:40:42 +02:00
Removed unused AppManager::registerMiddleware() method
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user