Passed
Push — master ( 60cf00...193a0e )
by Florent
14:43
created
src/Controllers/AdminController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,10 +208,10 @@
 block discarded – undo
208 208
 
209 209
         foreach ($data as $key => $value) {
210 210
             if ($value === "true") {
211
-                $value = (bool) true;
211
+                $value = (bool)true;
212 212
             }
213 213
             if ($value === "false") {
214
-                $value = (bool) false;
214
+                $value = (bool)false;
215 215
             }
216 216
             if (mb_strpos($key, "-") !== false) {
217 217
                 $pieces = explode("-", $key);
Please login to merge, or discard this patch.
src/start.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 }
51 51
 
52 52
 // Set settings array in container for use in all routes
53
-$container->set('settings', static function () {
53
+$container->set('settings', static function() {
54 54
     $config = file_get_contents(__DIR__ . '/../config/config.json');
55 55
     return json_decode($config, true);
56 56
 });
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 //AppFactory::setContainer($container);
109 109
 
110 110
 // Set Twig engine for templating
111
-$container->set('view', static function () {
111
+$container->set('view', static function() {
112 112
     $settings = json_decode(file_get_contents(__DIR__ . '/../config/config.json'), true);
113 113
     $tpls = [
114 114
         __DIR__ . '/../resources/views/',
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 });
134 134
 
135 135
 //Set Session engine
136
-$container->set('session', static function () {
136
+$container->set('session', static function() {
137 137
     return new Helper();
138 138
 });
139 139
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 $app->post('/login', HomeController::class . ':loginPost')->setName('login-post');
191 191
 
192 192
 // Admin routes
193
-$app->group('/admin', static function (RouteCollectorProxy $group): void {
193
+$app->group('/admin', static function(RouteCollectorProxy $group): void {
194 194
     $group->get('', AdminController::class . ':adminIndex')->setName('admin');
195 195
 
196 196
     $group->get('/settings', AdminController::class . ':adminSettings')->setName('admin-settings');
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 foreach ($pages as $page) {
218 218
     $route = substr($page, 0, strrpos($page, '.'));
219 219
 
220
-    $app->get('/pages/{route}', function (string $route, $response, Container $container) {
220
+    $app->get('/pages/{route}', function(string $route, $response, Container $container) {
221 221
         $settings = $container->get('settings');
222 222
         return $container->get('view')->render($response, $route . '.html', [
223 223
             'settings' => $settings,
Please login to merge, or discard this patch.