From c2cd15dac2bfaebe6d32f7649fbdedc07400fa08 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 16 Oct 2020 13:34:59 +0200 Subject: [PATCH] Move utils classes to Shaarli\Helper namespace and folder --- application/History.php | 1 + application/front/controller/visitor/InstallController.php | 2 +- application/{ => helper}/ApplicationUtils.php | 2 +- application/{ => helper}/FileUtils.php | 2 +- application/legacy/LegacyLinkDB.php | 2 +- application/legacy/LegacyUpdater.php | 2 +- application/render/PageBuilder.php | 2 +- application/security/BanManager.php | 2 +- composer.json | 1 + init.php | 2 +- tests/{ => helper}/ApplicationUtilsTest.php | 3 ++- tests/{ => helper}/FileUtilsTest.php | 2 +- tests/security/BanManagerTest.php | 2 +- tests/utils/FakeApplicationUtils.php | 2 ++ tests/utils/ReferenceHistory.php | 2 +- 15 files changed, 17 insertions(+), 12 deletions(-) rename application/{ => helper}/ApplicationUtils.php (99%) rename application/{ => helper}/FileUtils.php (99%) rename tests/{ => helper}/ApplicationUtilsTest.php (99%) rename tests/{ => helper}/FileUtilsTest.php (99%) diff --git a/application/History.php b/application/History.php index 4fd2f294..bd5c1bf7 100644 --- a/application/History.php +++ b/application/History.php @@ -4,6 +4,7 @@ namespace Shaarli; use DateTime; use Exception; use Shaarli\Bookmark\Bookmark; +use Shaarli\Helper\FileUtils; /** * Class History diff --git a/application/front/controller/visitor/InstallController.php b/application/front/controller/visitor/InstallController.php index 564a5777..22329294 100644 --- a/application/front/controller/visitor/InstallController.php +++ b/application/front/controller/visitor/InstallController.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace Shaarli\Front\Controller\Visitor; -use Shaarli\ApplicationUtils; use Shaarli\Container\ShaarliContainer; use Shaarli\Front\Exception\AlreadyInstalledException; use Shaarli\Front\Exception\ResourcePermissionException; +use Shaarli\Helper\ApplicationUtils; use Shaarli\Languages; use Shaarli\Security\SessionManager; use Slim\Http\Request; diff --git a/application/ApplicationUtils.php b/application/helper/ApplicationUtils.php similarity index 99% rename from application/ApplicationUtils.php rename to application/helper/ApplicationUtils.php index bd1c7cf3..4b34e114 100644 --- a/application/ApplicationUtils.php +++ b/application/helper/ApplicationUtils.php @@ -1,5 +1,5 @@