Skip to content

Commit

Permalink
Refactor ContainerFactory to new standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Eelen committed Apr 22, 2024
1 parent 000bc86 commit 581715a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Factory/ContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class ContainerFactory
public static function forCli(Config $config): Container
{
$container = self::build($config);
$container->addServiceProvider(CommandServiceProvider::class);
$container->addServiceProvider(new CommandServiceProvider);
return $container;
}

public static function forWeb(Config $config): Container
{
$container = self::build($config);
$container->addServiceProvider(RoutingServiceProvider::class);
$container->addServiceProvider(new RoutingServiceProvider);
return $container;
}

Expand All @@ -37,10 +37,10 @@ private static function build(Config $config): Container
$config
);

$container->addServiceProvider(CultureFeedServiceProvider::class);
$container->addServiceProvider(JwtServiceProvider::class);
$container->addServiceProvider(OAuthServiceProvider::class);
$container->addServiceProvider(RequestTokenStorageServiceProvider::class);
$container->addServiceProvider(new CultureFeedServiceProvider);
$container->addServiceProvider(new JwtServiceProvider);
$container->addServiceProvider(new OAuthServiceProvider);
$container->addServiceProvider(new RequestTokenStorageServiceProvider);

return $container;
}
Expand Down

0 comments on commit 581715a

Please sign in to comment.