Passed
Push — master ( 193a0e...c0709b )
by Florent
03:35
created
src/start.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 }
52 52
 
53 53
 // Set settings array in container for use in all routes
54
-$container->set('settings', static function () : array {
54
+$container->set('settings', static function() : array {
55 55
     $config = file_get_contents(__DIR__ . '/../config/config.json');
56 56
     return json_decode($config, true);
57 57
 });
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 //AppFactory::setContainer($container);
110 110
 
111 111
 // Set Twig engine for templating
112
-$container->set('view', static function () {
112
+$container->set('view', static function() {
113 113
     $settings = json_decode(file_get_contents(__DIR__ . '/../config/config.json'), true);
114 114
     $tpls = [
115 115
         __DIR__ . '/../resources/views/',
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 });
135 135
 
136 136
 //Set Session engine
137
-$container->set('session', static function () {
137
+$container->set('session', static function() {
138 138
     return new Helper();
139 139
 });
140 140
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 $app->post('/login', HomeController::class . ':loginPost')->setName('login-post');
192 192
 
193 193
 // Admin routes
194
-$app->group('/admin', static function (RouteCollectorProxy $group): void {
194
+$app->group('/admin', static function(RouteCollectorProxy $group): void {
195 195
     $group->get('', AdminController::class . ':adminIndex')->setName('admin');
196 196
 
197 197
     $group->get('/settings', AdminController::class . ':adminSettings')->setName('admin-settings');
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     if ($charPos !== false) {
221 221
         $route = substr($page, 0, $charPos);
222 222
 
223
-        $app->get('/pages/{route}', function (string $route, Response $response, Container $container) : Response {
223
+        $app->get('/pages/{route}', function(string $route, Response $response, Container $container) : Response {
224 224
             $settings = $container->get('settings');
225 225
             return $container->get('view')->render($response, $route . '.html', [
226 226
                 'settings' => $settings,
Please login to merge, or discard this patch.