From 033559da598c779ef16f87e322c7f921d840bce7 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Sat, 18 Sep 2021 23:36:11 -0700 Subject: [PATCH] PR cleanup and reorganization --- .env.example | 1 - app/config/app.php | 15 +++++++-------- app/config/container.php | 2 +- tests/HiddenFilesTest.php | 5 ++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index b66bd4c..bed4d8f 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,6 @@ APP_LANGUAGE=en DISPLAY_READMES=true READMES_FIRST=false ZIP_DOWNLOADS=true -HIDE_DOT_FILES=true GOOGLE_ANALYTICS_ID=false diff --git a/app/config/app.php b/app/config/app.php index ae594a8..d11d4b6 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -128,6 +128,13 @@ return [ */ 'hide_app_files' => DI\env('HIDE_APP_FILES', true), + /** + * Whether or not to hide dot files/directories from the listing. + * + * Default value: true + */ + 'hide_dot_files' => DI\env('HIDE_DOT_FILES', true), + /** * Hide the files Version Control System (i.e. Git and Mercurial) use to * store their metadata. @@ -159,12 +166,4 @@ return [ * Default value: 1000000000 */ 'max_hash_size' => DI\env('MAX_HASH_SIZE', 1000000000), - - /** - * Whether or not to hide dot files/directories from the listing. - * Like '.env' or '.ssh/'. - * - * Default value: true - */ - 'hide_dot_files' => DI\env('HIDE_DOT_FILES', true), ]; diff --git a/app/config/container.php b/app/config/container.php index b1026b5..e495512 100644 --- a/app/config/container.php +++ b/app/config/container.php @@ -17,7 +17,7 @@ return [ 'views_path' => DI\string('{app_path}/views'), /** Array of application files (to be hidden) */ - 'app_files' => ['app', 'index.php', '.hidden', '.env', '.env.example'], + 'app_files' => ['app', 'index.php', '.env', '.env.example', '.hidden'], /** Array of application middlewares */ 'middlewares' => function (): array { diff --git a/tests/HiddenFilesTest.php b/tests/HiddenFilesTest.php index 2e687dc..44d9c0c 100644 --- a/tests/HiddenFilesTest.php +++ b/tests/HiddenFilesTest.php @@ -51,13 +51,12 @@ class HiddenFilesTest extends TestCase ], 'App files' => [ [], 'NOT_A_REAL_FILE', true, [ - 'app', 'index.php', '.hidden', '.env', '.env.example', + 'app', 'index.php', '.env', '.env.example', '.hidden', ], ], 'All' => [ ['foo', 'alpha'], $this->filePath('.hidden'), true, [ - 'foo', 'alpha', 'bravo', 'app', 'index.php', '.hidden', '.env', - '.env.example', + 'foo', 'alpha', 'bravo', 'app', 'index.php', '.env', '.env.example', '.hidden', ], ], ];