@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * @param ContainerInterface $c |
| 12 | 12 | * @return PDO |
| 13 | 13 | */ |
| 14 | -$container['db'] = function (ContainerInterface $c) { |
|
| 14 | +$container['db'] = function(ContainerInterface $c) { |
|
| 15 | 15 | $db = $c->get('settings')['db']; |
| 16 | 16 | $database = sprintf('mysql:host=%s;dbname=%s', $db['host'], $db['dbname']); |
| 17 | 17 | $pdo = new PDO($database, $db['user'], $db['pass']); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param ContainerInterface $c |
| 28 | 28 | * @return bool|Logger |
| 29 | 29 | */ |
| 30 | -$container['logger'] = function (ContainerInterface $c) { |
|
| 30 | +$container['logger'] = function(ContainerInterface $c) { |
|
| 31 | 31 | $settings = $c->get('settings')['logger']; |
| 32 | 32 | if ($settings['enabled'] === false) { |
| 33 | 33 | return false; |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | return $logger; |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | -$container['user_service'] = function ($container) { |
|
| 45 | +$container['user_service'] = function($container) { |
|
| 46 | 46 | return new App\Service\UserService($container->get('user_repository')); |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | -$container['user_repository'] = function ($container) { |
|
| 49 | +$container['user_repository'] = function($container) { |
|
| 50 | 50 | return new App\Repository\UserRepository($container->get('db')); |
| 51 | 51 | }; |