Move utils classes to Shaarli\Helper namespace and folder

This commit is contained in:
ArthurHoaro 2020-10-16 13:34:59 +02:00
parent 977db7eabc
commit c2cd15dac2
15 changed files with 17 additions and 12 deletions

View file

@ -4,6 +4,7 @@ namespace Shaarli;
use DateTime;
use Exception;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Helper\FileUtils;
/**
* Class History

View file

@ -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;

View file

@ -1,5 +1,5 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;
use Exception;
use Shaarli\Config\ConfigManager;

View file

@ -1,6 +1,6 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;
use Shaarli\Exceptions\IOException;

View file

@ -8,7 +8,7 @@ use DateTime;
use Iterator;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Exceptions\IOException;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\Render\PageCacheManager;
/**

View file

@ -7,7 +7,6 @@ use RainTPL;
use ReflectionClass;
use ReflectionException;
use ReflectionMethod;
use Shaarli\ApplicationUtils;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkArray;
use Shaarli\Bookmark\BookmarkFilter;
@ -17,6 +16,7 @@ use Shaarli\Config\ConfigJson;
use Shaarli\Config\ConfigManager;
use Shaarli\Config\ConfigPhp;
use Shaarli\Exceptions\IOException;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Thumbnailer;
use Shaarli\Updater\Exception\UpdaterException;

View file

@ -5,9 +5,9 @@ namespace Shaarli\Render;
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;

View file

@ -4,7 +4,7 @@
namespace Shaarli\Security;
use Psr\Log\LoggerInterface;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
/**
* Class BanManager

View file

@ -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",

View file

@ -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

View file

@ -1,7 +1,8 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;
use Shaarli\Config\ConfigManager;
use Shaarli\FakeApplicationUtils;
require_once 'tests/utils/FakeApplicationUtils.php';

View file

@ -1,6 +1,6 @@
<?php
namespace Shaarli;
namespace Shaarli\Helper;
use Exception;
use Shaarli\Exceptions\IOException;

View file

@ -4,7 +4,7 @@
namespace Shaarli\Security;
use Psr\Log\LoggerInterface;
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\TestCase;
/**

View file

@ -2,6 +2,8 @@
namespace Shaarli;
use Shaarli\Helper\ApplicationUtils;
/**
* Fake ApplicationUtils class to avoid HTTP requests
*/

View file

@ -1,6 +1,6 @@
<?php
use Shaarli\FileUtils;
use Shaarli\Helper\FileUtils;
use Shaarli\History;
/**