diff --git a/site/plugins/admin/app/Controllers/ThemesController.php b/site/plugins/admin/app/Controllers/ThemesController.php index 4856e25e..f3ba0db7 100644 --- a/site/plugins/admin/app/Controllers/ThemesController.php +++ b/site/plugins/admin/app/Controllers/ThemesController.php @@ -18,44 +18,44 @@ use Psr\Http\Message\ServerRequestInterface as Request; class ThemesController extends Controller { - /** - * Index page - * - * @param Request $request PSR7 request - * @param Response $response PSR7 response - * - * @return Response - */ - public function index(/** @scrutinizer ignore-unused */ Request $request, Response $response) : Response - { - $themes = []; - foreach (Filesystem::listContents(PATH['themes']) as $theme) { - if ($theme['type'] == 'dir' && Filesystem::has($theme['path'] . '/' . 'theme.json')) { - $themes[$theme['dirname']] = $theme['dirname']; - } + /** + * Index page + * + * @param Request $request PSR7 request + * @param Response $response PSR7 response + * + * @return Response + */ + public function index(/** @scrutinizer ignore-unused */ Request $request, Response $response) : Response + { + $themes = []; + foreach (Filesystem::listContents(PATH['themes']) as $theme) { + if ($theme['type'] == 'dir' && Filesystem::has($theme['path'] . '/' . 'theme.json')) { + $themes[$theme['dirname']] = $theme['dirname']; } - - return $this->view->render( - $response, - 'plugins/admin/views/templates/extends/themes/index.html', - [ - 'menu_item' => 'themes', - 'themes_list' => $themes, - 'links' => [ - 'themes' => [ - 'link' => $this->router->pathFor('admin.themes.index'), - 'title' => __('admin_themes'), - 'attributes' => ['class' => 'navbar-item active'] - ], - ], - 'buttons' => [ - 'templates_create' => [ - 'link' => $this->router->pathFor('admin.templates.add'), - 'title' => __('admin_create_new_template'), - 'attributes' => ['class' => 'float-right btn'] - ], - ] - ] - ); } + + return $this->view->render( + $response, + 'plugins/admin/views/templates/extends/themes/index.html', + [ + 'menu_item' => 'themes', + 'themes_list' => $themes, + 'links' => [ + 'themes' => [ + 'link' => $this->router->pathFor('admin.themes.index'), + 'title' => __('admin_themes'), + 'attributes' => ['class' => 'navbar-item active'] + ], + ], + 'buttons' => [ + 'templates_create' => [ + 'link' => $this->router->pathFor('admin.templates.add'), + 'title' => __('admin_create_new_template'), + 'attributes' => ['class' => 'float-right btn'] + ], + ] + ] + ); + } }