@@ -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 | { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $container->set('themesdir', __DIR__ . '/../public/themes/'); |
41 | 41 | |
42 | 42 | // Set settings array in container for use in all routes |
43 | -$container->set('settings', function () { |
|
43 | +$container->set('settings', function() { |
|
44 | 44 | $config = file_get_contents(__DIR__ . '/../config/config.json'); |
45 | 45 | $settings = json_decode($config, true); |
46 | 46 | return $settings; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | mkdir($container->get('cachedir'), 0755, true); |
76 | 76 | } else { |
77 | 77 | // Flush Cache folder if disabled |
78 | - if ((file_exists($container->get('cachedir'))) && ($settings["devMode"] == true )) { |
|
78 | + if ((file_exists($container->get('cachedir'))) && ($settings["devMode"] == true)) { |
|
79 | 79 | $path = $container->get('cachedir'); |
80 | 80 | |
81 | 81 | $files = new RecursiveIteratorIterator( |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | AppFactory::setContainer($container); |
99 | 99 | |
100 | 100 | // Set Twig engine for templating |
101 | -$container->set('view', function () { |
|
101 | +$container->set('view', function() { |
|
102 | 102 | $settings = json_decode(file_get_contents(__DIR__ . '/../config/config.json'), true); |
103 | 103 | $tpls = [ |
104 | 104 | __DIR__ . "/../resources/views/", |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | }); |
127 | 127 | |
128 | 128 | //Set Session engine |
129 | -$container->set('session', function () { |
|
129 | +$container->set('session', function() { |
|
130 | 130 | return new \SlimSession\Helper(); |
131 | 131 | }); |
132 | 132 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | // Admin routes |
179 | 179 | $app->get('/login', HomeController::class . ":login")->setName('login'); |
180 | 180 | $app->post('/login', HomeController::class . ":loginPost")->setName('login-post'); |
181 | -$app->group('/admin', function (RouteCollectorProxy $group) { |
|
181 | +$app->group('/admin', function(RouteCollectorProxy $group) { |
|
182 | 182 | $group->get('', AdminController::class . ":adminIndex")->setName('admin'); |
183 | 183 | $group->get('/social', AdminController::class . ":adminSocial")->setName('admin-social'); |
184 | 184 | $group->get('/wallet', WalletController::class . ":viewWallet")->setName('admin-wallet'); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | foreach ($pages as $page) { |
202 | 202 | $route = substr($page, 0, strrpos($page, ".")); |
203 | - $app->get('/' . $route, function ($request, $response) { |
|
203 | + $app->get('/' . $route, function($request, $response) { |
|
204 | 204 | $settings = $this->get('settings'); |
205 | 205 | $uri = $request->getUri(); |
206 | 206 | $route = substr(strrchr($uri, "/"), 1); |