@@ -114,13 +114,13 @@ |
||
114 | 114 | /** |
115 | 115 | * Administration delete page function |
116 | 116 | * |
117 | - * called to delete fpage and return to administration Pages section |
|
118 | - * |
|
119 | - * @param object $request |
|
120 | - * @param object $response |
|
121 | - * @param array $args |
|
122 | - * |
|
123 | - * @return object $response |
|
117 | + * called to delete fpage and return to administration Pages section |
|
118 | + * |
|
119 | + * @param object $request |
|
120 | + * @param object $response |
|
121 | + * @param array $args |
|
122 | + * |
|
123 | + * @return object $response |
|
124 | 124 | */ |
125 | 125 | public function adminDelPage(Request $request, Response $response, array $args): Response |
126 | 126 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $container->set('themesdir', __DIR__ . '/../public/themes/'); |
39 | 39 | |
40 | 40 | // Set settings array in container for use in all routes |
41 | -$container->set('settings', function () { |
|
41 | +$container->set('settings', function() { |
|
42 | 42 | $config = file_get_contents(__DIR__ . '/../config/config.json'); |
43 | 43 | $settings = json_decode($config, true); |
44 | 44 | return $settings; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | mkdir($container->get('cachedir'), 0755, true); |
74 | 74 | } else { |
75 | 75 | // Flush Cache folder if disabled |
76 | - if ((file_exists($container->get('cachedir'))) && ($settings["devMode"] == true )) { |
|
76 | + if ((file_exists($container->get('cachedir'))) && ($settings["devMode"] == true)) { |
|
77 | 77 | $path = $container->get('cachedir'); |
78 | 78 | $files = glob($path . '/*'); |
79 | 79 | foreach ($files as $file) { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | AppFactory::setContainer($container); |
88 | 88 | |
89 | 89 | // Set Twig engine for templating |
90 | -$container->set('view', function () { |
|
90 | +$container->set('view', function() { |
|
91 | 91 | $settings = json_decode(file_get_contents(__DIR__ . '/../config/config.json'), true); |
92 | 92 | $tpls = [ |
93 | 93 | __DIR__ . "/../resources/views/", |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | }); |
116 | 116 | |
117 | 117 | //Set Session engine |
118 | -$container->set('session', function () { |
|
118 | +$container->set('session', function() { |
|
119 | 119 | return new \SlimSession\Helper(); |
120 | 120 | }); |
121 | 121 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // Admin routes |
168 | 168 | $app->get('/login', HomeController::class . ":login")->setName('login'); |
169 | 169 | $app->post('/login', HomeController::class . ":loginPost")->setName('login-post'); |
170 | -$app->group('/admin', function (RouteCollectorProxy $group) { |
|
170 | +$app->group('/admin', function(RouteCollectorProxy $group) { |
|
171 | 171 | $group->get('', AdminController::class . ":adminIndex")->setName('admin'); |
172 | 172 | $group->get('/social', AdminController::class . ":adminSocial")->setName('admin-social'); |
173 | 173 | $group->get('/wallet', WalletController::class . ":viewWallet")->setName('admin-wallet'); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | foreach ($pages as $page) { |
191 | 191 | $route = substr($page, 0, strrpos($page, ".")); |
192 | - $app->get('/' . $route, function ($request, $response) { |
|
192 | + $app->get('/' . $route, function($request, $response) { |
|
193 | 193 | $settings = $this->get('settings'); |
194 | 194 | $uri = $request->getUri(); |
195 | 195 | $route = substr(strrchr($uri, "/"), 1); |