@@ -50,7 +50,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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'); |
@@ -208,10 +208,10 @@ |
||
| 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); |