Skip to content

Commit

Permalink
Move utils classes to Shaarli\Helper namespace and folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurHoaro committed Oct 27, 2020
1 parent 977db7e commit c2cd15d
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions application/History.php
Expand Up @@ -4,6 +4,7 @@
use DateTime;
use Exception;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Helper\FileUtils;

/**
* Class History
Expand Down
2 changes: 1 addition & 1 deletion application/front/controller/visitor/InstallController.php
Expand Up @@ -4,10 +4,10 @@

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;
Expand Down
@@ -1,5 +1,5 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;

use Exception;
use Shaarli\Config\ConfigManager;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace Shaarli;
namespace Shaarli\Helper;

use Shaarli\Exceptions\IOException;

Expand Down
2 changes: 1 addition & 1 deletion application/legacy/LegacyLinkDB.php
Expand Up @@ -8,7 +8,7 @@
use Iterator;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Exceptions\IOException;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\Render\PageCacheManager;

/**
Expand Down
2 changes: 1 addition & 1 deletion application/legacy/LegacyUpdater.php
Expand Up @@ -7,7 +7,6 @@
use ReflectionClass;
use ReflectionException;
use ReflectionMethod;
use Shaarli\ApplicationUtils;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkArray;
use Shaarli\Bookmark\BookmarkFilter;
Expand All @@ -17,6 +16,7 @@
use Shaarli\Config\ConfigManager;
use Shaarli\Config\ConfigPhp;
use Shaarli\Exceptions\IOException;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Thumbnailer;
use Shaarli\Updater\Exception\UpdaterException;

Expand Down
2 changes: 1 addition & 1 deletion application/render/PageBuilder.php
Expand Up @@ -5,9 +5,9 @@
use Exception;
use Psr\Log\LoggerInterface;
use RainTPL;
use Shaarli\ApplicationUtils;
use Shaarli\Bookmark\BookmarkServiceInterface;
use Shaarli\Config\ConfigManager;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Security\SessionManager;
use Shaarli\Thumbnailer;

Expand Down
2 changes: 1 addition & 1 deletion application/security/BanManager.php
Expand Up @@ -4,7 +4,7 @@
namespace Shaarli\Security;

use Psr\Log\LoggerInterface;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;

/**
* Class BanManager
Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -59,6 +59,7 @@
"Shaarli\\Front\\Controller\\Admin\\": "application/front/controller/admin",
"Shaarli\\Front\\Controller\\Visitor\\": "application/front/controller/visitor",
"Shaarli\\Front\\Exception\\": "application/front/exceptions",
"Shaarli\\Helper\\": "application/helper",
"Shaarli\\Http\\": "application/http",
"Shaarli\\Legacy\\": "application/legacy",
"Shaarli\\Netscape\\": "application/netscape",
Expand Down
2 changes: 1 addition & 1 deletion init.php
Expand Up @@ -2,7 +2,7 @@

require_once __DIR__ . '/vendor/autoload.php';

use Shaarli\ApplicationUtils;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Security\SessionManager;

// Set 'UTC' as the default timezone if it is not defined in php.ini
Expand Down
@@ -1,7 +1,8 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;

use Shaarli\Config\ConfigManager;
use Shaarli\FakeApplicationUtils;

require_once 'tests/utils/FakeApplicationUtils.php';

Expand Down
2 changes: 1 addition & 1 deletion tests/FileUtilsTest.php → tests/helper/FileUtilsTest.php
@@ -1,6 +1,6 @@
<?php

namespace Shaarli;
namespace Shaarli\Helper;

use Exception;
use Shaarli\Exceptions\IOException;
Expand Down
2 changes: 1 addition & 1 deletion tests/security/BanManagerTest.php
Expand Up @@ -4,7 +4,7 @@
namespace Shaarli\Security;

use Psr\Log\LoggerInterface;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\TestCase;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/utils/FakeApplicationUtils.php
Expand Up @@ -2,6 +2,8 @@

namespace Shaarli;

use Shaarli\Helper\ApplicationUtils;

/**
* Fake ApplicationUtils class to avoid HTTP requests
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/ReferenceHistory.php
@@ -1,6 +1,6 @@
<?php

use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\History;

/**
Expand Down

0 comments on commit c2cd15d

Please sign in to comment.