Completed
Push — erdiko2 ( 38979a...0a72aa )
by John
05:45
created
src/dependencies.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 $container = $app->getContainer();
4 4
 
5 5
 // Monolog
6
-$container['logger'] = function ($container) {
6
+$container['logger'] = function($container) {
7 7
     $settings = $container->get('settings')['logger'];
8 8
     $logger = new Monolog\Logger($settings['name']);
9 9
     $logger->pushProcessor(new Monolog\Processor\UidProcessor());
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 };
13 13
 
14 14
 // Register flash provider
15
-$container['flash'] = function () {
15
+$container['flash'] = function() {
16 16
     return new \Slim\Flash\Messages();
17 17
 };
18 18
 
19 19
 // Theme view (erdiko, twig)
20
-$container['theme'] = function ($container) {
20
+$container['theme'] = function($container) {
21 21
     $settings = $container->get('settings')['theme'];
22 22
     $view = new \Slim\Views\Twig($settings['templates'], [
23 23
         'debug' => $settings['debug'],
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
         new Slim\Flash\Messages
35 35
     ));
36 36
 
37
-    if($settings['debug'] == true)
37
+    if ($settings['debug'] == true)
38 38
         $view->addExtension(new \Twig_Extension_Debug());
39 39
 
40 40
     return $view;
41 41
 };
42 42
 
43 43
 // 404 Handler
44
-$container['notFoundHandler'] = function ($container) {
45
-    return function ($request, $response) use ($container) {
44
+$container['notFoundHandler'] = function($container) {
45
+    return function($request, $response) use ($container) {
46 46
         $themeData = \erdiko\theme\Config::get();
47 47
         return $container['theme']->render($response->withStatus(404), '404.html', $themeData);
48 48
     };
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
         new Slim\Flash\Messages
35 35
     ));
36 36
 
37
-    if($settings['debug'] == true)
38
-        $view->addExtension(new \Twig_Extension_Debug());
37
+    if($settings['debug'] == true) {
38
+            $view->addExtension(new \Twig_Extension_Debug());
39
+    }
39 40
 
40 41
     return $view;
41 42
 };
Please login to merge, or discard this patch.
app/controllers/Grid.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
3 3
 
4 4
 class Grid extends \erdiko\Controller
5 5
 {   
6
-	public function __invoke($request, $response, $args) 
7
-	{
6
+    public function __invoke($request, $response, $args) 
7
+    {
8 8
         $this->container->logger->debug("/controller");
9
-   		$view = 'pages/grid.html';
9
+            $view = 'pages/grid.html';
10 10
 
11 11
         // Get erdiko config, this gets application.json and loads the theme specified
12 12
         $config = \erdiko\theme\Config::get();        
@@ -29,6 +29,6 @@  discard block
 block discarded – undo
29 29
         }
30 30
         $config['items'] = $items;
31 31
 
32
-   		return $this->container->theme->render($response, $view, $config);
33
-  	}
32
+            return $this->container->theme->render($response, $view, $config);
33
+        }
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
app/controllers/Config.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
3 3
 
4 4
 class Config extends \erdiko\Controller
5 5
 {  
6
-	public function __invoke($request, $response, $args) 
7
-	{
6
+    public function __invoke($request, $response, $args) 
7
+    {
8 8
         $this->container->logger->debug("route: /config");
9
-   	    $view = 'pages/config.html';
9
+            $view = 'pages/config.html';
10 10
 
11 11
         // Get erdiko config, this gets application.json and loads the theme specified
12 12
         $config = \erdiko\theme\Config::get();
@@ -16,6 +16,6 @@  discard block
 block discarded – undo
16 16
         // $theme->title = "Dump Config";
17 17
         // (array)$theme; Config::get(), ['page'] = array();
18 18
 
19
-   		return $this->container->theme->render($response, $view, $config);
20
-  	}
19
+            return $this->container->theme->render($response, $view, $config);
20
+        }
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.