@@ -51,7 +51,7 @@ discard block |
||
| 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 | }); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // Set Twig engine for templating |
| 109 | -$container->set('view', static function () { |
|
| 109 | +$container->set('view', static function() { |
|
| 110 | 110 | $settings = json_decode(file_get_contents(__DIR__ . '/../config/config.json'), true); |
| 111 | 111 | $tpls = [ |
| 112 | 112 | __DIR__ . '/../resources/views/', |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | }); |
| 132 | 132 | |
| 133 | 133 | //Set Session engine |
| 134 | -$container->set('session', static function () { |
|
| 134 | +$container->set('session', static function() { |
|
| 135 | 135 | return new Helper(); |
| 136 | 136 | }); |
| 137 | 137 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $app->post('/login', HomeController::class . ':loginPost')->setName('login-post'); |
| 189 | 189 | |
| 190 | 190 | // Admin routes |
| 191 | -$app->group('/admin', static function (RouteCollectorProxy $group): void { |
|
| 191 | +$app->group('/admin', static function(RouteCollectorProxy $group): void { |
|
| 192 | 192 | $group->get('', AdminController::class . ':adminIndex')->setName('admin'); |
| 193 | 193 | |
| 194 | 194 | $group->get('/settings', AdminController::class . ':adminSettings')->setName('admin-settings'); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | if ($charPos !== false) { |
| 218 | 218 | $route = substr($page, 0, $charPos); |
| 219 | 219 | |
| 220 | - $app->get('/pages/{route}', function (string $route, Response $response, Container $container): Response { |
|
| 220 | + $app->get('/pages/{route}', function(string $route, Response $response, Container $container): Response { |
|
| 221 | 221 | $settings = $container->get('settings'); |
| 222 | 222 | return $container->get('view')->render($response, $route . '.html', [ |
| 223 | 223 | 'settings' => $settings, |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | file_put_contents($accountFile, $result); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if ((!file_exists($bcFile)) || ($current_time - filemtime($bcFile) > ($cache_interval*2))) { |
|
| 86 | + if ((!file_exists($bcFile)) || ($current_time - filemtime($bcFile) > ($cache_interval * 2))) { |
|
| 87 | 87 | $result = json_encode($api->getDynamicGlobalProperties(), JSON_PRETTY_PRINT); |
| 88 | 88 | file_put_contents($bcFile, $result); |
| 89 | 89 | } |