Completed
Pull Request — erdiko2 (#47)
by
unknown
01:35
created
contexts/default/bootstrap/settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         // Monolog settings
14 14
         'logger' => [
15 15
             'name' => 'erdiko-default',
16
-            'path' => ERDIKO_ROOT . '/var/logs/app.log',
16
+            'path' => ERDIKO_ROOT.'/var/logs/app.log',
17 17
             'level' => \Monolog\Logger::DEBUG,
18 18
         ],
19 19
 
Please login to merge, or discard this patch.
bootstrap/dependencies.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 $container = $app->getContainer();
4 4
 
5 5
 // Register Session
6
-$container['session'] = function () {
6
+$container['session'] = function() {
7 7
     return \erdiko\session\Session::getDriverDefault();
8 8
 };
9 9
 
10 10
 // Email
11
-$container['email'] = function ($container) {
11
+$container['email'] = function($container) {
12 12
     return new \erdiko\email\Email($container);
13 13
 };
14 14
 
15 15
 // Monolog
16
-$container['logger'] = function ($container) {
16
+$container['logger'] = function($container) {
17 17
     $settings = $container->get('settings')['logger'];
18 18
     $logger = new Monolog\Logger($settings['name']);
19 19
     $logger->pushProcessor(new Monolog\Processor\UidProcessor());
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 };
23 23
 
24 24
 // Register flash provider
25
-$container['flash'] = function ($container) {
25
+$container['flash'] = function($container) {
26 26
     return new \Slim\Flash\Messages($container['session']);
27 27
 };
28 28
 
29 29
 // EntityManager provider
30
-$container['em'] = function ($container) {
30
+$container['em'] = function($container) {
31 31
     return \erdiko\doctrine\EntityManager::getEntityManager($container->get('settings')['database']);
32 32
 };
33 33
 
34 34
 // Theme view (erdiko, twig)
35
-$container['theme'] = function ($container) {
35
+$container['theme'] = function($container) {
36 36
     $settings = $container->get('settings')['theme'];
37 37
     $view = new \Slim\Views\Twig($settings['templates'], [
38 38
         'debug' => $settings['debug'],
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
         new Slim\Flash\Messages($container['session'])
50 50
     ));
51 51
 
52
-    if( $settings['debug'] )
52
+    if ($settings['debug'])
53 53
         $view->addExtension(new \Twig_Extension_Debug());
54 54
 
55 55
     return $view;
56 56
 };
57 57
 
58 58
 // 404 Handler
59
-$container['notFoundHandler'] = function ($container) {
60
-    return function ($request, $response) use ($container) {
59
+$container['notFoundHandler'] = function($container) {
60
+    return function($request, $response) use ($container) {
61 61
         $themeData = \erdiko\theme\Config::get($container->get('settings')['theme']);
62 62
         return $container['theme']->render($response->withStatus(404), '404.html', $themeData);
63 63
     };
Please login to merge, or discard this patch.