From d61a57bd2dbbc6ecbddfaa22c347248210703f02 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Thu, 31 Jan 2019 10:23:56 +0100 Subject: Make feed failing more verbose --- lib/AppInfo/Application.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/AppInfo') diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index b2773a224..c70a2fb6f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -72,7 +72,7 @@ class Application extends App $container->registerParameter('configFile', 'config.ini'); // factories - $container->registerService(ItemMapper::class, function (IContainer $c) { + $container->registerService(ItemMapper::class, function (IContainer $c): ItemMapper { return $c->query(MapperFactory::class)->build(); }); @@ -80,7 +80,7 @@ class Application extends App /** * App config parser. */ - $container->registerService(AppConfig::class, function (IContainer $c) { + $container->registerService(AppConfig::class, function (IContainer $c): AppConfig { $config = new AppConfig( $c->query(INavigationManager::class), $c->query(IURLGenerator::class), @@ -116,7 +116,7 @@ class Application extends App /** * Logger base */ - $container->registerService(PsrLogger::class, function (IContainer $c) { + $container->registerService(PsrLogger::class, function (IContainer $c): PsrLogger { return new PsrLogger( $c->query('ServerContainer')->getLogger(), $c->query('AppName') @@ -160,7 +160,7 @@ class Application extends App /** * Fetchers */ - $container->registerService(FetcherConfig::class, function (IContainer $c) { + $container->registerService(FetcherConfig::class, function (IContainer $c): FetcherConfig { // FIXME: move this into a separate class for testing? $config = $c->query(Config::class); $proxy = $c->query(ProxyConfigParser::class); @@ -172,7 +172,7 @@ class Application extends App return $fConfig; }); - $container->registerService(FeedIo::class, function (IContainer $c) { + $container->registerService(FeedIo::class, function (IContainer $c): FeedIo { $config = $c->query(FetcherConfig::class); return new FeedIo($config->getClient(), $c->query(PsrLogger::class)); }); @@ -180,7 +180,7 @@ class Application extends App /** * @noinspection PhpParamsInspection */ - $container->registerService(Fetcher::class, function (IContainer $c) { + $container->registerService(Fetcher::class, function (IContainer $c): Fetcher { $fetcher = new Fetcher(); // register fetchers in order, the most generic fetcher should be -- cgit v1.2.3