diff --git a/app/modules/api/Controllers/Account/AccountBase.php b/app/modules/api/Controllers/Account/AccountBase.php
index 1ebab9b4..59f00496 100644
--- a/app/modules/api/Controllers/Account/AccountBase.php
+++ b/app/modules/api/Controllers/Account/AccountBase.php
@@ -32,6 +32,7 @@ use SP\Domain\Account\Adapters\AccountAdapterInterface;
use SP\Domain\Account\Ports\AccountPresetServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Api\Ports\ApiServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\AccountHelp;
@@ -47,7 +48,7 @@ abstract class AccountBase extends ControllerBase
protected AccountAdapterInterface $accountAdapter;
/**
- * @throws \SP\Core\Exceptions\InvalidClassException
+ * @throws InvalidClassException
*/
public function __construct(
Application $application,
diff --git a/app/modules/api/Controllers/Category/CategoryBase.php b/app/modules/api/Controllers/Category/CategoryBase.php
index 53e538ae..24d9b94e 100644
--- a/app/modules/api/Controllers/Category/CategoryBase.php
+++ b/app/modules/api/Controllers/Category/CategoryBase.php
@@ -31,6 +31,7 @@ use SP\Core\Application;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Category\Ports\CategoryAdapterInterface;
use SP\Domain\Category\Ports\CategoryServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\CategoryHelp;
@@ -43,7 +44,7 @@ abstract class CategoryBase extends ControllerBase
protected CategoryAdapterInterface $categoryAdapter;
/**
- * @throws \SP\Core\Exceptions\InvalidClassException
+ * @throws InvalidClassException
*/
public function __construct(
Application $application,
diff --git a/app/modules/api/Controllers/Client/ClientBase.php b/app/modules/api/Controllers/Client/ClientBase.php
index bb5c515e..437d0ee7 100644
--- a/app/modules/api/Controllers/Client/ClientBase.php
+++ b/app/modules/api/Controllers/Client/ClientBase.php
@@ -31,6 +31,7 @@ use SP\Core\Application;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Client\Ports\ClientAdapterInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\ClientHelp;
@@ -43,14 +44,14 @@ abstract class ClientBase extends ControllerBase
protected ClientAdapterInterface $clientAdapter;
/**
- * @throws \SP\Core\Exceptions\InvalidClassException
+ * @throws InvalidClassException
*/
public function __construct(
- Application $application,
- Klein $router,
- ApiServiceInterface $apiService,
- Acl $acl,
- \SP\Domain\Client\Ports\ClientServiceInterface $clientService,
+ Application $application,
+ Klein $router,
+ ApiServiceInterface $apiService,
+ Acl $acl,
+ ClientServiceInterface $clientService,
ClientAdapterInterface $clientAdapter
) {
parent::__construct($application, $router, $apiService, $acl);
diff --git a/app/modules/api/Controllers/Config/BackupController.php b/app/modules/api/Controllers/Config/BackupController.php
index 9f97dbfc..01476bf4 100644
--- a/app/modules/api/Controllers/Config/BackupController.php
+++ b/app/modules/api/Controllers/Config/BackupController.php
@@ -30,10 +30,10 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Api\Services\ApiResponse;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Export\Ports\FileBackupServiceInterface;
use SP\Domain\Export\Services\BackupFiles;
use SP\Modules\Api\Controllers\ControllerBase;
diff --git a/app/modules/api/Controllers/Config/ExportController.php b/app/modules/api/Controllers/Config/ExportController.php
index 1b283f46..dffa195e 100644
--- a/app/modules/api/Controllers/Config/ExportController.php
+++ b/app/modules/api/Controllers/Config/ExportController.php
@@ -31,10 +31,10 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Api\Services\ApiResponse;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Export\Ports\XmlExportServiceInterface;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\ConfigHelp;
diff --git a/app/modules/api/Controllers/ControllerBase.php b/app/modules/api/Controllers/ControllerBase.php
index c60c1e4a..132c03a0 100644
--- a/app/modules/api/Controllers/ControllerBase.php
+++ b/app/modules/api/Controllers/ControllerBase.php
@@ -31,13 +31,13 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Events\EventDispatcher;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Api\Services\ApiResponse;
use SP\Domain\Api\Services\JsonRpcResponse;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
/**
diff --git a/app/modules/api/Controllers/Tag/TagBase.php b/app/modules/api/Controllers/Tag/TagBase.php
index 9f77757f..0c51fb85 100644
--- a/app/modules/api/Controllers/Tag/TagBase.php
+++ b/app/modules/api/Controllers/Tag/TagBase.php
@@ -29,6 +29,7 @@ use Klein\Klein;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Domain\Api\Ports\ApiServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\TagHelp;
@@ -41,7 +42,7 @@ abstract class TagBase extends ControllerBase
protected TagServiceInterface $tagService;
/**
- * @throws \SP\Core\Exceptions\InvalidClassException
+ * @throws InvalidClassException
*/
public function __construct(
Application $application,
diff --git a/app/modules/api/Controllers/UserGroup/UserGroupBase.php b/app/modules/api/Controllers/UserGroup/UserGroupBase.php
index 4a4abfee..07b778a9 100644
--- a/app/modules/api/Controllers/UserGroup/UserGroupBase.php
+++ b/app/modules/api/Controllers/UserGroup/UserGroupBase.php
@@ -28,6 +28,7 @@ use Klein\Klein;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Domain\Api\Ports\ApiServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Modules\Api\Controllers\ControllerBase;
use SP\Modules\Api\Controllers\Help\TagHelp;
@@ -40,7 +41,7 @@ abstract class UserGroupBase extends ControllerBase
protected UserGroupServiceInterface $userGroupService;
/**
- * @throws \SP\Core\Exceptions\InvalidClassException
+ * @throws InvalidClassException
*/
public function __construct(
Application $application,
diff --git a/app/modules/api/Init.php b/app/modules/api/Init.php
index c9722b79..1070ade0 100644
--- a/app/modules/api/Init.php
+++ b/app/modules/api/Init.php
@@ -25,12 +25,14 @@
namespace SP\Modules\Api;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
+use JsonException;
use Klein\Klein;
use SP\Core\Application;
-use SP\Core\Exceptions\InitializationException;
+use SP\Core\Context\ContextException;
use SP\Core\HttpModuleBase;
use SP\Core\Language;
use SP\Core\ProvidersHelper;
+use SP\Domain\Core\Exceptions\InitializationException;
use SP\Domain\Core\LanguageInterface;
use SP\Domain\Upgrade\Services\UpgradeAppService;
use SP\Domain\Upgrade\Services\UpgradeDatabaseService;
@@ -68,11 +70,11 @@ final class Init extends HttpModuleBase
}
/**
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \JsonException
- * @throws \SP\Core\Context\ContextException
- * @throws \SP\Core\Exceptions\InitializationException
- * @throws \SP\Infrastructure\File\FileException
+ * @throws EnvironmentIsBrokenException
+ * @throws JsonException
+ * @throws ContextException
+ * @throws InitializationException
+ * @throws FileException
*/
public function initialize(string $controller): void
{
diff --git a/app/modules/cli/Commands/InstallCommand.php b/app/modules/cli/Commands/InstallCommand.php
index c2235ddf..82193a3e 100644
--- a/app/modules/cli/Commands/InstallCommand.php
+++ b/app/modules/cli/Commands/InstallCommand.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Cli\Commands;
use Exception;
use Psr\Log\LoggerInterface;
-use SP\Core\Exceptions\InstallError;
-use SP\Core\Exceptions\InvalidArgumentException;
use SP\Core\Language;
use SP\Domain\Config\Ports\ConfigInterface;
+use SP\Domain\Core\Exceptions\InstallError;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
use SP\Domain\Install\Adapters\InstallData;
use SP\Domain\Install\Ports\InstallerServiceInterface;
use SP\Domain\Install\Services\InstallerService;
diff --git a/app/modules/web/Controllers/AccessManager/IndexController.php b/app/modules/web/Controllers/AccessManager/IndexController.php
index 34fcc3f7..d5417a94 100644
--- a/app/modules/web/Controllers/AccessManager/IndexController.php
+++ b/app/modules/web/Controllers/AccessManager/IndexController.php
@@ -27,12 +27,12 @@ namespace SP\Modules\Web\Controllers\AccessManager;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Ports\PublicLinkServiceInterface;
use SP\Domain\Auth\Ports\AuthTokenServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
diff --git a/app/modules/web/Controllers/Account/AccountControllerBase.php b/app/modules/web/Controllers/Account/AccountControllerBase.php
index ab7f5440..07ba5426 100644
--- a/app/modules/web/Controllers/Account/AccountControllerBase.php
+++ b/app/modules/web/Controllers/Account/AccountControllerBase.php
@@ -26,6 +26,8 @@ namespace SP\Modules\Web\Controllers\Account;
use SP\Core\Application;
use SP\Core\Context\ContextBase;
+use SP\Domain\Auth\Services\AuthException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Modules\Web\Controllers\ControllerBase;
use SP\Mvc\Controller\WebControllerHelper;
@@ -37,11 +39,11 @@ abstract class AccountControllerBase extends ControllerBase
private const LOGIN_NOT_REQUIRED = ['ViewLinkController'];
/**
- * @param \SP\Core\Application $application
- * @param \SP\Mvc\Controller\WebControllerHelper $webControllerHelper
+ * @param Application $application
+ * @param WebControllerHelper $webControllerHelper
*
- * @throws \SP\Core\Exceptions\SessionTimeout
- * @throws \SP\Domain\Auth\Services\AuthException
+ * @throws SessionTimeout
+ * @throws AuthException
*/
public function __construct(Application $application, WebControllerHelper $webControllerHelper)
{
@@ -53,8 +55,8 @@ abstract class AccountControllerBase extends ControllerBase
/**
* Initialize class
*
- * @throws \SP\Core\Exceptions\SessionTimeout
- * @throws \SP\Domain\Auth\Services\AuthException
+ * @throws SessionTimeout
+ * @throws AuthException
*/
private function initialize(): void
{
diff --git a/app/modules/web/Controllers/Account/CopyPassController.php b/app/modules/web/Controllers/Account/CopyPassController.php
index 725ad8f4..442a519b 100644
--- a/app/modules/web/Controllers/Account/CopyPassController.php
+++ b/app/modules/web/Controllers/Account/CopyPassController.php
@@ -25,10 +25,21 @@
namespace SP\Modules\Web\Controllers\Account;
+use Defuse\Crypto\Exception\BadFormatException;
+use Defuse\Crypto\Exception\CryptoException;
+use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
+use Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException;
+use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
+use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\Helpers\Account\AccountPasswordHelper;
+use SP\Modules\Web\Controllers\Helpers\HelperException;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\WebControllerHelper;
@@ -39,13 +50,13 @@ final class CopyPassController extends AccountControllerBase
{
use JsonTrait;
- private \SP\Domain\Account\Ports\AccountServiceInterface $accountService;
+ private AccountServiceInterface $accountService;
private AccountPasswordHelper $accountPasswordHelper;
public function __construct(
Application $application,
WebControllerHelper $webControllerHelper,
- \SP\Domain\Account\Ports\AccountServiceInterface $accountService,
+ AccountServiceInterface $accountService,
AccountPasswordHelper $accountPasswordHelper
) {
parent::__construct(
@@ -63,16 +74,16 @@ final class CopyPassController extends AccountControllerBase
* @param int $id Account's ID
*
* @return bool
- * @throws \Defuse\Crypto\Exception\BadFormatException
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException
- * @throws \JsonException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Modules\Web\Controllers\Helpers\HelperException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws BadFormatException
+ * @throws CryptoException
+ * @throws EnvironmentIsBrokenException
+ * @throws WrongKeyOrModifiedCiphertextException
+ * @throws JsonException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws HelperException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function copyPassAction(int $id): bool
{
diff --git a/app/modules/web/Controllers/Account/CopyPassHistoryController.php b/app/modules/web/Controllers/Account/CopyPassHistoryController.php
index 9fe6c403..72e04e6f 100644
--- a/app/modules/web/Controllers/Account/CopyPassHistoryController.php
+++ b/app/modules/web/Controllers/Account/CopyPassHistoryController.php
@@ -24,11 +24,21 @@
namespace SP\Modules\Web\Controllers\Account;
+use Defuse\Crypto\Exception\BadFormatException;
+use Defuse\Crypto\Exception\CryptoException;
+use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
+use Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException;
+use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\Helpers\Account\AccountPasswordHelper;
+use SP\Modules\Web\Controllers\Helpers\HelperException;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\WebControllerHelper;
@@ -39,8 +49,8 @@ final class CopyPassHistoryController extends AccountControllerBase
{
use JsonTrait;
- private \SP\Domain\Account\Ports\AccountServiceInterface $accountService;
- private AccountPasswordHelper $accountPasswordHelper;
+ private AccountServiceInterface $accountService;
+ private AccountPasswordHelper $accountPasswordHelper;
public function __construct(
Application $application,
@@ -63,16 +73,16 @@ final class CopyPassHistoryController extends AccountControllerBase
* @param int $id Account's ID
*
* @return bool
- * @throws \Defuse\Crypto\Exception\BadFormatException
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException
- * @throws \JsonException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Modules\Web\Controllers\Helpers\HelperException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws BadFormatException
+ * @throws CryptoException
+ * @throws EnvironmentIsBrokenException
+ * @throws WrongKeyOrModifiedCiphertextException
+ * @throws JsonException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws HelperException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function copyPassHistoryAction(int $id): bool
{
diff --git a/app/modules/web/Controllers/Account/SaveCopyController.php b/app/modules/web/Controllers/Account/SaveCopyController.php
index 6379c231..1629e873 100644
--- a/app/modules/web/Controllers/Account/SaveCopyController.php
+++ b/app/modules/web/Controllers/Account/SaveCopyController.php
@@ -29,8 +29,8 @@ use JsonException;
use SP\Core\Acl\Acl;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Account/SaveCreateController.php b/app/modules/web/Controllers/Account/SaveCreateController.php
index 8ba3b0e9..b3df9b2a 100644
--- a/app/modules/web/Controllers/Account/SaveCreateController.php
+++ b/app/modules/web/Controllers/Account/SaveCreateController.php
@@ -29,8 +29,8 @@ use JsonException;
use SP\Core\Acl\Acl;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Account/SaveEditController.php b/app/modules/web/Controllers/Account/SaveEditController.php
index 59bc5463..7ced70cb 100644
--- a/app/modules/web/Controllers/Account/SaveEditController.php
+++ b/app/modules/web/Controllers/Account/SaveEditController.php
@@ -30,8 +30,8 @@ use JsonException;
use SP\Core\Acl\Acl;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Account/SaveEditPassController.php b/app/modules/web/Controllers/Account/SaveEditPassController.php
index 3641e3d2..69acdeb5 100644
--- a/app/modules/web/Controllers/Account/SaveEditPassController.php
+++ b/app/modules/web/Controllers/Account/SaveEditPassController.php
@@ -31,10 +31,10 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Account\Ports\AccountPresetServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Modules\Web\Forms\AccountForm;
diff --git a/app/modules/web/Controllers/Account/SaveRequestController.php b/app/modules/web/Controllers/Account/SaveRequestController.php
index e4471801..c07e8be8 100644
--- a/app/modules/web/Controllers/Account/SaveRequestController.php
+++ b/app/modules/web/Controllers/Account/SaveRequestController.php
@@ -32,9 +32,9 @@ use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Http\JsonResponse;
use SP\Http\Uri;
diff --git a/app/modules/web/Controllers/Account/ViewPassController.php b/app/modules/web/Controllers/Account/ViewPassController.php
index 53acf3fc..a0368558 100644
--- a/app/modules/web/Controllers/Account/ViewPassController.php
+++ b/app/modules/web/Controllers/Account/ViewPassController.php
@@ -26,11 +26,15 @@ namespace SP\Modules\Web\Controllers\Account;
use Exception;
+use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
use SP\DataModel\ItemPreset\Password;
use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Modules\Web\Controllers\Helpers\Account\AccountPasswordHelper;
@@ -72,7 +76,7 @@ final class ViewPassController extends AccountControllerBase
* @param int $parentId
*
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function viewPassAction(int $id, int $parentId = 0): ?bool
{
@@ -110,9 +114,9 @@ final class ViewPassController extends AccountControllerBase
/**
* @return Password
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
*/
private function getPasswordPreset(): ?Password
{
diff --git a/app/modules/web/Controllers/Account/ViewPassHistoryController.php b/app/modules/web/Controllers/Account/ViewPassHistoryController.php
index 5dbd4895..d2cd213f 100644
--- a/app/modules/web/Controllers/Account/ViewPassHistoryController.php
+++ b/app/modules/web/Controllers/Account/ViewPassHistoryController.php
@@ -26,11 +26,15 @@ namespace SP\Modules\Web\Controllers\Account;
use Exception;
+use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
use SP\DataModel\ItemPreset\Password;
use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Modules\Web\Controllers\Helpers\Account\AccountPasswordHelper;
@@ -44,8 +48,8 @@ final class ViewPassHistoryController extends AccountControllerBase
{
use JsonTrait;
- private \SP\Domain\Account\Ports\AccountServiceInterface $accountService;
- private AccountPasswordHelper $accountPasswordHelper;
+ private AccountServiceInterface $accountService;
+ private AccountPasswordHelper $accountPasswordHelper;
private ItemPresetServiceInterface $itemPresetService;
public function __construct(
@@ -71,7 +75,7 @@ final class ViewPassHistoryController extends AccountControllerBase
* @param int $id Account's ID
*
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function viewPassHistoryAction(int $id): ?bool
{
@@ -107,9 +111,9 @@ final class ViewPassHistoryController extends AccountControllerBase
/**
* @return Password
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
*/
private function getPasswordPreset(): ?Password
{
diff --git a/app/modules/web/Controllers/AccountFile/DownloadController.php b/app/modules/web/Controllers/AccountFile/DownloadController.php
index 1e78925f..ddd52cc3 100644
--- a/app/modules/web/Controllers/AccountFile/DownloadController.php
+++ b/app/modules/web/Controllers/AccountFile/DownloadController.php
@@ -27,7 +27,7 @@ namespace SP\Modules\Web\Controllers\AccountFile;
use Exception;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
/**
diff --git a/app/modules/web/Controllers/AccountFile/SearchController.php b/app/modules/web/Controllers/AccountFile/SearchController.php
index 0fb1d416..6e5c911a 100644
--- a/app/modules/web/Controllers/AccountFile/SearchController.php
+++ b/app/modules/web/Controllers/AccountFile/SearchController.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Web\Controllers\AccountFile;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountFileServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/AccountFile/UploadController.php b/app/modules/web/Controllers/AccountFile/UploadController.php
index c24ad323..f8d8407c 100644
--- a/app/modules/web/Controllers/AccountFile/UploadController.php
+++ b/app/modules/web/Controllers/AccountFile/UploadController.php
@@ -29,10 +29,10 @@ use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\FileData;
use SP\Domain\Account\Ports\AccountFileServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\FileHandler;
use SP\Infrastructure\File\FileHandlerInterface;
diff --git a/app/modules/web/Controllers/AccountFile/ViewController.php b/app/modules/web/Controllers/AccountFile/ViewController.php
index 7b0ad410..75d790a1 100644
--- a/app/modules/web/Controllers/AccountFile/ViewController.php
+++ b/app/modules/web/Controllers/AccountFile/ViewController.php
@@ -25,9 +25,10 @@
namespace SP\Modules\Web\Controllers\AccountFile;
use Exception;
+use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Util\FileUtil;
@@ -49,7 +50,7 @@ final class ViewController extends AccountFileBase
* @param int $id
*
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function viewAction(int $id): bool
{
diff --git a/app/modules/web/Controllers/AccountHistoryManager/SearchController.php b/app/modules/web/Controllers/AccountHistoryManager/SearchController.php
index cb3ae3ad..42faf141 100644
--- a/app/modules/web/Controllers/AccountHistoryManager/SearchController.php
+++ b/app/modules/web/Controllers/AccountHistoryManager/SearchController.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Web\Controllers\AccountHistoryManager;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountHistoryServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php b/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php
index bcc72e13..a4a17fcd 100644
--- a/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php
+++ b/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php
@@ -28,12 +28,12 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\AccountUpdateBulkDto;
use SP\Domain\Account\Ports\AccountHistoryServiceInterface;
use SP\Domain\Account\Ports\AccountPresetServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/AccountManager/SearchController.php b/app/modules/web/Controllers/AccountManager/SearchController.php
index 951c240a..04df7b76 100644
--- a/app/modules/web/Controllers/AccountManager/SearchController.php
+++ b/app/modules/web/Controllers/AccountManager/SearchController.php
@@ -25,15 +25,15 @@
namespace SP\Modules\Web\Controllers\AccountManager;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Ports\AccountSearchServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Account\Search\AccountSearchFilter;
use SP\Domain\Auth\Services\AuthException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php b/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php
index ab5bd4b2..081e8d8b 100644
--- a/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php
+++ b/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\AuthToken;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\Domain\Auth\Ports\AuthTokenServiceInterface;
use SP\Domain\Auth\Services\AuthTokenService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/AuthToken/SaveCreateController.php b/app/modules/web/Controllers/AuthToken/SaveCreateController.php
index 83ecff9d..f3042dee 100644
--- a/app/modules/web/Controllers/AuthToken/SaveCreateController.php
+++ b/app/modules/web/Controllers/AuthToken/SaveCreateController.php
@@ -27,8 +27,8 @@ namespace SP\Modules\Web\Controllers\AuthToken;
use Exception;
use JsonException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/AuthToken/SaveEditController.php b/app/modules/web/Controllers/AuthToken/SaveEditController.php
index c8cb813b..65d9cde6 100644
--- a/app/modules/web/Controllers/AuthToken/SaveEditController.php
+++ b/app/modules/web/Controllers/AuthToken/SaveEditController.php
@@ -28,8 +28,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/AuthToken/SearchController.php b/app/modules/web/Controllers/AuthToken/SearchController.php
index f6ac1bef..cb3e81db 100644
--- a/app/modules/web/Controllers/AuthToken/SearchController.php
+++ b/app/modules/web/Controllers/AuthToken/SearchController.php
@@ -26,11 +26,11 @@ namespace SP\Modules\Web\Controllers\AuthToken;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Ports\AuthTokenServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Category/CategoryViewBase.php b/app/modules/web/Controllers/Category/CategoryViewBase.php
index f73c9ec4..7ed6be03 100644
--- a/app/modules/web/Controllers/Category/CategoryViewBase.php
+++ b/app/modules/web/Controllers/Category/CategoryViewBase.php
@@ -26,13 +26,13 @@ namespace SP\Modules\Web\Controllers\Category;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Category/SaveCreateAction.php b/app/modules/web/Controllers/Category/SaveCreateAction.php
index 604bc0c1..ef1d32f6 100644
--- a/app/modules/web/Controllers/Category/SaveCreateAction.php
+++ b/app/modules/web/Controllers/Category/SaveCreateAction.php
@@ -28,8 +28,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Category/SaveEditController.php b/app/modules/web/Controllers/Category/SaveEditController.php
index f18b3fcb..92f5c916 100644
--- a/app/modules/web/Controllers/Category/SaveEditController.php
+++ b/app/modules/web/Controllers/Category/SaveEditController.php
@@ -28,8 +28,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Category/SearchController.php b/app/modules/web/Controllers/Category/SearchController.php
index ae0e3f7f..5e913720 100644
--- a/app/modules/web/Controllers/Category/SearchController.php
+++ b/app/modules/web/Controllers/Category/SearchController.php
@@ -27,11 +27,11 @@ namespace SP\Modules\Web\Controllers\Category;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Client/ClientViewBase.php b/app/modules/web/Controllers/Client/ClientViewBase.php
index 82d53d73..dca69abb 100644
--- a/app/modules/web/Controllers/Client/ClientViewBase.php
+++ b/app/modules/web/Controllers/Client/ClientViewBase.php
@@ -27,13 +27,13 @@ namespace SP\Modules\Web\Controllers\Client;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Client/SaveCreateController.php b/app/modules/web/Controllers/Client/SaveCreateController.php
index 636ce7cf..9382ca27 100644
--- a/app/modules/web/Controllers/Client/SaveCreateController.php
+++ b/app/modules/web/Controllers/Client/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/Client/SaveEditController.php b/app/modules/web/Controllers/Client/SaveEditController.php
index 86430272..c4cced62 100644
--- a/app/modules/web/Controllers/Client/SaveEditController.php
+++ b/app/modules/web/Controllers/Client/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/Client/SearchController.php b/app/modules/web/Controllers/Client/SearchController.php
index 5432eaf5..8a69362f 100644
--- a/app/modules/web/Controllers/Client/SearchController.php
+++ b/app/modules/web/Controllers/Client/SearchController.php
@@ -27,11 +27,11 @@ namespace SP\Modules\Web\Controllers\Client;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/ConfigAccount/SaveController.php b/app/modules/web/Controllers/ConfigAccount/SaveController.php
index d664e233..bc0b5c88 100644
--- a/app/modules/web/Controllers/ConfigAccount/SaveController.php
+++ b/app/modules/web/Controllers/ConfigAccount/SaveController.php
@@ -25,13 +25,13 @@
namespace SP\Modules\Web\Controllers\ConfigAccount;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\ConfigTrait;
diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php b/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php
index 78326411..d3db20e4 100644
--- a/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php
+++ b/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php
@@ -26,13 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigBackup;
use Exception;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Services\BackupFiles;
use SP\Infrastructure\File\FileHandler;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php b/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php
index 13b02d57..4e4c92da 100644
--- a/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php
+++ b/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php
@@ -25,13 +25,13 @@
namespace SP\Modules\Web\Controllers\ConfigBackup;
use Exception;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Services\BackupFiles;
use SP\Infrastructure\File\FileHandler;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php b/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php
index dc3bb1dd..25e27595 100644
--- a/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php
+++ b/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php
@@ -26,13 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigBackup;
use Exception;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Services\XmlExportService;
use SP\Infrastructure\File\FileHandler;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigBackup/FileBackupController.php b/app/modules/web/Controllers/ConfigBackup/FileBackupController.php
index d34005a4..719f90a3 100644
--- a/app/modules/web/Controllers/ConfigBackup/FileBackupController.php
+++ b/app/modules/web/Controllers/ConfigBackup/FileBackupController.php
@@ -26,14 +26,14 @@ namespace SP\Modules\Web\Controllers\ConfigBackup;
use Exception;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Ports\FileBackupServiceInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigBackup/XmlExportController.php b/app/modules/web/Controllers/ConfigBackup/XmlExportController.php
index b33e1f46..055a341a 100644
--- a/app/modules/web/Controllers/ConfigBackup/XmlExportController.php
+++ b/app/modules/web/Controllers/ConfigBackup/XmlExportController.php
@@ -25,14 +25,14 @@
namespace SP\Modules\Web\Controllers\ConfigBackup;
use Exception;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Ports\XmlExportServiceInterface;
use SP\Domain\Export\Ports\XmlVerifyServiceInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/ConfigEncryption/RefreshController.php b/app/modules/web/Controllers/ConfigEncryption/RefreshController.php
index 6b459956..152c7688 100644
--- a/app/modules/web/Controllers/ConfigEncryption/RefreshController.php
+++ b/app/modules/web/Controllers/ConfigEncryption/RefreshController.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Crypt\Hash;
use SP\Core\Crypt\Session as CryptSession;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigEncryption/SaveController.php b/app/modules/web/Controllers/ConfigEncryption/SaveController.php
index d4d64179..eb816fe9 100644
--- a/app/modules/web/Controllers/ConfigEncryption/SaveController.php
+++ b/app/modules/web/Controllers/ConfigEncryption/SaveController.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Crypt\Hash;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Domain\Crypt\Services\MasterPassService;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
diff --git a/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php b/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php
index 8d5556f2..91d6f892 100644
--- a/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php
+++ b/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php
@@ -26,11 +26,11 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Domain\Crypt\Ports\TemporaryMasterPassServiceInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php b/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php
index 83b76933..9d2d59a4 100644
--- a/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php
+++ b/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\ConfigGeneral;
use Exception;
use JsonException;
use RuntimeException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Config\Ports\ConfigBackupServiceInterface;
use SP\Domain\Config\Services\ConfigBackupService;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\SimpleControllerHelper;
diff --git a/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php b/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php
index 1d8f19c8..787f0384 100644
--- a/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php
+++ b/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php
@@ -27,12 +27,12 @@ namespace SP\Modules\Web\Controllers\ConfigGeneral;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Infrastructure\File\FileHandler;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/ConfigGeneral/SaveController.php b/app/modules/web/Controllers/ConfigGeneral/SaveController.php
index bf62b855..0518fdf3 100644
--- a/app/modules/web/Controllers/ConfigGeneral/SaveController.php
+++ b/app/modules/web/Controllers/ConfigGeneral/SaveController.php
@@ -25,15 +25,15 @@
namespace SP\Modules\Web\Controllers\ConfigGeneral;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Services\ConfigUtil;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\ConfigTrait;
use SP\Util\Util;
diff --git a/app/modules/web/Controllers/ConfigImport/ImportController.php b/app/modules/web/Controllers/ConfigImport/ImportController.php
index 5d0eea4a..d330f777 100644
--- a/app/modules/web/Controllers/ConfigImport/ImportController.php
+++ b/app/modules/web/Controllers/ConfigImport/ImportController.php
@@ -26,13 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigImport;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Context\SessionContext;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Domain\Import\Ports\ImportServiceInterface;
use SP\Domain\Import\Services\FileImport;
use SP\Domain\Import\Services\ImportParams;
diff --git a/app/modules/web/Controllers/ConfigLdap/CheckController.php b/app/modules/web/Controllers/ConfigLdap/CheckController.php
index f2de9931..48617538 100644
--- a/app/modules/web/Controllers/ConfigLdap/CheckController.php
+++ b/app/modules/web/Controllers/ConfigLdap/CheckController.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\ConfigLdap;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Ports\LdapCheckServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/ConfigLdap/CheckImportController.php b/app/modules/web/Controllers/ConfigLdap/CheckImportController.php
index 44f8b622..0edd175d 100644
--- a/app/modules/web/Controllers/ConfigLdap/CheckImportController.php
+++ b/app/modules/web/Controllers/ConfigLdap/CheckImportController.php
@@ -27,14 +27,14 @@ namespace SP\Modules\Web\Controllers\ConfigLdap;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Ports\LdapCheckServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/ConfigLdap/ConfigLdapTrait.php b/app/modules/web/Controllers/ConfigLdap/ConfigLdapTrait.php
index ce4b9e16..c89c1b44 100644
--- a/app/modules/web/Controllers/ConfigLdap/ConfigLdapTrait.php
+++ b/app/modules/web/Controllers/ConfigLdap/ConfigLdapTrait.php
@@ -24,7 +24,7 @@
namespace SP\Modules\Web\Controllers\ConfigLdap;
-use SP\Core\Exceptions\ValidationException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\RequestInterface;
use SP\Providers\Auth\Ldap\LdapParams;
use SP\Providers\Auth\Ldap\LdapTypeEnum;
diff --git a/app/modules/web/Controllers/ConfigLdap/ImportController.php b/app/modules/web/Controllers/ConfigLdap/ImportController.php
index f8143ded..05d84eba 100644
--- a/app/modules/web/Controllers/ConfigLdap/ImportController.php
+++ b/app/modules/web/Controllers/ConfigLdap/ImportController.php
@@ -29,16 +29,16 @@ use Exception;
use JsonException;
use Klein\Klein;
use SP\Core\Acl\Acl;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\Core\PhpExtensionChecker;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Domain\Import\Ports\LdapImportServiceInterface;
use SP\Domain\Import\Services\LdapImportParams;
diff --git a/app/modules/web/Controllers/ConfigLdap/SaveController.php b/app/modules/web/Controllers/ConfigLdap/SaveController.php
index 47121662..da55835d 100644
--- a/app/modules/web/Controllers/ConfigLdap/SaveController.php
+++ b/app/modules/web/Controllers/ConfigLdap/SaveController.php
@@ -26,14 +26,14 @@ namespace SP\Modules\Web\Controllers\ConfigLdap;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\ConfigTrait;
diff --git a/app/modules/web/Controllers/ConfigMail/CheckController.php b/app/modules/web/Controllers/ConfigMail/CheckController.php
index 453c1f90..d0250951 100644
--- a/app/modules/web/Controllers/ConfigMail/CheckController.php
+++ b/app/modules/web/Controllers/ConfigMail/CheckController.php
@@ -27,15 +27,15 @@ namespace SP\Modules\Web\Controllers\ConfigMail;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Config\Services\ConfigUtil;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\Notification\Ports\MailServiceInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/ConfigMail/SaveController.php b/app/modules/web/Controllers/ConfigMail/SaveController.php
index b461f86a..037e6863 100644
--- a/app/modules/web/Controllers/ConfigMail/SaveController.php
+++ b/app/modules/web/Controllers/ConfigMail/SaveController.php
@@ -25,12 +25,12 @@
namespace SP\Modules\Web\Controllers\ConfigMail;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Config\Services\ConfigUtil;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\ConfigTrait;
diff --git a/app/modules/web/Controllers/ConfigManager/IndexController.php b/app/modules/web/Controllers/ConfigManager/IndexController.php
index 503f6d75..1a24e95e 100644
--- a/app/modules/web/Controllers/ConfigManager/IndexController.php
+++ b/app/modules/web/Controllers/ConfigManager/IndexController.php
@@ -32,16 +32,16 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Crypt\CryptSessionHandler;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\File\MimeType;
use SP\Domain\Core\File\MimeTypesInterface;
use SP\Domain\Crypt\Services\TemporaryMasterPassService;
diff --git a/app/modules/web/Controllers/ConfigWiki/SaveController.php b/app/modules/web/Controllers/ConfigWiki/SaveController.php
index 7b7fdb7c..937ebe83 100644
--- a/app/modules/web/Controllers/ConfigWiki/SaveController.php
+++ b/app/modules/web/Controllers/ConfigWiki/SaveController.php
@@ -25,11 +25,11 @@
namespace SP\Modules\Web\Controllers\ConfigWiki;
use JsonException;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Modules\Web\Controllers\Traits\ConfigTrait;
diff --git a/app/modules/web/Controllers/ControllerBase.php b/app/modules/web/Controllers/ControllerBase.php
index a81a9100..9e71ea5a 100644
--- a/app/modules/web/Controllers/ControllerBase.php
+++ b/app/modules/web/Controllers/ControllerBase.php
@@ -32,15 +32,15 @@ use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Crypt\Hash;
use SP\Core\Events\EventDispatcher;
-use SP\Core\Exceptions\FileNotFoundException;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Core\PhpExtensionChecker;
use SP\DataModel\ProfileData;
use SP\Domain\Auth\Services\AuthException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Services\ConfigFileService;
use SP\Domain\Core\Context\SessionContextInterface;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Http\RequestInterface;
diff --git a/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php b/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php
index f329bf38..c124de03 100644
--- a/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php
+++ b/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\CustomField;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface;
use SP\Domain\CustomField\Ports\CustomFieldTypeServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldDefService;
diff --git a/app/modules/web/Controllers/CustomField/SaveCreateController.php b/app/modules/web/Controllers/CustomField/SaveCreateController.php
index 77dd94ed..b89fd8f6 100644
--- a/app/modules/web/Controllers/CustomField/SaveCreateController.php
+++ b/app/modules/web/Controllers/CustomField/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/CustomField/SaveEditController.php b/app/modules/web/Controllers/CustomField/SaveEditController.php
index 9c64d2f0..1e1c2718 100644
--- a/app/modules/web/Controllers/CustomField/SaveEditController.php
+++ b/app/modules/web/Controllers/CustomField/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/CustomField/SearchController.php b/app/modules/web/Controllers/CustomField/SearchController.php
index 179c644e..b5a45aab 100644
--- a/app/modules/web/Controllers/CustomField/SearchController.php
+++ b/app/modules/web/Controllers/CustomField/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\CustomField;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/Error/DatabaseConnectionController.php b/app/modules/web/Controllers/Error/DatabaseConnectionController.php
index 02830421..6d843cf1 100644
--- a/app/modules/web/Controllers/Error/DatabaseConnectionController.php
+++ b/app/modules/web/Controllers/Error/DatabaseConnectionController.php
@@ -25,7 +25,7 @@
namespace SP\Modules\Web\Controllers\Error;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class DatabaseConnectionController
@@ -50,4 +50,4 @@ final class DatabaseConnectionController extends ErrorBase
$this->view();
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Error/DatabaseErrorController.php b/app/modules/web/Controllers/Error/DatabaseErrorController.php
index 77569fed..3d70b086 100644
--- a/app/modules/web/Controllers/Error/DatabaseErrorController.php
+++ b/app/modules/web/Controllers/Error/DatabaseErrorController.php
@@ -25,7 +25,7 @@
namespace SP\Modules\Web\Controllers\Error;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class DatabaseErrorController
@@ -50,4 +50,4 @@ final class DatabaseErrorController extends ErrorBase
$this->view();
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Error/ErrorBase.php b/app/modules/web/Controllers/Error/ErrorBase.php
index 0ebce38e..47c160d7 100644
--- a/app/modules/web/Controllers/Error/ErrorBase.php
+++ b/app/modules/web/Controllers/Error/ErrorBase.php
@@ -25,7 +25,7 @@
namespace SP\Modules\Web\Controllers\Error;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Modules\Web\Controllers\Helpers\LayoutHelper;
use SP\Mvc\View\TemplateInterface;
@@ -40,8 +40,8 @@ abstract class ErrorBase
/**
* ErrorController constructor.
*
- * @param \SP\Mvc\View\TemplateInterface $template
- * @param \SP\Modules\Web\Controllers\Helpers\LayoutHelper $layoutHelper
+ * @param TemplateInterface $template
+ * @param LayoutHelper $layoutHelper
*/
public function __construct(TemplateInterface $template, LayoutHelper $layoutHelper)
{
@@ -66,4 +66,4 @@ abstract class ErrorBase
die();
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Error/MaintenanceErrorController.php b/app/modules/web/Controllers/Error/MaintenanceErrorController.php
index 65f3a5ff..cabd6531 100644
--- a/app/modules/web/Controllers/Error/MaintenanceErrorController.php
+++ b/app/modules/web/Controllers/Error/MaintenanceErrorController.php
@@ -25,7 +25,7 @@
namespace SP\Modules\Web\Controllers\Error;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
final class MaintenanceErrorController extends ErrorBase
{
@@ -47,4 +47,4 @@ final class MaintenanceErrorController extends ErrorBase
$this->view();
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Eventlog/ClearController.php b/app/modules/web/Controllers/Eventlog/ClearController.php
index a941fb40..332acc53 100644
--- a/app/modules/web/Controllers/Eventlog/ClearController.php
+++ b/app/modules/web/Controllers/Eventlog/ClearController.php
@@ -26,9 +26,12 @@ namespace SP\Modules\Web\Controllers\Eventlog;
use Exception;
+use JsonException;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
+use SP\Domain\Auth\Services\AuthException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
@@ -45,9 +48,9 @@ final class ClearController extends ControllerBase
private EventlogServiceInterface $eventlogService;
/**
- * @throws \SP\Core\Exceptions\SessionTimeout
- * @throws \SP\Domain\Auth\Services\AuthException
- * @throws \JsonException
+ * @throws SessionTimeout
+ * @throws AuthException
+ * @throws JsonException
*/
public function __construct(
Application $application,
@@ -64,7 +67,7 @@ final class ClearController extends ControllerBase
/**
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function clearAction(): bool
{
diff --git a/app/modules/web/Controllers/Eventlog/IndexController.php b/app/modules/web/Controllers/Eventlog/IndexController.php
index 6ba557d8..eeafcb8f 100644
--- a/app/modules/web/Controllers/Eventlog/IndexController.php
+++ b/app/modules/web/Controllers/Eventlog/IndexController.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Web\Controllers\Eventlog;
use DI\DependencyException;
use DI\NotFoundException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Modules\Web\Controllers\ControllerBase;
/**
diff --git a/app/modules/web/Controllers/Eventlog/SearchController.php b/app/modules/web/Controllers/Eventlog/SearchController.php
index 6abbabbe..b6416611 100644
--- a/app/modules/web/Controllers/Eventlog/SearchController.php
+++ b/app/modules/web/Controllers/Eventlog/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\Eventlog;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountHelper.php
index bff4b750..ab92c3b8 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountHelper.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountHelper.php
@@ -24,15 +24,9 @@
namespace SP\Modules\Web\Controllers\Helpers\Account;
-use SP\Core\Acl\AccountPermissionException;
use SP\Core\Acl\Acl;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemPreset\AccountPermission;
use SP\DataModel\ItemPreset\AccountPrivate;
use SP\DataModel\ProfileData;
@@ -47,7 +41,13 @@ use SP\Domain\Account\Services\PublicLinkService;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Acl\AccountPermissionException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountHelperBase.php b/app/modules/web/Controllers/Helpers/Account/AccountHelperBase.php
index cb504dff..fb594381 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountHelperBase.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountHelperBase.php
@@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Helpers\Account;
use SP\Core\Acl\Acl;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Domain\User\Services\UpdatedMasterPassException;
use SP\Http\RequestInterface;
@@ -74,7 +75,7 @@ abstract class AccountHelperBase extends HelperBase
* @throws NoSuchItemException
* @throws UnauthorizedPageException
* @throws UpdatedMasterPassException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
final protected function checkActionAccess(): void
{
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountHistoryHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountHistoryHelper.php
index 1f472d70..3a4070f4 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountHistoryHelper.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountHistoryHelper.php
@@ -24,10 +24,8 @@
namespace SP\Modules\Web\Controllers\Helpers\Account;
-use SP\Core\Acl\AccountPermissionException;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\AccountAclDto;
use SP\Domain\Account\Models\AccountHistory;
use SP\Domain\Account\Ports\AccountAclServiceInterface;
@@ -37,8 +35,16 @@ use SP\Domain\Account\Ports\AccountToUserServiceInterface;
use SP\Domain\Account\Services\AccountAcl;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Acl\AccountPermissionException;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
+use SP\Domain\User\Services\UpdatedMasterPassException;
use SP\Http\RequestInterface;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Mvc\View\Components\SelectItemAdapter;
use SP\Mvc\View\TemplateInterface;
@@ -70,17 +76,17 @@ final class AccountHistoryHelper extends AccountHelperBase
}
/**
- * @param \SP\Domain\Account\Models\AccountHistory $accountHistoryData
+ * @param AccountHistory $accountHistoryData
* @param int $actionId
*
- * @throws \SP\Core\Acl\AccountPermissionException
- * @throws \SP\Core\Acl\UnauthorizedPageException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Domain\User\Services\UpdatedMasterPassException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws AccountPermissionException
+ * @throws UnauthorizedPageException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
+ * @throws UpdatedMasterPassException
+ * @throws NoSuchItemException
*/
public function setView(AccountHistory $accountHistoryData, int $actionId): void
{
@@ -144,10 +150,10 @@ final class AccountHistoryHelper extends AccountHelperBase
*
* @param AccountHistory $accountHistoryData
*
- * @throws \SP\Core\Acl\AccountPermissionException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws AccountPermissionException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
protected function checkAccess(AccountHistory $accountHistoryData): void
{
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php
index a1b9c404..45515d3a 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php
@@ -32,10 +32,10 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Session as CryptSession;
-use SP\Core\Exceptions\FileNotFoundException;
use SP\Domain\Account\Adapters\AccountPassData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Http\RequestInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountRequestHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountRequestHelper.php
index bef063ad..88742c25 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountRequestHelper.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountRequestHelper.php
@@ -27,6 +27,10 @@ namespace SP\Modules\Web\Controllers\Helpers\Account;
use SP\Domain\Account\Dtos\AccountEnrichedDto;
use SP\Domain\Account\Services\AccountAcl;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\User\Services\UpdatedMasterPassException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
* Class AccountRequestHelper
@@ -36,14 +40,14 @@ final class AccountRequestHelper extends AccountHelperBase
/**
* Sets account's view variables
*
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountDetailsResponse
+ * @param AccountEnrichedDto $accountDetailsResponse
* @param int $actionId
*
* @return bool
- * @throws \SP\Core\Acl\UnauthorizedPageException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Domain\User\Services\UpdatedMasterPassException
+ * @throws UnauthorizedPageException
+ * @throws NoSuchItemException
+ * @throws ServiceException
+ * @throws UpdatedMasterPassException
*/
public function setViewForRequest(
AccountEnrichedDto $accountDetailsResponse,
diff --git a/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php
index 4c8755e7..f1704bc9 100644
--- a/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php
+++ b/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php
@@ -28,9 +28,6 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ProfileData;
use SP\DataModel\UserPreferencesData;
use SP\Domain\Account\Ports\AccountSearchServiceInterface;
@@ -40,6 +37,9 @@ use SP\Domain\Account\Services\AccountSearchItem;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Html\DataGrid\Action\DataGridAction;
use SP\Html\DataGrid\Action\DataGridActionSearch;
diff --git a/app/modules/web/Controllers/Helpers/ItemPresetHelper.php b/app/modules/web/Controllers/Helpers/ItemPresetHelper.php
index 21d81f70..57dc64f9 100644
--- a/app/modules/web/Controllers/Helpers/ItemPresetHelper.php
+++ b/app/modules/web/Controllers/Helpers/ItemPresetHelper.php
@@ -25,13 +25,15 @@
namespace SP\Modules\Web\Controllers\Helpers;
use SP\Core\Application;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\NoSuchPropertyException;
use SP\DataModel\ItemPreset\AccountPermission;
use SP\DataModel\ItemPreset\AccountPrivate;
use SP\DataModel\ItemPreset\Password;
use SP\DataModel\ItemPreset\SessionTimeout;
use SP\Domain\Account\Models\ItemPreset;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
@@ -131,7 +133,7 @@ final class ItemPresetHelper extends HelperBase
*/
public function makeAccountPasswordView(ItemPreset $itemPresetData): void
{
- $password = $itemPresetData->hydrate(Password::class) ?? new Password;
+ $password = $itemPresetData->hydrate(Password::class) ?? new Password();
$this->view->assign('typeTemplate', 'item_preset-password');
$this->view->assign('presetName', __('Account Password Preset'));
@@ -142,8 +144,8 @@ final class ItemPresetHelper extends HelperBase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function setCommon(ItemPreset $itemPresetData): void
{
diff --git a/app/modules/web/Controllers/Helpers/LayoutHelper.php b/app/modules/web/Controllers/Helpers/LayoutHelper.php
index 8072735a..ee34d917 100644
--- a/app/modules/web/Controllers/Helpers/LayoutHelper.php
+++ b/app/modules/web/Controllers/Helpers/LayoutHelper.php
@@ -27,11 +27,11 @@ namespace SP\Modules\Web\Controllers\Helpers;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\AppInfoInterface;
use SP\Domain\Core\Crypt\CryptPKIInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Domain\Install\Services\InstallerService;
use SP\Html\DataGrid\Action\DataGridAction;
diff --git a/app/modules/web/Controllers/Install/IndexController.php b/app/modules/web/Controllers/Install/IndexController.php
index 464fee0c..c4d7f78f 100644
--- a/app/modules/web/Controllers/Install/IndexController.php
+++ b/app/modules/web/Controllers/Install/IndexController.php
@@ -24,8 +24,8 @@
namespace SP\Modules\Web\Controllers\Install;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Modules\Web\Controllers\ControllerBase;
use SP\Mvc\View\Components\SelectItemAdapter;
@@ -67,4 +67,4 @@ final class IndexController extends ControllerBase
$this->view();
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Install/InstallController.php b/app/modules/web/Controllers/Install/InstallController.php
index bc36d247..9091a50b 100644
--- a/app/modules/web/Controllers/Install/InstallController.php
+++ b/app/modules/web/Controllers/Install/InstallController.php
@@ -27,6 +27,7 @@ namespace SP\Modules\Web\Controllers\Install;
use Exception;
use SP\Core\Application;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallDataFactory;
use SP\Domain\Install\Ports\InstallerServiceInterface;
use SP\Http\JsonResponse;
@@ -41,7 +42,7 @@ final class InstallController extends ControllerBase
{
use JsonTrait;
- private \SP\Domain\Install\Ports\InstallerServiceInterface $installer;
+ private InstallerServiceInterface $installer;
public function __construct(
Application $application,
@@ -55,7 +56,7 @@ final class InstallController extends ControllerBase
/**
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function installAction(): bool
{
diff --git a/app/modules/web/Controllers/ItemManager/IndexController.php b/app/modules/web/Controllers/ItemManager/IndexController.php
index 986cd199..30b5c31e 100644
--- a/app/modules/web/Controllers/ItemManager/IndexController.php
+++ b/app/modules/web/Controllers/ItemManager/IndexController.php
@@ -27,8 +27,6 @@ namespace SP\Modules\Web\Controllers\ItemManager;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Ports\AccountFileServiceInterface;
use SP\Domain\Account\Ports\AccountHistoryServiceInterface;
@@ -36,6 +34,8 @@ use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Domain\Tag\Ports\TagServiceInterface;
diff --git a/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php b/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php
index 32f5b4f3..c304df2e 100644
--- a/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php
+++ b/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php
@@ -27,12 +27,12 @@ namespace SP\Modules\Web\Controllers\ItemPreset;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Models\ItemPreset;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/app/modules/web/Controllers/ItemPreset/SaveCreateController.php b/app/modules/web/Controllers/ItemPreset/SaveCreateController.php
index ec7e6a42..048c5b19 100644
--- a/app/modules/web/Controllers/ItemPreset/SaveCreateController.php
+++ b/app/modules/web/Controllers/ItemPreset/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/ItemPreset/SaveEditController.php b/app/modules/web/Controllers/ItemPreset/SaveEditController.php
index b11c6f7c..7c414840 100644
--- a/app/modules/web/Controllers/ItemPreset/SaveEditController.php
+++ b/app/modules/web/Controllers/ItemPreset/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/ItemPreset/SearchController.php b/app/modules/web/Controllers/ItemPreset/SearchController.php
index e5f99d52..d65c115e 100644
--- a/app/modules/web/Controllers/ItemPreset/SearchController.php
+++ b/app/modules/web/Controllers/ItemPreset/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\ItemPreset;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/Items/AccountsUserController.php b/app/modules/web/Controllers/Items/AccountsUserController.php
index cdf06d90..ec8b37a4 100644
--- a/app/modules/web/Controllers/Items/AccountsUserController.php
+++ b/app/modules/web/Controllers/Items/AccountsUserController.php
@@ -26,6 +26,9 @@ namespace SP\Modules\Web\Controllers\Items;
use SP\Core\Application;
use SP\Domain\Account\Ports\AccountServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\SimpleControllerBase;
@@ -56,9 +59,9 @@ final class AccountsUserController extends SimpleControllerBase
*
* @param int|null $accountId
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function accountsUserAction(?int $accountId = null): void
{
diff --git a/app/modules/web/Controllers/Items/CategoriesController.php b/app/modules/web/Controllers/Items/CategoriesController.php
index 9ae0bf63..00fb80a2 100644
--- a/app/modules/web/Controllers/Items/CategoriesController.php
+++ b/app/modules/web/Controllers/Items/CategoriesController.php
@@ -25,10 +25,10 @@
namespace SP\Modules\Web\Controllers\Items;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Category\Ports\CategoryServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Mvc\Controller\SimpleControllerHelper;
diff --git a/app/modules/web/Controllers/Items/ClientsController.php b/app/modules/web/Controllers/Items/ClientsController.php
index 1fd3af69..0d12cc77 100644
--- a/app/modules/web/Controllers/Items/ClientsController.php
+++ b/app/modules/web/Controllers/Items/ClientsController.php
@@ -26,6 +26,9 @@ namespace SP\Modules\Web\Controllers\Items;
use SP\Core\Application;
use SP\Domain\Client\Ports\ClientServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Mvc\Controller\SimpleControllerHelper;
@@ -51,9 +54,9 @@ final class ClientsController extends SimpleControllerBase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function clientsAction(): void
{
diff --git a/app/modules/web/Controllers/Items/NotificationsController.php b/app/modules/web/Controllers/Items/NotificationsController.php
index 12d4adbf..605e5500 100644
--- a/app/modules/web/Controllers/Items/NotificationsController.php
+++ b/app/modules/web/Controllers/Items/NotificationsController.php
@@ -26,6 +26,9 @@ namespace SP\Modules\Web\Controllers\Items;
use SP\Core\Application;
use SP\DataModel\NotificationData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Notification\Ports\NotificationServiceInterface;
use SP\Html\Html;
use SP\Http\Json;
@@ -54,9 +57,9 @@ final class NotificationsController extends SimpleControllerBase
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function notificationsAction(): void
{
diff --git a/app/modules/web/Controllers/Items/TagsController.php b/app/modules/web/Controllers/Items/TagsController.php
index ff13cf0a..6a413ab0 100644
--- a/app/modules/web/Controllers/Items/TagsController.php
+++ b/app/modules/web/Controllers/Items/TagsController.php
@@ -25,9 +25,9 @@
namespace SP\Modules\Web\Controllers\Items;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Http\Json;
use SP\Modules\Web\Controllers\SimpleControllerBase;
diff --git a/app/modules/web/Controllers/Notification/IndexController.php b/app/modules/web/Controllers/Notification/IndexController.php
index d1882751..21f98a9a 100644
--- a/app/modules/web/Controllers/Notification/IndexController.php
+++ b/app/modules/web/Controllers/Notification/IndexController.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Web\Controllers\Notification;
use DI\DependencyException;
use DI\NotFoundException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Modules\Web\Controllers\ControllerBase;
/**
diff --git a/app/modules/web/Controllers/Notification/NotificationViewBase.php b/app/modules/web/Controllers/Notification/NotificationViewBase.php
index fc019f48..6946e27b 100644
--- a/app/modules/web/Controllers/Notification/NotificationViewBase.php
+++ b/app/modules/web/Controllers/Notification/NotificationViewBase.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\Notification;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\NotificationData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Notification\Ports\NotificationServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/app/modules/web/Controllers/Notification/SearchController.php b/app/modules/web/Controllers/Notification/SearchController.php
index 5f652fef..b7166685 100644
--- a/app/modules/web/Controllers/Notification/SearchController.php
+++ b/app/modules/web/Controllers/Notification/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\Notification;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Notification\Ports\NotificationServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/Plugin/IndexController.php b/app/modules/web/Controllers/Plugin/IndexController.php
index c0950933..2be6a0e1 100644
--- a/app/modules/web/Controllers/Plugin/IndexController.php
+++ b/app/modules/web/Controllers/Plugin/IndexController.php
@@ -24,9 +24,9 @@
namespace SP\Modules\Web\Controllers\Plugin;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
/**
* Class IndexController
diff --git a/app/modules/web/Controllers/Plugin/PluginSearchBase.php b/app/modules/web/Controllers/Plugin/PluginSearchBase.php
index bdacf124..95d7208b 100644
--- a/app/modules/web/Controllers/Plugin/PluginSearchBase.php
+++ b/app/modules/web/Controllers/Plugin/PluginSearchBase.php
@@ -26,6 +26,8 @@ namespace SP\Modules\Web\Controllers\Plugin;
use SP\Core\Application;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Modules\Web\Controllers\ControllerBase;
@@ -39,7 +41,8 @@ use SP\Mvc\Controller\WebControllerHelper;
*/
abstract class PluginSearchBase extends ControllerBase
{
- use JsonTrait, ItemTrait;
+ use ItemTrait;
+ use JsonTrait;
private PluginServiceInterface $pluginService;
private PluginGrid $pluginGrid;
@@ -61,9 +64,9 @@ abstract class PluginSearchBase extends ControllerBase
/**
* getSearchGrid
*
- * @return \SP\Html\DataGrid\DataGridInterface
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return DataGridInterface
+ * @throws ConstraintException
+ * @throws QueryException
*/
protected function getSearchGrid(): DataGridInterface
{
diff --git a/app/modules/web/Controllers/Plugin/SearchController.php b/app/modules/web/Controllers/Plugin/SearchController.php
index 0ca947fa..9a53c097 100644
--- a/app/modules/web/Controllers/Plugin/SearchController.php
+++ b/app/modules/web/Controllers/Plugin/SearchController.php
@@ -26,9 +26,9 @@ namespace SP\Modules\Web\Controllers\Plugin;
use JsonException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Http\JsonResponse;
/**
diff --git a/app/modules/web/Controllers/Plugin/ViewController.php b/app/modules/web/Controllers/Plugin/ViewController.php
index 92a19858..43b51106 100644
--- a/app/modules/web/Controllers/Plugin/ViewController.php
+++ b/app/modules/web/Controllers/Plugin/ViewController.php
@@ -30,9 +30,9 @@ use JsonException;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
use SP\Http\JsonResponse;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php b/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php
index a3010e46..cba011e1 100644
--- a/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php
+++ b/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php
@@ -28,13 +28,13 @@ namespace SP\Modules\Web\Controllers\PublicLink;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapWeb;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\PublicLinkListData;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Account\Ports\PublicLinkServiceInterface;
use SP\Domain\Account\Services\PublicLinkService;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\ControllerBase;
use SP\Mvc\Controller\WebControllerHelper;
diff --git a/app/modules/web/Controllers/PublicLink/SaveCreate.php b/app/modules/web/Controllers/PublicLink/SaveCreate.php
index 8bafb077..d8ce9dc5 100644
--- a/app/modules/web/Controllers/PublicLink/SaveCreate.php
+++ b/app/modules/web/Controllers/PublicLink/SaveCreate.php
@@ -28,8 +28,8 @@ namespace SP\Modules\Web\Controllers\PublicLink;
use Exception;
use JsonException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/PublicLink/SearchController.php b/app/modules/web/Controllers/PublicLink/SearchController.php
index 3779aff7..998e2ba2 100644
--- a/app/modules/web/Controllers/PublicLink/SearchController.php
+++ b/app/modules/web/Controllers/PublicLink/SearchController.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\PublicLink;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\PublicLinkServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Resource/ResourceBase.php b/app/modules/web/Controllers/Resource/ResourceBase.php
index 1acdd181..17876b61 100644
--- a/app/modules/web/Controllers/Resource/ResourceBase.php
+++ b/app/modules/web/Controllers/Resource/ResourceBase.php
@@ -25,6 +25,8 @@
namespace SP\Modules\Web\Controllers\Resource;
use SP\Core\Application;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\Minify;
use SP\Modules\Web\Controllers\SimpleControllerBase;
use SP\Mvc\Controller\SimpleControllerHelper;
@@ -37,8 +39,8 @@ abstract class ResourceBase extends SimpleControllerBase
protected Minify $minify;
/**
- * @throws \SP\Core\Exceptions\SessionTimeout
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SessionTimeout
+ * @throws SPException
*/
public function __construct(
Application $application,
@@ -51,4 +53,4 @@ abstract class ResourceBase extends SimpleControllerBase
$this->request->verifySignature($this->configData->getPasswordSalt());
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/SecurityManager/IndexController.php b/app/modules/web/Controllers/SecurityManager/IndexController.php
index d6cf1428..2c451b95 100644
--- a/app/modules/web/Controllers/SecurityManager/IndexController.php
+++ b/app/modules/web/Controllers/SecurityManager/IndexController.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\SecurityManager;
use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Html\DataGrid\DataGridTab;
diff --git a/app/modules/web/Controllers/SimpleControllerBase.php b/app/modules/web/Controllers/SimpleControllerBase.php
index bcef797c..7ae9e1f2 100644
--- a/app/modules/web/Controllers/SimpleControllerBase.php
+++ b/app/modules/web/Controllers/SimpleControllerBase.php
@@ -25,15 +25,15 @@
namespace SP\Modules\Web\Controllers;
use SP\Core\Acl\Acl;
-use SP\Core\Acl\UnauthorizedPageException;
use SP\Core\Application;
use SP\Core\Events\EventDispatcher;
-use SP\Core\Exceptions\SessionTimeout;
-use SP\Core\Exceptions\SPException;
use SP\Core\PhpExtensionChecker;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Services\ConfigFileService;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Http\Request;
use SP\Modules\Web\Controllers\Traits\WebControllerTrait;
diff --git a/app/modules/web/Controllers/Status/CheckNotices.php b/app/modules/web/Controllers/Status/CheckNotices.php
index 8d1433c9..8bd168cf 100644
--- a/app/modules/web/Controllers/Status/CheckNotices.php
+++ b/app/modules/web/Controllers/Status/CheckNotices.php
@@ -26,8 +26,8 @@ namespace SP\Modules\Web\Controllers\Status;
use JsonException;
-use SP\Core\Exceptions\CheckException;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use Throwable;
diff --git a/app/modules/web/Controllers/Status/StatusController.php b/app/modules/web/Controllers/Status/StatusController.php
index 7fcf710a..c97745ba 100644
--- a/app/modules/web/Controllers/Status/StatusController.php
+++ b/app/modules/web/Controllers/Status/StatusController.php
@@ -25,8 +25,8 @@
namespace SP\Modules\Web\Controllers\Status;
use JsonException;
-use SP\Core\Exceptions\CheckException;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Util\VersionUtil;
diff --git a/app/modules/web/Controllers/Tag/SaveCreateController.php b/app/modules/web/Controllers/Tag/SaveCreateController.php
index f000d924..fa732f8b 100644
--- a/app/modules/web/Controllers/Tag/SaveCreateController.php
+++ b/app/modules/web/Controllers/Tag/SaveCreateController.php
@@ -28,8 +28,8 @@ namespace SP\Modules\Web\Controllers\Tag;
use Exception;
use JsonException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/Tag/SaveEditController.php b/app/modules/web/Controllers/Tag/SaveEditController.php
index c2d7046d..865a5fc6 100644
--- a/app/modules/web/Controllers/Tag/SaveEditController.php
+++ b/app/modules/web/Controllers/Tag/SaveEditController.php
@@ -28,8 +28,8 @@ namespace SP\Modules\Web\Controllers\Tag;
use Exception;
use JsonException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/Tag/SearchController.php b/app/modules/web/Controllers/Tag/SearchController.php
index 732b7a25..9de7593e 100644
--- a/app/modules/web/Controllers/Tag/SearchController.php
+++ b/app/modules/web/Controllers/Tag/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\Tag;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/Tag/TagViewBase.php b/app/modules/web/Controllers/Tag/TagViewBase.php
index 75a91437..265c3c9a 100644
--- a/app/modules/web/Controllers/Tag/TagViewBase.php
+++ b/app/modules/web/Controllers/Tag/TagViewBase.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\Tag;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\TagData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Track/ClearController.php b/app/modules/web/Controllers/Track/ClearController.php
index 613d7e44..e483475f 100644
--- a/app/modules/web/Controllers/Track/ClearController.php
+++ b/app/modules/web/Controllers/Track/ClearController.php
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\Track;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedActionException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedActionException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/Track/SearchController.php b/app/modules/web/Controllers/Track/SearchController.php
index 6f5b8502..2512a896 100644
--- a/app/modules/web/Controllers/Track/SearchController.php
+++ b/app/modules/web/Controllers/Track/SearchController.php
@@ -26,12 +26,12 @@ namespace SP\Modules\Web\Controllers\Track;
use JsonException;
-use SP\Core\Acl\UnauthorizedActionException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedActionException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Modules\Web\Controllers\ControllerBase;
diff --git a/app/modules/web/Controllers/Track/UnlockController.php b/app/modules/web/Controllers/Track/UnlockController.php
index 586fdd15..79870b64 100644
--- a/app/modules/web/Controllers/Track/UnlockController.php
+++ b/app/modules/web/Controllers/Track/UnlockController.php
@@ -26,10 +26,10 @@ namespace SP\Modules\Web\Controllers\Track;
use Exception;
use JsonException;
-use SP\Core\Acl\UnauthorizedActionException;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\UnauthorizedActionException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/Traits/JsonTrait.php b/app/modules/web/Controllers/Traits/JsonTrait.php
index 127fcfd6..2cf03b42 100644
--- a/app/modules/web/Controllers/Traits/JsonTrait.php
+++ b/app/modules/web/Controllers/Traits/JsonTrait.php
@@ -25,8 +25,9 @@
namespace SP\Modules\Web\Controllers\Traits;
use Exception;
+use Klein\Klein;
use SP\Core\Context\SessionContext;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Http\JsonResponse;
@@ -34,7 +35,7 @@ use SP\Http\JsonResponse;
* Trait JsonTrait
*
* @property SessionContext $session
- * @property \Klein\Klein $router
+ * @property Klein $router
*/
trait JsonTrait
{
@@ -46,7 +47,7 @@ trait JsonTrait
* @param array|null $messages Untranslated massages array of strings
*
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function returnJsonResponse(int $status, string $description, ?array $messages = null): bool
{
@@ -70,7 +71,7 @@ trait JsonTrait
* @param array|null $messages
*
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function returnJsonResponseData(
$data,
@@ -97,11 +98,11 @@ trait JsonTrait
/**
* Returns JSON response
*
- * @param \Exception $exception
+ * @param Exception $exception
* @param int $status
*
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function returnJsonResponseException(Exception $exception, int $status = JsonResponse::JSON_ERROR): bool
{
@@ -115,4 +116,4 @@ trait JsonTrait
return Json::factory($this->router->response())->returnJson($jsonResponse);
}
-}
\ No newline at end of file
+}
diff --git a/app/modules/web/Controllers/Traits/WebControllerTrait.php b/app/modules/web/Controllers/Traits/WebControllerTrait.php
index d7acfd1f..cd04007d 100644
--- a/app/modules/web/Controllers/Traits/WebControllerTrait.php
+++ b/app/modules/web/Controllers/Traits/WebControllerTrait.php
@@ -24,8 +24,8 @@
namespace SP\Modules\Web\Controllers\Traits;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\RequestInterface;
use SP\Mvc\Controller\ControllerTrait;
@@ -66,7 +66,7 @@ trait WebControllerTrait
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
private function handleSessionTimeout(): void
{
diff --git a/app/modules/web/Controllers/Upgrade/UpgradeController.php b/app/modules/web/Controllers/Upgrade/UpgradeController.php
index f18b3b25..c1349d63 100644
--- a/app/modules/web/Controllers/Upgrade/UpgradeController.php
+++ b/app/modules/web/Controllers/Upgrade/UpgradeController.php
@@ -25,13 +25,16 @@
namespace SP\Modules\Web\Controllers\Upgrade;
use Exception;
+use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\Persistence\Ports\UpgradeDatabaseServiceInterface;
use SP\Domain\Upgrade\Services\UpgradeAppService;
use SP\Domain\Upgrade\Services\UpgradeDatabaseService;
+use SP\Domain\Upgrade\Services\UpgradeException;
use SP\Http\JsonResponse;
+use SP\Infrastructure\File\FileException;
use SP\Modules\Web\Controllers\ControllerBase;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\WebControllerHelper;
@@ -62,7 +65,7 @@ final class UpgradeController extends ControllerBase
/**
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function upgradeAction(): bool
{
@@ -90,7 +93,7 @@ final class UpgradeController extends ControllerBase
/**
* @return void
- * @throws \SP\Core\Exceptions\ValidationException
+ * @throws ValidationException
*/
private function checkEnvironment(): void
{
@@ -118,8 +121,8 @@ final class UpgradeController extends ControllerBase
/**
* @return void
- * @throws \SP\Domain\Upgrade\Services\UpgradeException
- * @throws \SP\Infrastructure\File\FileException
+ * @throws UpgradeException
+ * @throws FileException
*/
private function handleApplication(): void
{
diff --git a/app/modules/web/Controllers/User/SaveCreateController.php b/app/modules/web/Controllers/User/SaveCreateController.php
index 41a65b6f..ae09a0a0 100644
--- a/app/modules/web/Controllers/User/SaveCreateController.php
+++ b/app/modules/web/Controllers/User/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/User/SaveEditController.php b/app/modules/web/Controllers/User/SaveEditController.php
index 0c7e8141..cd18b53c 100644
--- a/app/modules/web/Controllers/User/SaveEditController.php
+++ b/app/modules/web/Controllers/User/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/User/SaveEditPassController.php b/app/modules/web/Controllers/User/SaveEditPassController.php
index cd7427e9..3e498410 100644
--- a/app/modules/web/Controllers/User/SaveEditPassController.php
+++ b/app/modules/web/Controllers/User/SaveEditPassController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
diff --git a/app/modules/web/Controllers/User/SearchController.php b/app/modules/web/Controllers/User/SearchController.php
index 9e06aae3..7dfdc0dd 100644
--- a/app/modules/web/Controllers/User/SearchController.php
+++ b/app/modules/web/Controllers/User/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\User;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/User/UserSaveBase.php b/app/modules/web/Controllers/User/UserSaveBase.php
index c9c37351..03f44645 100644
--- a/app/modules/web/Controllers/User/UserSaveBase.php
+++ b/app/modules/web/Controllers/User/UserSaveBase.php
@@ -25,8 +25,13 @@
namespace SP\Modules\Web\Controllers\User;
+use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
+use PHPMailer\PHPMailer\Exception;
use SP\Core\Application;
use SP\DataModel\UserData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\Notification\Ports\MailServiceInterface;
use SP\Domain\User\Ports\UserPassRecoverServiceInterface;
@@ -70,11 +75,11 @@ abstract class UserSaveBase extends ControllerBase
* @param int $userId
* @param UserData $userData
*
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \PHPMailer\PHPMailer\Exception
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws EnvironmentIsBrokenException
+ * @throws Exception
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
final protected function checkChangeUserPass(int $userId, UserData $userData): void
{
diff --git a/app/modules/web/Controllers/User/UserViewBase.php b/app/modules/web/Controllers/User/UserViewBase.php
index ab14ad1d..6bd5753a 100644
--- a/app/modules/web/Controllers/User/UserViewBase.php
+++ b/app/modules/web/Controllers/User/UserViewBase.php
@@ -27,12 +27,12 @@ namespace SP\Modules\Web\Controllers\User;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
diff --git a/app/modules/web/Controllers/UserGroup/SaveCreateController.php b/app/modules/web/Controllers/UserGroup/SaveCreateController.php
index cda11af4..9f60cd0d 100644
--- a/app/modules/web/Controllers/UserGroup/SaveCreateController.php
+++ b/app/modules/web/Controllers/UserGroup/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/UserGroup/SaveEditController.php b/app/modules/web/Controllers/UserGroup/SaveEditController.php
index e6a450b2..d5c9ab38 100644
--- a/app/modules/web/Controllers/UserGroup/SaveEditController.php
+++ b/app/modules/web/Controllers/UserGroup/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/UserGroup/SearchController.php b/app/modules/web/Controllers/UserGroup/SearchController.php
index 7a89ff19..84b6e075 100644
--- a/app/modules/web/Controllers/UserGroup/SearchController.php
+++ b/app/modules/web/Controllers/UserGroup/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\UserGroup;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php b/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php
index 22085f69..5eae7ebb 100644
--- a/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php
+++ b/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php
@@ -27,12 +27,12 @@ namespace SP\Modules\Web\Controllers\UserGroup;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserGroupData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
diff --git a/app/modules/web/Controllers/UserPassReset/SaveRequestController.php b/app/modules/web/Controllers/UserPassReset/SaveRequestController.php
index 89853c03..85065577 100644
--- a/app/modules/web/Controllers/UserPassReset/SaveRequestController.php
+++ b/app/modules/web/Controllers/UserPassReset/SaveRequestController.php
@@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\UserPassReset;
use Exception;
+use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UserPassRecoverService;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
@@ -42,7 +43,7 @@ final class SaveRequestController extends UserPassResetSaveBase
/**
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function saveRequestAction(): bool
{
diff --git a/app/modules/web/Controllers/UserPassReset/SaveResetController.php b/app/modules/web/Controllers/UserPassReset/SaveResetController.php
index 4852b449..d519350d 100644
--- a/app/modules/web/Controllers/UserPassReset/SaveResetController.php
+++ b/app/modules/web/Controllers/UserPassReset/SaveResetController.php
@@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\UserPassReset;
use Exception;
+use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
@@ -41,7 +42,7 @@ final class SaveResetController extends UserPassResetSaveBase
/**
* @return bool
- * @throws \JsonException
+ * @throws JsonException
*/
public function saveResetAction(): bool
{
diff --git a/app/modules/web/Controllers/UserPassReset/UserPassResetSaveBase.php b/app/modules/web/Controllers/UserPassReset/UserPassResetSaveBase.php
index 794c7ccc..4df8a7f3 100644
--- a/app/modules/web/Controllers/UserPassReset/UserPassResetSaveBase.php
+++ b/app/modules/web/Controllers/UserPassReset/UserPassResetSaveBase.php
@@ -26,8 +26,11 @@ namespace SP\Modules\Web\Controllers\UserPassReset;
use Exception;
+use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\SessionTimeout;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Notification\Ports\MailServiceInterface;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Domain\User\Ports\UserPassRecoverServiceInterface;
@@ -48,9 +51,9 @@ abstract class UserPassResetSaveBase extends ControllerBase
private TrackRequest $trackRequest;
/**
- * @throws \SP\Core\Exceptions\SessionTimeout
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \JsonException
+ * @throws SessionTimeout
+ * @throws InvalidArgumentException
+ * @throws JsonException
*/
public function __construct(
Application $application,
diff --git a/app/modules/web/Controllers/UserProfile/SaveCreateController.php b/app/modules/web/Controllers/UserProfile/SaveCreateController.php
index 1d0cca57..8e2d620d 100644
--- a/app/modules/web/Controllers/UserProfile/SaveCreateController.php
+++ b/app/modules/web/Controllers/UserProfile/SaveCreateController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/UserProfile/SaveEditController.php b/app/modules/web/Controllers/UserProfile/SaveEditController.php
index 8606af44..262454d2 100644
--- a/app/modules/web/Controllers/UserProfile/SaveEditController.php
+++ b/app/modules/web/Controllers/UserProfile/SaveEditController.php
@@ -29,8 +29,8 @@ use Exception;
use JsonException;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\JsonResponse;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
use SP\Mvc\Controller\ItemTrait;
diff --git a/app/modules/web/Controllers/UserProfile/SearchController.php b/app/modules/web/Controllers/UserProfile/SearchController.php
index 453c39e3..8efe6b6e 100644
--- a/app/modules/web/Controllers/UserProfile/SearchController.php
+++ b/app/modules/web/Controllers/UserProfile/SearchController.php
@@ -27,9 +27,9 @@ namespace SP\Modules\Web\Controllers\UserProfile;
use JsonException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Html\DataGrid\DataGridInterface;
use SP\Http\JsonResponse;
diff --git a/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php b/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php
index 3c120a34..6de175d7 100644
--- a/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php
+++ b/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php
@@ -27,13 +27,13 @@ namespace SP\Modules\Web\Controllers\UserProfile;
use SP\Core\Acl\Acl;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ProfileData;
use SP\DataModel\UserProfileData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/app/modules/web/Forms/AccountForm.php b/app/modules/web/Forms/AccountForm.php
index ac2c2596..b8e8d0d9 100644
--- a/app/modules/web/Forms/AccountForm.php
+++ b/app/modules/web/Forms/AccountForm.php
@@ -25,12 +25,12 @@
namespace SP\Modules\Web\Forms;
use SP\Core\Application;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Account\Dtos\AccountCreateDto;
use SP\Domain\Account\Dtos\AccountDto;
use SP\Domain\Account\Dtos\AccountUpdateDto;
use SP\Domain\Account\Ports\AccountPresetServiceInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Http\RequestInterface;
use SP\Util\Chainable;
diff --git a/app/modules/web/Forms/AuthTokenForm.php b/app/modules/web/Forms/AuthTokenForm.php
index 414f9807..bf7f35a6 100644
--- a/app/modules/web/Forms/AuthTokenForm.php
+++ b/app/modules/web/Forms/AuthTokenForm.php
@@ -24,10 +24,10 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\AuthTokenData;
use SP\Domain\Auth\Services\AuthTokenService;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class ApiTokenForm
diff --git a/app/modules/web/Forms/CategoryForm.php b/app/modules/web/Forms/CategoryForm.php
index dc557ebe..68925a14 100644
--- a/app/modules/web/Forms/CategoryForm.php
+++ b/app/modules/web/Forms/CategoryForm.php
@@ -24,9 +24,9 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\CategoryData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class CategoryForm
diff --git a/app/modules/web/Forms/ClientForm.php b/app/modules/web/Forms/ClientForm.php
index 00a1d22a..70695350 100644
--- a/app/modules/web/Forms/ClientForm.php
+++ b/app/modules/web/Forms/ClientForm.php
@@ -24,9 +24,9 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ClientData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class ClientForm
diff --git a/app/modules/web/Forms/CustomFieldDefForm.php b/app/modules/web/Forms/CustomFieldDefForm.php
index 781d207e..664d3888 100644
--- a/app/modules/web/Forms/CustomFieldDefForm.php
+++ b/app/modules/web/Forms/CustomFieldDefForm.php
@@ -24,9 +24,9 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class CustomFieldDefForm
diff --git a/app/modules/web/Forms/FormInterface.php b/app/modules/web/Forms/FormInterface.php
index e288eb53..fdd02a8c 100644
--- a/app/modules/web/Forms/FormInterface.php
+++ b/app/modules/web/Forms/FormInterface.php
@@ -24,7 +24,7 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Interface FormInterface
diff --git a/app/modules/web/Forms/ItemsPresetForm.php b/app/modules/web/Forms/ItemsPresetForm.php
index 3d7b832d..8171fb58 100644
--- a/app/modules/web/Forms/ItemsPresetForm.php
+++ b/app/modules/web/Forms/ItemsPresetForm.php
@@ -24,14 +24,14 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ItemPreset\AccountPermission;
use SP\DataModel\ItemPreset\AccountPrivate;
use SP\DataModel\ItemPreset\Password;
use SP\DataModel\ItemPreset\SessionTimeout;
use SP\Domain\Account\Models\ItemPreset;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Services\ItemPresetRequest;
use SP\Mvc\Controller\Validators\Validator;
diff --git a/app/modules/web/Forms/NotificationForm.php b/app/modules/web/Forms/NotificationForm.php
index 72b27816..9a4b6eb5 100644
--- a/app/modules/web/Forms/NotificationForm.php
+++ b/app/modules/web/Forms/NotificationForm.php
@@ -24,10 +24,10 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\Core\Messages\NotificationMessage;
use SP\DataModel\NotificationData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class NotificationForm
diff --git a/app/modules/web/Forms/PublicLinkForm.php b/app/modules/web/Forms/PublicLinkForm.php
index 0c7397bc..de3f03b7 100644
--- a/app/modules/web/Forms/PublicLinkForm.php
+++ b/app/modules/web/Forms/PublicLinkForm.php
@@ -24,10 +24,10 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\PublicLinkData;
use SP\Domain\Account\Services\PublicLinkService;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class PublicLinkForm
diff --git a/app/modules/web/Forms/TagForm.php b/app/modules/web/Forms/TagForm.php
index 33800c10..e0a8262e 100644
--- a/app/modules/web/Forms/TagForm.php
+++ b/app/modules/web/Forms/TagForm.php
@@ -24,9 +24,9 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\TagData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class TagForm
diff --git a/app/modules/web/Forms/UserForm.php b/app/modules/web/Forms/UserForm.php
index 33ed9e33..4495cd66 100644
--- a/app/modules/web/Forms/UserForm.php
+++ b/app/modules/web/Forms/UserForm.php
@@ -24,10 +24,10 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\UserData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class UserForm
diff --git a/app/modules/web/Forms/UserGroupForm.php b/app/modules/web/Forms/UserGroupForm.php
index 694032b3..b9d9259b 100644
--- a/app/modules/web/Forms/UserGroupForm.php
+++ b/app/modules/web/Forms/UserGroupForm.php
@@ -24,10 +24,10 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\UserGroupData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class UserGroupForm
diff --git a/app/modules/web/Forms/UserProfileForm.php b/app/modules/web/Forms/UserProfileForm.php
index 0404dcc2..956da149 100644
--- a/app/modules/web/Forms/UserProfileForm.php
+++ b/app/modules/web/Forms/UserProfileForm.php
@@ -24,11 +24,11 @@
namespace SP\Modules\Web\Forms;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ProfileData;
use SP\DataModel\UserProfileData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class UserProfileForm
diff --git a/app/modules/web/Init.php b/app/modules/web/Init.php
index 036ecc91..c2e50312 100644
--- a/app/modules/web/Init.php
+++ b/app/modules/web/Init.php
@@ -36,18 +36,18 @@ use SP\Core\Context\SessionContext;
use SP\Core\Crypt\CryptSessionHandler;
use SP\Core\Crypt\Csrf;
use SP\Core\Crypt\Session as CryptSession;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InitializationException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Core\HttpModuleBase;
use SP\Core\Language;
use SP\Core\ProvidersHelper;
use SP\DataModel\ItemPreset\SessionTimeout;
use SP\Domain\Core\Bootstrap\UriContextInterface;
use SP\Domain\Core\Crypt\CsrfInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InitializationException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\LanguageInterface;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Domain\Crypt\Ports\SecureSessionServiceInterface;
diff --git a/app/modules/web/themes/material-blue/views/_partials/error-list.inc b/app/modules/web/themes/material-blue/views/_partials/error-list.inc
index 0a29a517..5c764005 100644
--- a/app/modules/web/themes/material-blue/views/_partials/error-list.inc
+++ b/app/modules/web/themes/material-blue/views/_partials/error-list.inc
@@ -1,11 +1,11 @@
0): ?>
@@ -46,4 +46,4 @@ use SP\Mvc\View\Template;
-
\ No newline at end of file
+
diff --git a/lib/BaseFunctions.php b/lib/BaseFunctions.php
index 6f57eb3e..49510c4d 100644
--- a/lib/BaseFunctions.php
+++ b/lib/BaseFunctions.php
@@ -25,7 +25,7 @@
namespace SP;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use Throwable;
/**
@@ -240,7 +240,7 @@ function getElapsedTime(float $from): float
/**
* Inicializar módulo
*
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
function initModule(string $module): array
{
diff --git a/lib/SP/Core/Acl/Acl.php b/lib/SP/Core/Acl/Acl.php
index 95e8a186..a730bfc7 100644
--- a/lib/SP/Core/Acl/Acl.php
+++ b/lib/SP/Core/Acl/Acl.php
@@ -26,9 +26,9 @@
namespace SP\Core\Acl;
use SP\Core\Events\Event;
-use SP\Core\Events\EventDispatcher;
use SP\Core\Events\EventMessage;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\ActionNotFoundException;
use SP\Domain\Core\Acl\ActionsInterface;
use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
@@ -40,21 +40,14 @@ use function SP\processException;
/**
* Esta clase es la encargada de calcular las access lists de acceso a usuarios.
*/
-class Acl implements AclActionsInterface
+final class Acl implements AclActionsInterface
{
- protected static ?ActionsInterface $actions = null;
+ private static ActionsInterface $actions;
- /**
- * Acl constructor.
- *
- * @param ContextInterface $context
- * @param EventDispatcher $eventDispatcher
- * @param ActionsInterface|null $actions
- */
public function __construct(
private readonly ContextInterface $context,
private readonly EventDispatcherInterface $eventDispatcher,
- ActionsInterface $actions = null
+ ActionsInterface $actions
) {
self::$actions = $actions;
}
@@ -65,7 +58,7 @@ class Acl implements AclActionsInterface
public static function getActionRoute(string $actionId): string
{
try {
- return self::$actions !== null ? self::$actions->getActionById($actionId)->getRoute() : '';
+ return self::$actions?->getActionById($actionId)->getRoute();
} catch (ActionNotFoundException $e) {
processException($e);
}
@@ -80,12 +73,12 @@ class Acl implements AclActionsInterface
* @param bool $translate
*
* @return string
- * @internal param bool $shortName Si se devuelve el nombre corto de la acción
+ * @internal param bool $translate Si se devuelve el nombre corto de la acción
*/
public static function getActionInfo(int $actionId, bool $translate = true): string
{
try {
- $text = self::$actions->getActionById($actionId)->getText();
+ $text = self::$actions?->getActionById($actionId)->getText();
return $translate ? __($text) : $text;
} catch (ActionNotFoundException $e) {
diff --git a/lib/SP/Core/Acl/Actions.php b/lib/SP/Core/Acl/Actions.php
index 3e30a6c0..22ad4ea9 100644
--- a/lib/SP/Core/Acl/Actions.php
+++ b/lib/SP/Core/Acl/Actions.php
@@ -25,6 +25,7 @@
namespace SP\Core\Acl;
use SP\DataModel\ActionData;
+use SP\Domain\Core\Acl\ActionNotFoundException;
use SP\Domain\Core\Acl\ActionsInterface;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
diff --git a/lib/SP/Core/Application.php b/lib/SP/Core/Application.php
index d09dd4ac..c96766d1 100644
--- a/lib/SP/Core/Application.php
+++ b/lib/SP/Core/Application.php
@@ -38,8 +38,8 @@ final class Application
* Module constructor.
*
* @param ConfigInterface $config
- * @param \SP\Domain\Core\Events\EventDispatcherInterface $eventDispatcher
- * @param SessionContextInterface|\SP\Domain\Core\Context\ContextInterface $context
+ * @param EventDispatcherInterface $eventDispatcher
+ * @param SessionContextInterface|ContextInterface $context
*/
public function __construct(
private readonly ConfigInterface $config,
diff --git a/lib/SP/Core/Bootstrap/BootstrapBase.php b/lib/SP/Core/Bootstrap/BootstrapBase.php
index e7ef4286..12832a96 100644
--- a/lib/SP/Core/Bootstrap/BootstrapBase.php
+++ b/lib/SP/Core/Bootstrap/BootstrapBase.php
@@ -33,16 +33,16 @@ use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use RuntimeException;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\ConfigException;
-use SP\Core\Exceptions\InitializationException;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\Core\PhpExtensionChecker;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Services\ConfigUtil;
use SP\Domain\Core\Bootstrap\UriContextInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\ConfigException;
+use SP\Domain\Core\Exceptions\InitializationException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Upgrade\Services\UpgradeException;
use SP\Http\RequestInterface;
use SP\Plugin\PluginManager;
diff --git a/lib/SP/Core/Bootstrap/BootstrapWeb.php b/lib/SP/Core/Bootstrap/BootstrapWeb.php
index d60d9821..0e348c1a 100644
--- a/lib/SP/Core/Bootstrap/BootstrapWeb.php
+++ b/lib/SP/Core/Bootstrap/BootstrapWeb.php
@@ -32,8 +32,8 @@ use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use RuntimeException;
-use SP\Core\Exceptions\SessionTimeout;
use SP\Core\HttpModuleBase;
+use SP\Domain\Core\Exceptions\SessionTimeout;
use SP\Modules\Web\Init as InitWeb;
use SP\Util\Filter;
diff --git a/lib/SP/Core/Bootstrap/UriContext.php b/lib/SP/Core/Bootstrap/UriContext.php
index 70c24227..1d710f9c 100644
--- a/lib/SP/Core/Bootstrap/UriContext.php
+++ b/lib/SP/Core/Bootstrap/UriContext.php
@@ -32,7 +32,6 @@ use SP\Http\RequestInterface;
*/
final class UriContext implements UriContextInterface
{
-
private readonly string $subUri;
private readonly string $webRoot;
private readonly string $webUri;
diff --git a/lib/SP/Core/Context/ContextException.php b/lib/SP/Core/Context/ContextException.php
index 903a73ca..3a17a93a 100644
--- a/lib/SP/Core/Context/ContextException.php
+++ b/lib/SP/Core/Context/ContextException.php
@@ -24,7 +24,7 @@
namespace SP\Core\Context;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ContextException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class ContextException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Crypt/Crypt.php b/lib/SP/Core/Crypt/Crypt.php
index e9eff5d4..4f56deec 100644
--- a/lib/SP/Core/Crypt/Crypt.php
+++ b/lib/SP/Core/Crypt/Crypt.php
@@ -28,9 +28,9 @@ use Defuse\Crypto\Crypto;
use Defuse\Crypto\Exception\CryptoException;
use Defuse\Crypto\Key;
use Defuse\Crypto\KeyProtectedByPassword;
-use SP\Core\Exceptions\CryptException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Crypt\CryptInterface;
+use SP\Domain\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class Crypt
diff --git a/lib/SP/Core/Crypt/CryptPKI.php b/lib/SP/Core/Crypt/CryptPKI.php
index ee6e35fc..502df87c 100644
--- a/lib/SP/Core/Crypt/CryptPKI.php
+++ b/lib/SP/Core/Crypt/CryptPKI.php
@@ -25,8 +25,8 @@
namespace SP\Core\Crypt;
use phpseclib\Crypt\RSA;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Crypt\CryptPKIInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\FileHandlerInterface;
diff --git a/lib/SP/Core/Crypt/Session.php b/lib/SP/Core/Crypt/Session.php
index 1a77aef9..eb60a31b 100644
--- a/lib/SP/Core/Crypt/Session.php
+++ b/lib/SP/Core/Crypt/Session.php
@@ -24,8 +24,8 @@
namespace SP\Core\Crypt;
-use SP\Core\Exceptions\CryptException;
use SP\Domain\Core\Context\SessionContextInterface;
+use SP\Domain\Core\Exceptions\CryptException;
use function SP\logger;
diff --git a/lib/SP/Core/Crypt/Vault.php b/lib/SP/Core/Crypt/Vault.php
index bcdfbe68..b20d94d2 100644
--- a/lib/SP/Core/Crypt/Vault.php
+++ b/lib/SP/Core/Crypt/Vault.php
@@ -25,9 +25,9 @@
namespace SP\Core\Crypt;
use RuntimeException;
-use SP\Core\Exceptions\CryptException;
use SP\Domain\Core\Crypt\CryptInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\CryptException;
/**
* Class Vault
diff --git a/lib/SP/Core/Definitions/CoreDefinitions.php b/lib/SP/Core/Definitions/CoreDefinitions.php
index e0051d4d..a85714a1 100644
--- a/lib/SP/Core/Definitions/CoreDefinitions.php
+++ b/lib/SP/Core/Definitions/CoreDefinitions.php
@@ -38,7 +38,6 @@ use SP\Core\Crypt\CryptPKI;
use SP\Core\Crypt\Csrf;
use SP\Core\Crypt\RequestBasedPassword;
use SP\Core\Crypt\UuidCookie;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\Core\MimeTypes;
use SP\Core\ProvidersHelper;
@@ -58,6 +57,7 @@ use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Crypt\CryptInterface;
use SP\Domain\Core\Crypt\CryptPKIInterface;
use SP\Domain\Core\Crypt\RequestBasedPasswordInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\File\MimeTypesInterface;
use SP\Domain\Core\LanguageInterface;
use SP\Domain\Core\UI\ThemeContextInterface;
@@ -146,7 +146,7 @@ final class CoreDefinitions
new XmlHandler(new FileHandler(MIMETYPES_FILE))
),
Acl::class => autowire(Acl::class)
- ->constructorParameter('actions', get(Actions::class)),
+ ->constructorParameter('actions', get(ActionsInterface::class)),
ThemeContextInterface::class => autowire(ThemeContext::class)
->constructorParameter('basePath', VIEW_PATH)
->constructorParameter('baseUri', factory([UriContextInterface::class, 'getWebRoot']))
diff --git a/lib/SP/Core/Events/Event.php b/lib/SP/Core/Events/Event.php
index 38f53931..765d646e 100644
--- a/lib/SP/Core/Events/Event.php
+++ b/lib/SP/Core/Events/Event.php
@@ -24,8 +24,8 @@
namespace SP\Core\Events;
-use SP\Core\Exceptions\InvalidClassException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class Event
diff --git a/lib/SP/Core/PhpExtensionChecker.php b/lib/SP/Core/PhpExtensionChecker.php
index 89b1992a..b2f40474 100644
--- a/lib/SP/Core/PhpExtensionChecker.php
+++ b/lib/SP/Core/PhpExtensionChecker.php
@@ -25,7 +25,7 @@
namespace SP\Core;
use RuntimeException;
-use SP\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Domain\Core\PhpExtensionCheckerInterface;
use function SP\__u;
diff --git a/lib/SP/Core/UI/Theme.php b/lib/SP/Core/UI/Theme.php
index 1492c206..952d02b9 100644
--- a/lib/SP/Core/UI/Theme.php
+++ b/lib/SP/Core/UI/Theme.php
@@ -24,9 +24,9 @@
namespace SP\Core\UI;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Core\UI\ThemeContextInterface;
use SP\Domain\Core\UI\ThemeIconsInterface;
use SP\Domain\Core\UI\ThemeInterface;
diff --git a/lib/SP/Core/UI/ThemeIcons.php b/lib/SP/Core/UI/ThemeIcons.php
index 8a2a2cf4..09b886dd 100644
--- a/lib/SP/Core/UI/ThemeIcons.php
+++ b/lib/SP/Core/UI/ThemeIcons.php
@@ -25,8 +25,8 @@
namespace SP\Core\UI;
use SP\Core\Context\ContextBase;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Core\UI\ThemeContextInterface;
use SP\Domain\Core\UI\ThemeIconsInterface;
use SP\Html\Assets\FontIcon;
diff --git a/lib/SP/DataModel/EncryptedModel.php b/lib/SP/DataModel/EncryptedModel.php
index 48069a31..84ff26bc 100644
--- a/lib/SP/DataModel/EncryptedModel.php
+++ b/lib/SP/DataModel/EncryptedModel.php
@@ -27,7 +27,7 @@ namespace SP\DataModel;
use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
/**
* Trait EncryptedModel
@@ -98,4 +98,4 @@ trait EncryptedModel
{
return $this->key;
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/DataModel/ItemPreset/SessionTimeout.php b/lib/SP/DataModel/ItemPreset/SessionTimeout.php
index 67205359..515c05a9 100644
--- a/lib/SP/DataModel/ItemPreset/SessionTimeout.php
+++ b/lib/SP/DataModel/ItemPreset/SessionTimeout.php
@@ -24,7 +24,7 @@
namespace SP\DataModel\ItemPreset;
-use SP\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
use SP\Http\Address;
/**
@@ -102,4 +102,4 @@ class SessionTimeout
{
return $this->timeout;
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/DataModel/TrackData.php b/lib/SP/DataModel/TrackData.php
index a6b2235b..9a967dfd 100644
--- a/lib/SP/DataModel/TrackData.php
+++ b/lib/SP/DataModel/TrackData.php
@@ -24,8 +24,8 @@
namespace SP\DataModel;
-use SP\Core\Exceptions\InvalidArgumentException;
use SP\Domain\Common\Models\Model;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
use SP\Http\Address;
/**
diff --git a/lib/SP/Domain/Account/Adapters/AccountAdapter.php b/lib/SP/Domain/Account/Adapters/AccountAdapter.php
index de7ccffa..7a87ff24 100644
--- a/lib/SP/Domain/Account/Adapters/AccountAdapter.php
+++ b/lib/SP/Domain/Account/Adapters/AccountAdapter.php
@@ -25,14 +25,16 @@
namespace SP\Domain\Account\Adapters;
use League\Fractal\Resource\Collection;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\AccountEnrichedDto;
use SP\Domain\Common\Adapters\Adapter;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\ActionNotFoundException;
+use SP\Domain\Core\Acl\ActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Adapters\CustomFieldAdapter;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Mvc\Controller\ItemTrait;
@@ -48,13 +50,12 @@ final class AccountAdapter extends Adapter implements AccountAdapterInterface
protected array $availableIncludes = ['customFields'];
- private CustomFieldServiceInterface $customFieldService;
-
- public function __construct(ConfigDataInterface $configData, CustomFieldServiceInterface $customFieldService)
- {
+ public function __construct(
+ ConfigDataInterface $configData,
+ private readonly CustomFieldServiceInterface $customFieldService,
+ private readonly ActionsInterface $actions
+ ) {
parent::__construct($configData);
-
- $this->customFieldService = $customFieldService;
}
/**
@@ -71,50 +72,54 @@ final class AccountAdapter extends Adapter implements AccountAdapterInterface
);
}
+ /**
+ * @throws ActionNotFoundException
+ */
public function transform(AccountEnrichedDto $data): array
{
$account = $data->getAccountDataView();
+ $actionRoute = $this->actions->getActionById(AclActionsInterface::ACCOUNT_VIEW)->getRoute();
return [
- 'id' => (int)$account->getId(),
- 'name' => $account->getName(),
- 'clientId' => $account->getClientId(),
- 'clientName' => $account->getClientName(),
- 'categoryId' => $account->getCategoryId(),
- 'categoryName' => $account->getCategoryName(),
- 'userId' => $account->getUserId(),
- 'userName' => $account->getUserName(),
- 'userLogin' => $account->getUserLogin(),
- 'userGroupId' => $account->getUserGroupId(),
- 'userGroupName' => $account->getUserGroupName(),
- 'userEditId' => $account->getUserEditId(),
- 'userEditName' => $account->getUserEditName(),
- 'userEditLogin' => $account->getUserEditLogin(),
- 'login' => $account->getLogin(),
- 'url' => $account->getUrl(),
- 'notes' => $account->getNotes(),
- 'otherUserEdit' => $account->getOtherUserEdit(),
+ 'id' => (int)$account->getId(),
+ 'name' => $account->getName(),
+ 'clientId' => $account->getClientId(),
+ 'clientName' => $account->getClientName(),
+ 'categoryId' => $account->getCategoryId(),
+ 'categoryName' => $account->getCategoryName(),
+ 'userId' => $account->getUserId(),
+ 'userName' => $account->getUserName(),
+ 'userLogin' => $account->getUserLogin(),
+ 'userGroupId' => $account->getUserGroupId(),
+ 'userGroupName' => $account->getUserGroupName(),
+ 'userEditId' => $account->getUserEditId(),
+ 'userEditName' => $account->getUserEditName(),
+ 'userEditLogin' => $account->getUserEditLogin(),
+ 'login' => $account->getLogin(),
+ 'url' => $account->getUrl(),
+ 'notes' => $account->getNotes(),
+ 'otherUserEdit' => $account->getOtherUserEdit(),
'otherUserGroupEdit' => $account->getOtherUserGroupEdit(),
- 'dateAdd' => $account->getDateAdd(),
- 'dateEdit' => $account->getDateEdit(),
- 'countView' => $account->getCountView(),
- 'countDecrypt' => $account->getCountDecrypt(),
- 'isPrivate' => $account->getIsPrivate(),
- 'isPrivateGroup' => $account->getIsPrivateGroup(),
- 'passDate' => $account->getPassDate(),
- 'passDateChange' => $account->getPassDateChange(),
- 'parentId' => $account->getParentId(),
- 'publicLinkHash' => $account->getPublicLinkHash(),
- 'tags' => SelectItemAdapter::factory($data->getTags())->getItemsFromModel(),
- 'users' => SelectItemAdapter::factory($data->getUsers())->getItemsFromModel(),
- 'userGroups' => SelectItemAdapter::factory($data->getUserGroups())->getItemsFromModel(),
- 'customFields' => null,
- 'links' => [
+ 'dateAdd' => $account->getDateAdd(),
+ 'dateEdit' => $account->getDateEdit(),
+ 'countView' => $account->getCountView(),
+ 'countDecrypt' => $account->getCountDecrypt(),
+ 'isPrivate' => $account->getIsPrivate(),
+ 'isPrivateGroup' => $account->getIsPrivateGroup(),
+ 'passDate' => $account->getPassDate(),
+ 'passDateChange' => $account->getPassDateChange(),
+ 'parentId' => $account->getParentId(),
+ 'publicLinkHash' => $account->getPublicLinkHash(),
+ 'tags' => SelectItemAdapter::factory($data->getTags())->getItemsFromModel(),
+ 'users' => SelectItemAdapter::factory($data->getUsers())->getItemsFromModel(),
+ 'userGroups' => SelectItemAdapter::factory($data->getUserGroups())->getItemsFromModel(),
+ 'customFields' => null,
+ 'links' => [
[
'rel' => 'self',
'uri' => Link::getDeepLink(
$account->getId(),
- AclActionsInterface::ACCOUNT_VIEW,
+ $actionRoute,
$this->configData,
true
),
diff --git a/lib/SP/Domain/Account/Adapters/AccountAdapterInterface.php b/lib/SP/Domain/Account/Adapters/AccountAdapterInterface.php
index 767332b7..b8255d12 100644
--- a/lib/SP/Domain/Account/Adapters/AccountAdapterInterface.php
+++ b/lib/SP/Domain/Account/Adapters/AccountAdapterInterface.php
@@ -26,6 +26,10 @@ namespace SP\Domain\Account\Adapters;
use League\Fractal\Resource\Collection;
use SP\Domain\Account\Dtos\AccountEnrichedDto;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountAdapterInterface
@@ -33,10 +37,10 @@ use SP\Domain\Account\Dtos\AccountEnrichedDto;
interface AccountAdapterInterface
{
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
*/
public function includeCustomFields(AccountEnrichedDto $data,): Collection;
diff --git a/lib/SP/Domain/Account/Ports/AccountAclServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountAclServiceInterface.php
index b302cfa1..ed11969f 100644
--- a/lib/SP/Domain/Account/Ports/AccountAclServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountAclServiceInterface.php
@@ -27,6 +27,8 @@ namespace SP\Domain\Account\Ports;
use SP\DataModel\ProfileData;
use SP\Domain\Account\Dtos\AccountAclDto;
use SP\Domain\Account\Services\AccountAcl;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Services\UserLoginResponse;
/**
@@ -54,8 +56,8 @@ interface AccountAclServiceInterface
* @param bool $isHistory
*
* @return AccountAcl
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAcl(int $actionId, AccountAclDto $accountAclDto, bool $isHistory = false): AccountAcl;
@@ -65,7 +67,7 @@ interface AccountAclServiceInterface
* @param int $accountId
* @param int $actionId
*
- * @return \SP\Domain\Account\Services\AccountAcl|null
+ * @return AccountAcl|null
*/
public function getAclFromCache(int $accountId, int $actionId): ?AccountAcl;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountCacheServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountCacheServiceInterface.php
index 8ce278c5..e56d2890 100644
--- a/lib/SP/Domain/Account/Ports/AccountCacheServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountCacheServiceInterface.php
@@ -24,9 +24,6 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\DataModel\AccountSearchVData;
use SP\Domain\Account\Dtos\AccountCacheDto;
/**
diff --git a/lib/SP/Domain/Account/Ports/AccountFileRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountFileRepositoryInterface.php
index 193a0555..ad67f834 100644
--- a/lib/SP/Domain/Account/Ports/AccountFileRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountFileRepositoryInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\FileData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -66,8 +66,8 @@ interface AccountFileRepositoryInterface extends RepositoryInterface
* @param int $id
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): bool;
@@ -96,7 +96,7 @@ interface AccountFileRepositoryInterface extends RepositoryInterface
*
* @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountFileServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountFileServiceInterface.php
index c75877cb..26b9d803 100644
--- a/lib/SP/Domain/Account/Ports/AccountFileServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountFileServiceInterface.php
@@ -24,12 +24,14 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidImageException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\FileData;
use SP\DataModel\FileExtData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidImageException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -54,8 +56,8 @@ interface AccountFileServiceInterface
* @param int $id
*
* @return FileExtData|null
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getById(int $id): ?FileExtData;
@@ -64,7 +66,7 @@ interface AccountFileServiceInterface
*
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
@@ -73,9 +75,9 @@ interface AccountFileServiceInterface
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): AccountFileServiceInterface;
diff --git a/lib/SP/Domain/Account/Ports/AccountHistoryServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountHistoryServiceInterface.php
index c3fca687..6f09eb66 100644
--- a/lib/SP/Domain/Account/Ports/AccountHistoryServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountHistoryServiceInterface.php
@@ -24,16 +24,14 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
-use SP\Domain\Account\Dtos\AccountPasswordRequest;
-use SP\Domain\Account\Dtos\AccountUpdateDto;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Account\Models\AccountHistory;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -55,8 +53,8 @@ interface AccountHistoryServiceInterface
* Obtiene el listado del histórico de una cuenta.
*
* @return array Con los registros con id como clave y fecha - usuario como valor
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getHistoryForAccount(int $id): array;
@@ -69,8 +67,8 @@ interface AccountHistoryServiceInterface
/**
* Crea una nueva cuenta en la BBDD
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function create(AccountHistoryCreateDto $dto): int;
diff --git a/lib/SP/Domain/Account/Ports/AccountItemsServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountItemsServiceInterface.php
index 184b9ffd..82db2e12 100644
--- a/lib/SP/Domain/Account/Ports/AccountItemsServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountItemsServiceInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Dtos\AccountCreateDto;
use SP\Domain\Account\Dtos\AccountUpdateDto;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
/**
* Class AccountItemsService
@@ -39,7 +40,7 @@ interface AccountItemsServiceInterface
*
* @throws QueryException
* @throws ConstraintException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updateItems(
bool $userCanChangePermissions,
diff --git a/lib/SP/Domain/Account/Ports/AccountPresetServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountPresetServiceInterface.php
index 455a0ea5..5e9c39a5 100644
--- a/lib/SP/Domain/Account/Ports/AccountPresetServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountPresetServiceInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Account\Dtos\AccountDto;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ValidationException;
/**
* Class AccountPreset
diff --git a/lib/SP/Domain/Account/Ports/AccountRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountRepositoryInterface.php
index a4e8bd9a..7e54fce6 100644
--- a/lib/SP/Domain/Account/Ports/AccountRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountRepositoryInterface.php
@@ -24,12 +24,13 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Account\Models\Account;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -51,8 +52,8 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getPasswordForId(int $accountId): QueryResult;
@@ -60,8 +61,8 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getPasswordHistoryForId(int $accountId): QueryResult;
@@ -80,11 +81,11 @@ interface AccountRepositoryInterface extends RepositoryInterface
* Actualiza la clave de una cuenta en la BBDD.
*
* @param int $accountId
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function editPassword(int $accountId, Account $account): QueryResult;
@@ -92,11 +93,11 @@ interface AccountRepositoryInterface extends RepositoryInterface
* Actualiza la clave de una cuenta en la BBDD.
*
* @param int $accountId
- * @param \SP\Domain\Account\Dtos\EncryptedPassword $encryptedPassword
+ * @param EncryptedPassword $encryptedPassword
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updatePassword(int $accountId, EncryptedPassword $encryptedPassword): QueryResult;
@@ -104,11 +105,11 @@ interface AccountRepositoryInterface extends RepositoryInterface
* Restaurar una cuenta desde el histórico.
*
* @param int $accountId
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function restoreModified(int $accountId, Account $account): QueryResult;
@@ -116,12 +117,12 @@ interface AccountRepositoryInterface extends RepositoryInterface
* Updates an item for bulk action
*
* @param int $accountId
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
* @param bool $changeOwner
* @param bool $changeUserGroup
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function updateBulk(int $accountId, Account $account, bool $changeOwner, bool $changeUserGroup): QueryResult;
@@ -142,8 +143,8 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getDataForLink(int $accountId): QueryResult;
@@ -151,8 +152,8 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int|null $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForUser(?int $accountId = null): QueryResult;
@@ -160,15 +161,15 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getLinked(int $accountId): QueryResult;
/**
* Obtener los datos relativos a la clave de todas las cuentas.
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
* @throws ConstraintException
* @throws QueryException
*/
@@ -177,11 +178,11 @@ interface AccountRepositoryInterface extends RepositoryInterface
/**
* Crea una nueva cuenta en la BBDD
*
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function create(Account $account): QueryResult;
@@ -191,8 +192,8 @@ interface AccountRepositoryInterface extends RepositoryInterface
* @param int $accountId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $accountId): QueryResult;
@@ -200,12 +201,12 @@ interface AccountRepositoryInterface extends RepositoryInterface
* Updates an item
*
* @param int $accountId
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
* @param bool $changeOwner
* @param bool $changeUserGroup
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function update(int $accountId, Account $account, bool $changeOwner, bool $changeUserGroup): QueryResult;
@@ -257,11 +258,11 @@ interface AccountRepositoryInterface extends RepositoryInterface
/**
* Create an account from deleted
*
- * @param \SP\Domain\Account\Models\Account $account
+ * @param Account $account
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function createRemoved(Account $account): QueryResult;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountSearchDataBuilderInterface.php b/lib/SP/Domain/Account/Ports/AccountSearchDataBuilderInterface.php
index 961d67f9..acb1f9e1 100644
--- a/lib/SP/Domain/Account/Ports/AccountSearchDataBuilderInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountSearchDataBuilderInterface.php
@@ -25,6 +25,8 @@
namespace SP\Domain\Account\Ports;
use SP\Domain\Account\Services\AccountSearchItem;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -33,11 +35,11 @@ use SP\Infrastructure\Database\QueryResult;
interface AccountSearchDataBuilderInterface
{
/**
- * @param \SP\Infrastructure\Database\QueryResult $queryResult
+ * @param QueryResult $queryResult
*
* @return AccountSearchItem[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function buildFrom(QueryResult $queryResult): array;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountSearchServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountSearchServiceInterface.php
index 1583d049..934ace94 100644
--- a/lib/SP/Domain/Account/Ports/AccountSearchServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountSearchServiceInterface.php
@@ -24,10 +24,10 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Search\AccountSearchFilter;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/Account/Ports/AccountServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountServiceInterface.php
index ad2d4a25..b428f835 100644
--- a/lib/SP/Domain/Account/Ports/AccountServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountServiceInterface.php
@@ -24,9 +24,6 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Adapters\AccountData;
use SP\Domain\Account\Dtos\AccountCreateDto;
@@ -39,6 +36,11 @@ use SP\Domain\Account\Models\Account;
use SP\Domain\Account\Models\AccountDataView;
use SP\Domain\Common\Models\Simple;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -49,29 +51,29 @@ use SP\Infrastructure\Database\QueryResult;
interface AccountServiceInterface
{
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @return AccountEnrichedDto
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function withUsers(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto;
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @return AccountEnrichedDto
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function withUserGroups(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto;
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @return AccountEnrichedDto
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function withTags(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto;
@@ -79,8 +81,8 @@ interface AccountServiceInterface
* @param int $id The account ID
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function incrementViewCounter(int $id): bool;
@@ -88,56 +90,56 @@ interface AccountServiceInterface
* @param int $id The account ID
*
* @return bool
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function incrementDecryptCounter(int $id): bool;
/**
* @param int $id The account ID
*
- * @return \SP\Domain\Account\Models\Account
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return Account
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getPasswordForId(int $id): Account;
/**
- * @param \SP\Domain\Account\Dtos\AccountHistoryDto $accountHistoryDto
+ * @param AccountHistoryDto $accountHistoryDto
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function restoreRemoved(AccountHistoryDto $accountHistoryDto): void;
/**
- * @param \SP\Domain\Account\Dtos\AccountCreateDto $accountCreateDto
+ * @param AccountCreateDto $accountCreateDto
*
* @return int
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
*/
public function create(AccountCreateDto $accountCreateDto): int;
/**
* @param int $id The account ID
*
- * @return \SP\Domain\Account\Models\AccountDataView
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @return AccountDataView
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws ConstraintException
*/
public function getByIdEnriched(int $id): AccountDataView;
/**
* @param int $id The account ID
*
- * @return \SP\Domain\Account\Models\Account
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return Account
+ * @throws NoSuchItemException
*/
public function getById(int $id): Account;
@@ -145,26 +147,26 @@ interface AccountServiceInterface
* Updates external items for the account
*
* @param int $id The account ID
- * @param \SP\Domain\Account\Dtos\AccountUpdateDto $accountUpdateDto
+ * @param AccountUpdateDto $accountUpdateDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(int $id, AccountUpdateDto $accountUpdateDto): void;
/**
* Update accounts in bulk mode
*
- * @param \SP\Domain\Account\Dtos\AccountUpdateBulkDto $accountUpdateBulkDto
+ * @param AccountUpdateBulkDto $accountUpdateBulkDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updateBulk(AccountUpdateBulkDto $accountUpdateBulkDto): void;
/**
* @param int $id The account ID
- * @param \SP\Domain\Account\Dtos\AccountUpdateDto $accountUpdateDto
+ * @param AccountUpdateDto $accountUpdateDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function editPassword(int $id, AccountUpdateDto $accountUpdateDto): void;
@@ -177,18 +179,18 @@ interface AccountServiceInterface
public function updatePasswordMasterPass(int $id, EncryptedPassword $encryptedPassword): void;
/**
- * @param \SP\Domain\Account\Dtos\AccountHistoryDto $accountHistoryDto
+ * @param AccountHistoryDto $accountHistoryDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ServiceException
+ * @throws NoSuchItemException
*/
public function restoreModified(AccountHistoryDto $accountHistoryDto): void;
/**
* @param int $id The account ID
*
- * @return \SP\Domain\Account\Ports\AccountServiceInterface
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @return AccountServiceInterface
+ * @throws ServiceException
*/
public function delete(int $id): AccountServiceInterface;
@@ -204,8 +206,8 @@ interface AccountServiceInterface
* @param int|null $id The account ID
*
* @return array
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function getForUser(?int $id = null): array;
@@ -213,18 +215,18 @@ interface AccountServiceInterface
* @param int $id The account ID
*
* @return array
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function getLinked(int $id): array;
/**
* @param int $id The account ID
*
- * @return \SP\Domain\Common\Models\Simple
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return Simple
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws NoSuchItemException
*/
public function getPasswordHistoryForId(int $id): Simple;
@@ -234,17 +236,17 @@ interface AccountServiceInterface
public function getAllBasic(): array;
/**
- * @param \SP\DataModel\ItemSearchData $itemSearchData
+ * @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult;
/**
* Devolver el número total de cuentas
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getTotalNumAccounts(): int;
@@ -253,10 +255,10 @@ interface AccountServiceInterface
*
* @param int $id The account ID
*
- * @return \SP\Domain\Common\Models\Simple
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return Simple
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getDataForLink(int $id): Simple;
diff --git a/lib/SP/Domain/Account/Ports/AccountToFavoriteRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountToFavoriteRepositoryInterface.php
index da832316..484870e5 100644
--- a/lib/SP/Domain/Account/Ports/AccountToFavoriteRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToFavoriteRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/Account/Ports/AccountToFavoriteServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountToFavoriteServiceInterface.php
index aa39817e..b1f08be5 100644
--- a/lib/SP/Domain/Account/Ports/AccountToFavoriteServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToFavoriteServiceInterface.php
@@ -24,8 +24,8 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
/**
* Class AccountFavoriteService
diff --git a/lib/SP/Domain/Account/Ports/AccountToTagRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountToTagRepositoryInterface.php
index 5e6c0c27..b5e20a28 100644
--- a/lib/SP/Domain/Account/Ports/AccountToTagRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToTagRepositoryInterface.php
@@ -24,11 +24,9 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Domain\Account\Dtos\AccountDto;
-use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -66,8 +64,8 @@ interface AccountToTagRepositoryInterface extends RepositoryInterface
* @param int $accountId
* @param array $tags
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $accountId, array $tags): void;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountToTagServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountToTagServiceInterface.php
index 84673b3b..c943ddb1 100644
--- a/lib/SP/Domain/Account/Ports/AccountToTagServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToTagServiceInterface.php
@@ -25,6 +25,8 @@
namespace SP\Domain\Account\Ports;
use SP\DataModel\ItemData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
/**
* Class AccountToTagService
@@ -35,8 +37,8 @@ interface AccountToTagServiceInterface
{
/**
* @return ItemData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getTagsByAccountId(int $id): array;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountToUserGroupRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountToUserGroupRepositoryInterface.php
index 7114af9f..626f06dc 100644
--- a/lib/SP/Domain/Account/Ports/AccountToUserGroupRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToUserGroupRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -53,8 +53,8 @@ interface AccountToUserGroupRepositoryInterface extends RepositoryInterface
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserGroupsByUserGroupId(int $id): QueryResult;
@@ -62,8 +62,8 @@ interface AccountToUserGroupRepositoryInterface extends RepositoryInterface
* @param $id int
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteByUserGroupId(int $id): bool;
@@ -83,8 +83,8 @@ interface AccountToUserGroupRepositoryInterface extends RepositoryInterface
* @param bool $isEdit
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addByType(int $accountId, array $items, bool $isEdit = false): void;
diff --git a/lib/SP/Domain/Account/Ports/AccountToUserGroupServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountToUserGroupServiceInterface.php
index 915e367e..24f29999 100644
--- a/lib/SP/Domain/Account/Ports/AccountToUserGroupServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToUserGroupServiceInterface.php
@@ -25,6 +25,9 @@
namespace SP\Domain\Account\Ports;
use SP\DataModel\ItemData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountToUserGroupService
@@ -35,9 +38,9 @@ interface AccountToUserGroupServiceInterface
* @param int $id
*
* @return ItemData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getUserGroupsByAccountId(int $id): array;
}
diff --git a/lib/SP/Domain/Account/Ports/AccountToUserRepositoryInterface.php b/lib/SP/Domain/Account/Ports/AccountToUserRepositoryInterface.php
index d6469bee..920b3dbe 100644
--- a/lib/SP/Domain/Account/Ports/AccountToUserRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToUserRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -56,8 +56,8 @@ interface AccountToUserRepositoryInterface extends RepositoryInterface
* @param bool $isEdit
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addByType(int $accountId, array $items, bool $isEdit = false): void;
diff --git a/lib/SP/Domain/Account/Ports/AccountToUserServiceInterface.php b/lib/SP/Domain/Account/Ports/AccountToUserServiceInterface.php
index 96447ab3..f0f40dd7 100644
--- a/lib/SP/Domain/Account/Ports/AccountToUserServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/AccountToUserServiceInterface.php
@@ -25,6 +25,9 @@
namespace SP\Domain\Account\Ports;
use SP\DataModel\ItemData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountToUserService
@@ -35,9 +38,9 @@ interface AccountToUserServiceInterface
* @param int $id
*
* @return ItemData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getUsersByAccountId(int $id): array;
}
diff --git a/lib/SP/Domain/Account/Ports/PublicLinkRepositoryInterface.php b/lib/SP/Domain/Account/Ports/PublicLinkRepositoryInterface.php
index 269a03a2..83adaa32 100644
--- a/lib/SP/Domain/Account/Ports/PublicLinkRepositoryInterface.php
+++ b/lib/SP/Domain/Account/Ports/PublicLinkRepositoryInterface.php
@@ -24,12 +24,12 @@
namespace SP\Domain\Account\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -46,8 +46,8 @@ interface PublicLinkRepositoryInterface extends RepositoryInterface
* @param int $id
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): void;
@@ -96,19 +96,19 @@ interface PublicLinkRepositoryInterface extends RepositoryInterface
* @param PublicLinkData $publicLinkData
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addLinkView(PublicLinkData $publicLinkData): bool;
/**
* Updates an item
*
- * @param \SP\DataModel\PublicLinkData $publicLinkData
+ * @param PublicLinkData $publicLinkData
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function update(PublicLinkData $publicLinkData): bool;
diff --git a/lib/SP/Domain/Account/Ports/PublicLinkServiceInterface.php b/lib/SP/Domain/Account/Ports/PublicLinkServiceInterface.php
index 23dfc810..58403f0c 100644
--- a/lib/SP/Domain/Account/Ports/PublicLinkServiceInterface.php
+++ b/lib/SP/Domain/Account/Ports/PublicLinkServiceInterface.php
@@ -26,13 +26,14 @@ namespace SP\Domain\Account\Ports;
use Defuse\Crypto\Exception\CryptoException;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\DataModel\PublicLinkListData;
use SP\Domain\Account\Services\PublicLinkKey;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -50,20 +51,20 @@ interface PublicLinkServiceInterface
public function search(ItemSearchData $itemSearchData): QueryResult;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): PublicLinkListData;
/**
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws EnvironmentIsBrokenException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function refresh(int $id): bool;
@@ -73,9 +74,9 @@ interface PublicLinkServiceInterface
public function getPublicLinkKey(?string $hash = null): PublicLinkKey;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): PublicLinkServiceInterface;
@@ -86,7 +87,7 @@ interface PublicLinkServiceInterface
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int;
diff --git a/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php b/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php
index ba6a8df6..e4466aa8 100644
--- a/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php
+++ b/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php
@@ -25,9 +25,6 @@
namespace SP\Domain\Account\Search;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\AccountAclDto;
use SP\Domain\Account\Models\AccountSearchView;
use SP\Domain\Account\Ports\AccountAclServiceInterface;
@@ -39,6 +36,9 @@ use SP\Domain\Account\Services\AccountSearchItem;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
diff --git a/lib/SP/Domain/Account/Services/AccountAclService.php b/lib/SP/Domain/Account/Services/AccountAclService.php
index 7c36120c..df4bc7fc 100644
--- a/lib/SP/Domain/Account/Services/AccountAclService.php
+++ b/lib/SP/Domain/Account/Services/AccountAclService.php
@@ -28,13 +28,13 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ProfileData;
use SP\Domain\Account\Dtos\AccountAclDto;
use SP\Domain\Account\Ports\AccountAclServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserToUserGroupServiceInterface;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Infrastructure\File\FileCacheInterface;
diff --git a/lib/SP/Domain/Account/Services/AccountCacheService.php b/lib/SP/Domain/Account/Services/AccountCacheService.php
index bb38d46b..ccce29dc 100644
--- a/lib/SP/Domain/Account/Services/AccountCacheService.php
+++ b/lib/SP/Domain/Account/Services/AccountCacheService.php
@@ -30,6 +30,9 @@ use SP\Domain\Account\Ports\AccountCacheServiceInterface;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountCacheService
@@ -50,10 +53,10 @@ final class AccountCacheService extends Service implements AccountCacheServiceIn
* @param int $accountId The account's ID
* @param int $dateEdit The account's date edit
*
- * @return \SP\Domain\Account\Dtos\AccountCacheDto
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @return AccountCacheDto
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getCacheForAccount(int $accountId, int $dateEdit): AccountCacheDto
{
diff --git a/lib/SP/Domain/Account/Services/AccountCryptService.php b/lib/SP/Domain/Account/Services/AccountCryptService.php
index 586a234d..0128489e 100644
--- a/lib/SP/Domain/Account/Services/AccountCryptService.php
+++ b/lib/SP/Domain/Account/Services/AccountCryptService.php
@@ -28,8 +28,6 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\CryptException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Account\Models\Account;
use SP\Domain\Account\Ports\AccountCryptServiceInterface;
@@ -38,6 +36,8 @@ use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Crypt\CryptInterface;
+use SP\Domain\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
use SP\Domain\Task\Services\TaskFactory;
use SP\Util\Util;
diff --git a/lib/SP/Domain/Account/Services/AccountFileService.php b/lib/SP/Domain/Account/Services/AccountFileService.php
index 2bd67d18..1d6836a6 100644
--- a/lib/SP/Domain/Account/Services/AccountFileService.php
+++ b/lib/SP/Domain/Account/Services/AccountFileService.php
@@ -25,10 +25,6 @@
namespace SP\Domain\Account\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidImageException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\FileData;
use SP\DataModel\FileExtData;
use SP\DataModel\ItemSearchData;
@@ -36,6 +32,10 @@ use SP\Domain\Account\Ports\AccountFileRepositoryInterface;
use SP\Domain\Account\Ports\AccountFileServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidImageException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Util\FileUtil;
diff --git a/lib/SP/Domain/Account/Services/AccountHistoryService.php b/lib/SP/Domain/Account/Services/AccountHistoryService.php
index 1a05e2cc..792e080b 100644
--- a/lib/SP/Domain/Account/Services/AccountHistoryService.php
+++ b/lib/SP/Domain/Account/Services/AccountHistoryService.php
@@ -33,8 +33,10 @@ use SP\Domain\Account\Ports\AccountHistoryRepositoryInterface;
use SP\Domain\Account\Ports\AccountHistoryServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -73,7 +75,7 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
* @param int $id
*
* @return array Con los registros con id como clave y fecha - usuario como valor
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function getHistoryForAccount(int $id): array
{
@@ -81,9 +83,9 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
}
/**
- * @param \SP\DataModel\ItemSearchData $itemSearchData
+ * @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult
{
@@ -93,7 +95,7 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
/**
* Crea una nueva cuenta en la BBDD
*
- * @param \SP\Domain\Account\Dtos\AccountHistoryCreateDto $dto
+ * @param AccountHistoryCreateDto $dto
*
* @return int
*/
@@ -104,7 +106,7 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
/**
* @return array
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function getAccountsPassData(): array
{
@@ -116,7 +118,7 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
*
* @param int $id
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function delete(int $id): void
{
@@ -151,9 +153,9 @@ final class AccountHistoryService extends Service implements AccountHistoryServi
/**
* @param int $accountId
- * @param \SP\Domain\Account\Dtos\EncryptedPassword $encryptedPassword
+ * @param EncryptedPassword $encryptedPassword
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updatePasswordMasterPass(int $accountId, EncryptedPassword $encryptedPassword): void
{
diff --git a/lib/SP/Domain/Account/Services/AccountItemsService.php b/lib/SP/Domain/Account/Services/AccountItemsService.php
index a18d8172..a3f69fd7 100644
--- a/lib/SP/Domain/Account/Services/AccountItemsService.php
+++ b/lib/SP/Domain/Account/Services/AccountItemsService.php
@@ -25,9 +25,6 @@
namespace SP\Domain\Account\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Dtos\AccountCreateDto;
use SP\Domain\Account\Dtos\AccountUpdateDto;
use SP\Domain\Account\Ports\AccountItemsServiceInterface;
@@ -35,6 +32,11 @@ use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+
use function SP\processException;
/**
@@ -56,7 +58,7 @@ final class AccountItemsService extends Service implements AccountItemsServiceIn
*
* @throws QueryException
* @throws ConstraintException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updateItems(
bool $userCanChangePermissions,
diff --git a/lib/SP/Domain/Account/Services/AccountPresetService.php b/lib/SP/Domain/Account/Services/AccountPresetService.php
index 7f285afa..c3fc3b47 100644
--- a/lib/SP/Domain/Account/Services/AccountPresetService.php
+++ b/lib/SP/Domain/Account/Services/AccountPresetService.php
@@ -25,10 +25,6 @@
namespace SP\Domain\Account\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ItemPreset\AccountPermission;
use SP\DataModel\ItemPreset\Password;
use SP\Domain\Account\Dtos\AccountDto;
@@ -37,6 +33,10 @@ use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Mvc\Controller\Validators\ValidatorInterface;
diff --git a/lib/SP/Domain/Account/Services/AccountSearchService.php b/lib/SP/Domain/Account/Services/AccountSearchService.php
index 46ab812f..58a2f7c9 100644
--- a/lib/SP/Domain/Account/Services/AccountSearchService.php
+++ b/lib/SP/Domain/Account/Services/AccountSearchService.php
@@ -26,9 +26,6 @@ namespace SP\Domain\Account\Services;
use Exception;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Ports\AccountSearchDataBuilderInterface;
use SP\Domain\Account\Ports\AccountSearchRepositoryInterface;
use SP\Domain\Account\Ports\AccountSearchServiceInterface;
@@ -36,10 +33,14 @@ use SP\Domain\Account\Search\AccountSearchConstants;
use SP\Domain\Account\Search\AccountSearchFilter;
use SP\Domain\Account\Search\AccountSearchTokenizer;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Infrastructure\Database\QueryResult;
use SP\Util\Filter;
+
use function SP\processException;
/**
diff --git a/lib/SP/Domain/Account/Services/AccountService.php b/lib/SP/Domain/Account/Services/AccountService.php
index 19959dfa..e1effbc4 100644
--- a/lib/SP/Domain/Account/Services/AccountService.php
+++ b/lib/SP/Domain/Account/Services/AccountService.php
@@ -25,10 +25,6 @@
namespace SP\Domain\Account\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemPreset\AccountPrivate;
use SP\DataModel\ItemSearchData;
use SP\DataModel\ProfileData;
@@ -55,11 +51,16 @@ use SP\Domain\Common\Models\Simple;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -86,12 +87,12 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @return AccountEnrichedDto
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function withUsers(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto
{
@@ -101,12 +102,12 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @return AccountEnrichedDto
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function withUserGroups(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto
{
@@ -118,12 +119,12 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountEnrichedDto
+ * @param AccountEnrichedDto $accountEnrichedDto
*
- * @return \SP\Domain\Account\Dtos\AccountEnrichedDto
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @return AccountEnrichedDto
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function withTags(AccountEnrichedDto $accountEnrichedDto): AccountEnrichedDto
{
@@ -133,8 +134,8 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function incrementViewCounter(int $id): bool
{
@@ -151,10 +152,10 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function getPasswordForId(int $id): Account
{
@@ -170,9 +171,9 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* @param int $id
*
- * @return \SP\Domain\Account\Models\AccountDataView
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return AccountDataView
+ * @throws SPException
+ * @throws NoSuchItemException
*/
public function getByIdEnriched(int $id): AccountDataView
{
@@ -188,9 +189,9 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* Update accounts in bulk mode
*
- * @param \SP\Domain\Account\Dtos\AccountUpdateBulkDto $accountUpdateBulkDto
+ * @param AccountUpdateBulkDto $accountUpdateBulkDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updateBulk(AccountUpdateBulkDto $accountUpdateBulkDto): void
{
@@ -231,9 +232,9 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* @param int $id
*
- * @return \SP\Domain\Account\Models\Account
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return Account
+ * @throws SPException
+ * @throws NoSuchItemException
*/
public function getById(int $id): Account
{
@@ -247,9 +248,9 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\User\Services\UserLoginResponse $userData
- * @param \SP\DataModel\ProfileData $userProfile
- * @param \SP\Domain\Account\Models\Account $account
+ * @param UserLoginResponse $userData
+ * @param ProfileData $userProfile
+ * @param Account $account
*
* @return bool
*/
@@ -263,9 +264,9 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\User\Services\UserLoginResponse $userData
- * @param \SP\DataModel\ProfileData $userProfile
- * @param \SP\Domain\Account\Models\Account $account
+ * @param UserLoginResponse $userData
+ * @param ProfileData $userProfile
+ * @param Account $account
*
* @return bool
*/
@@ -283,7 +284,7 @@ final class AccountService extends Service implements AccountServiceInterface
* @throws QueryException
* @throws ServiceException
* @throws ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
private function addHistory(int $accountId, bool $isDelete = false): void
{
@@ -298,10 +299,10 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountCreateDto $accountCreateDto
+ * @param AccountCreateDto $accountCreateDto
*
* @return int
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(AccountCreateDto $accountCreateDto): int
{
@@ -335,10 +336,10 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\User\Services\UserLoginResponse $userData
- * @param \SP\Domain\Account\Dtos\AccountCreateDto $accountCreateDto
+ * @param UserLoginResponse $userData
+ * @param AccountCreateDto $accountCreateDto
*
- * @return \SP\Domain\Account\Dtos\AccountCreateDto
+ * @return AccountCreateDto
*/
private static function buildWithUserData(
UserLoginResponse $userData,
@@ -352,7 +353,7 @@ final class AccountService extends Service implements AccountServiceInterface
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
private function setPresetPrivate(
AccountCreateDto|AccountUpdateDto $accountDto,
@@ -385,9 +386,9 @@ final class AccountService extends Service implements AccountServiceInterface
* Updates external items for the account
*
* @param int $id
- * @param \SP\Domain\Account\Dtos\AccountUpdateDto $accountUpdateDto
+ * @param AccountUpdateDto $accountUpdateDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(int $id, AccountUpdateDto $accountUpdateDto): void
{
@@ -429,9 +430,9 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* @param int $id
- * @param \SP\Domain\Account\Dtos\AccountUpdateDto $accountUpdateDto
+ * @param AccountUpdateDto $accountUpdateDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function editPassword(int $id, AccountUpdateDto $accountUpdateDto): void
{
@@ -454,12 +455,12 @@ final class AccountService extends Service implements AccountServiceInterface
* Updates an already encrypted password data from a master password changing action
*
* @param int $id
- * @param \SP\Domain\Account\Dtos\EncryptedPassword $encryptedPassword
+ * @param EncryptedPassword $encryptedPassword
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function updatePasswordMasterPass(int $id, EncryptedPassword $encryptedPassword): void
{
@@ -471,9 +472,9 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountHistoryDto $accountHistoryDto
+ * @param AccountHistoryDto $accountHistoryDto
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function restoreModified(AccountHistoryDto $accountHistoryDto): void
{
@@ -495,12 +496,12 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\Domain\Account\Dtos\AccountHistoryDto $accountHistoryDto
+ * @param AccountHistoryDto $accountHistoryDto
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function restoreRemoved(AccountHistoryDto $accountHistoryDto): void
{
@@ -514,7 +515,7 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function delete(int $id): AccountServiceInterface
{
@@ -549,9 +550,9 @@ final class AccountService extends Service implements AccountServiceInterface
* @param int|null $id
*
* @return array
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getForUser(?int $id = null): array
{
@@ -562,9 +563,9 @@ final class AccountService extends Service implements AccountServiceInterface
* @param int $id
*
* @return array
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getLinked(int $id): array
{
@@ -575,7 +576,7 @@ final class AccountService extends Service implements AccountServiceInterface
* @throws QueryException
* @throws ConstraintException
* @throws NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function getPasswordHistoryForId(int $id): Simple
{
@@ -590,7 +591,7 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* @return AccountData[]
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function getAllBasic(): array
{
@@ -598,9 +599,9 @@ final class AccountService extends Service implements AccountServiceInterface
}
/**
- * @param \SP\DataModel\ItemSearchData $itemSearchData
+ * @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult
{
@@ -610,9 +611,9 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* Devolver el número total de cuentas
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getTotalNumAccounts(): int
{
@@ -624,10 +625,10 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* Obtener los datos de una cuenta.
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function getDataForLink(int $id): Simple
{
@@ -643,10 +644,10 @@ final class AccountService extends Service implements AccountServiceInterface
/**
* Obtener los datos relativos a la clave de todas las cuentas.
*
- * @return \SP\Domain\Common\Models\Simple[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @return Simple[]
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getAccountsPassData(): array
{
diff --git a/lib/SP/Domain/Account/Services/AccountToFavoriteService.php b/lib/SP/Domain/Account/Services/AccountToFavoriteService.php
index a596ed7b..60c24e04 100644
--- a/lib/SP/Domain/Account/Services/AccountToFavoriteService.php
+++ b/lib/SP/Domain/Account/Services/AccountToFavoriteService.php
@@ -25,11 +25,12 @@
namespace SP\Domain\Account\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountToFavoriteRepositoryInterface;
use SP\Domain\Account\Ports\AccountToFavoriteServiceInterface;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountFavoriteService
@@ -54,7 +55,7 @@ final class AccountToFavoriteService extends Service implements AccountToFavorit
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function getForUserId(int $id): array
{
diff --git a/lib/SP/Domain/Account/Services/AccountToTagService.php b/lib/SP/Domain/Account/Services/AccountToTagService.php
index 5c2e65ba..96752c39 100644
--- a/lib/SP/Domain/Account/Services/AccountToTagService.php
+++ b/lib/SP/Domain/Account/Services/AccountToTagService.php
@@ -30,6 +30,9 @@ use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
use SP\Domain\Account\Ports\AccountToTagServiceInterface;
use SP\Domain\Common\Models\Simple;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountToTagService
@@ -54,9 +57,9 @@ final class AccountToTagService extends Service implements AccountToTagServiceIn
*
* @return ItemData[]
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getTagsByAccountId(int $id): array
{
diff --git a/lib/SP/Domain/Account/Services/AccountToUserGroupService.php b/lib/SP/Domain/Account/Services/AccountToUserGroupService.php
index 8d9bc3b5..cf0e812e 100644
--- a/lib/SP/Domain/Account/Services/AccountToUserGroupService.php
+++ b/lib/SP/Domain/Account/Services/AccountToUserGroupService.php
@@ -29,6 +29,9 @@ use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserGroupServiceInterface;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountToUserGroupService
@@ -46,9 +49,9 @@ final class AccountToUserGroupService extends Service implements AccountToUserGr
* @param int $id
*
* @return ItemData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getUserGroupsByAccountId(int $id): array
{
diff --git a/lib/SP/Domain/Account/Services/AccountToUserService.php b/lib/SP/Domain/Account/Services/AccountToUserService.php
index daa48ef7..f06adeff 100644
--- a/lib/SP/Domain/Account/Services/AccountToUserService.php
+++ b/lib/SP/Domain/Account/Services/AccountToUserService.php
@@ -29,6 +29,9 @@ use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserServiceInterface;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AccountToUserService
@@ -46,9 +49,9 @@ final class AccountToUserService extends Service implements AccountToUserService
* @param int $id
*
* @return ItemData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getUsersByAccountId(int $id): array
{
diff --git a/lib/SP/Domain/Account/Services/PublicLinkService.php b/lib/SP/Domain/Account/Services/PublicLinkService.php
index 111ec160..ddbfac37 100644
--- a/lib/SP/Domain/Account/Services/PublicLinkService.php
+++ b/lib/SP/Domain/Account/Services/PublicLinkService.php
@@ -28,10 +28,6 @@ use Defuse\Crypto\Exception\CryptoException;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use SP\Core\Application;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\CryptException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\DataModel\PublicLinkListData;
@@ -44,6 +40,10 @@ use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
use SP\Domain\Config\Ports\ConfigInterface;
use SP\Domain\Core\Crypt\CryptInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\RequestInterface;
use SP\Http\Uri;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/lib/SP/Domain/Api/Ports/ApiServiceInterface.php b/lib/SP/Domain/Api/Ports/ApiServiceInterface.php
index 7ee39768..b69bcc6f 100644
--- a/lib/SP/Domain/Api/Ports/ApiServiceInterface.php
+++ b/lib/SP/Domain/Api/Ports/ApiServiceInterface.php
@@ -26,9 +26,9 @@ namespace SP\Domain\Api\Ports;
use Exception;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\InvalidClassException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ApiService
@@ -54,7 +54,7 @@ interface ApiServiceInterface
* @param mixed|null $default Valor por defecto
*
* @return mixed
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getParam(string $param, bool $required = false, mixed $default = null): mixed;
@@ -85,7 +85,7 @@ interface ApiServiceInterface
public function getParamRaw(string $param, bool $required = false, $default = null): ?string;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getMasterPass(): string;
diff --git a/lib/SP/Domain/Api/Services/ApiRequest.php b/lib/SP/Domain/Api/Services/ApiRequest.php
index 50021551..00ef413e 100644
--- a/lib/SP/Domain/Api/Services/ApiRequest.php
+++ b/lib/SP/Domain/Api/Services/ApiRequest.php
@@ -25,8 +25,9 @@
namespace SP\Domain\Api\Services;
use JsonException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Api\Ports\ApiRequestInterface;
+use SP\Domain\Core\Exceptions\SPException;
+
use function SP\__u;
/**
@@ -50,7 +51,7 @@ final class ApiRequest implements ApiRequestInterface
* @param string $stream
*
* @return ApiRequestInterface
- * @throws \SP\Domain\Api\Services\ApiRequestException
+ * @throws ApiRequestException
*/
public static function buildFromRequest(string $stream = self::PHP_REQUEST_STREAM): ApiRequestInterface
{
@@ -74,7 +75,7 @@ final class ApiRequest implements ApiRequestInterface
* @param string $json
*
* @return ApiRequestInterface
- * @throws \SP\Domain\Api\Services\ApiRequestException
+ * @throws ApiRequestException
*/
private static function buildFromJson(string $json): ApiRequestInterface
{
diff --git a/lib/SP/Domain/Api/Services/ApiRequestException.php b/lib/SP/Domain/Api/Services/ApiRequestException.php
index a98aee5f..e879244c 100644
--- a/lib/SP/Domain/Api/Services/ApiRequestException.php
+++ b/lib/SP/Domain/Api/Services/ApiRequestException.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Api\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ApiRequestException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class ApiRequestException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Api/Services/ApiService.php b/lib/SP/Domain/Api/Services/ApiService.php
index 93917b61..ec05ec9b 100644
--- a/lib/SP/Domain/Api/Services/ApiService.php
+++ b/lib/SP/Domain/Api/Services/ApiService.php
@@ -30,10 +30,6 @@ use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Hash;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\CryptException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\InvalidClassException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\Domain\Api\Ports\ApiRequestInterface;
use SP\Domain\Api\Ports\ApiServiceInterface;
@@ -43,6 +39,10 @@ use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
diff --git a/lib/SP/Domain/Api/Services/JsonRpcResponse.php b/lib/SP/Domain/Api/Services/JsonRpcResponse.php
index 3d7674af..9e104586 100644
--- a/lib/SP/Domain/Api/Services/JsonRpcResponse.php
+++ b/lib/SP/Domain/Api/Services/JsonRpcResponse.php
@@ -25,7 +25,7 @@
namespace SP\Domain\Api\Services;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
/**
@@ -91,4 +91,4 @@ final class JsonRpcResponse
'id' => $id,
], JSON_PARTIAL_OUTPUT_ON_ERROR);
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Auth/Ports/AuthTokenServiceInterface.php b/lib/SP/Domain/Auth/Ports/AuthTokenServiceInterface.php
index ae3b42a8..b6175f79 100644
--- a/lib/SP/Domain/Auth/Ports/AuthTokenServiceInterface.php
+++ b/lib/SP/Domain/Auth/Ports/AuthTokenServiceInterface.php
@@ -28,13 +28,14 @@ namespace SP\Domain\Auth\Ports;
use Defuse\Crypto\Exception\CryptoException;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use Exception;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Auth\Services\AuthTokenService;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -52,15 +53,15 @@ interface AuthTokenServiceInterface
public function search(ItemSearchData $itemSearchData): QueryResult;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getById(int $id): AuthTokenData;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): AuthTokenService;
@@ -88,13 +89,13 @@ interface AuthTokenServiceInterface
public function refreshAndUpdate(AuthTokenData $itemData): void;
/**
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\DuplicatedItemException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws EnvironmentIsBrokenException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws DuplicatedItemException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function update(AuthTokenData $itemData, ?string $token = null): void;
diff --git a/lib/SP/Domain/Auth/Ports/LoginServiceInterface.php b/lib/SP/Domain/Auth/Ports/LoginServiceInterface.php
index d84139e7..d06d4f29 100644
--- a/lib/SP/Domain/Auth/Ports/LoginServiceInterface.php
+++ b/lib/SP/Domain/Auth/Ports/LoginServiceInterface.php
@@ -27,11 +27,11 @@ namespace SP\Domain\Auth\Ports;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use Exception;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Services\AuthException;
use SP\Domain\Auth\Services\LoginResponse;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class LoginService
diff --git a/lib/SP/Domain/Auth/Services/AuthException.php b/lib/SP/Domain/Auth/Services/AuthException.php
index c0f6efdb..8d5795aa 100644
--- a/lib/SP/Domain/Auth/Services/AuthException.php
+++ b/lib/SP/Domain/Auth/Services/AuthException.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Auth\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class AuthException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class AuthException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Auth/Services/AuthTokenService.php b/lib/SP/Domain/Auth/Services/AuthTokenService.php
index 352f8324..d820c121 100644
--- a/lib/SP/Domain/Auth/Services/AuthTokenService.php
+++ b/lib/SP/Domain/Auth/Services/AuthTokenService.php
@@ -31,9 +31,6 @@ use SP\Core\Acl\Acl;
use SP\Core\Application;
use SP\Core\Crypt\Hash;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Auth\Ports\AuthTokenServiceInterface;
@@ -42,6 +39,9 @@ use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Auth\Repositories\AuthTokenRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/lib/SP/Domain/Auth/Services/LoginService.php b/lib/SP/Domain/Auth/Services/LoginService.php
index 9ed4321d..ddb90784 100644
--- a/lib/SP/Domain/Auth/Services/LoginService.php
+++ b/lib/SP/Domain/Auth/Services/LoginService.php
@@ -32,16 +32,16 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
use SP\DataModel\UserPreferencesData;
use SP\Domain\Auth\Ports\LdapAuthInterface;
use SP\Domain\Auth\Ports\LoginServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\LanguageInterface;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Domain\Crypt\Ports\TemporaryMasterPassServiceInterface;
diff --git a/lib/SP/Domain/Category/Adapters/CategoryAdapter.php b/lib/SP/Domain/Category/Adapters/CategoryAdapter.php
index bbe24923..52cee7fe 100644
--- a/lib/SP/Domain/Category/Adapters/CategoryAdapter.php
+++ b/lib/SP/Domain/Category/Adapters/CategoryAdapter.php
@@ -25,14 +25,17 @@
namespace SP\Domain\Category\Adapters;
use League\Fractal\Resource\Collection;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\Domain\Category\Ports\CategoryAdapterInterface;
use SP\Domain\Common\Adapters\Adapter;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\ActionNotFoundException;
+use SP\Domain\Core\Acl\ActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Adapters\CustomFieldAdapter;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Mvc\Controller\ItemTrait;
@@ -49,33 +52,46 @@ final class CategoryAdapter extends Adapter implements CategoryAdapterInterface
protected array $availableIncludes = ['customFields'];
+ public function __construct(
+ ConfigDataInterface $configData,
+ private readonly CustomFieldServiceInterface $customFieldService,
+ private readonly ActionsInterface $actions
+ ) {
+ parent::__construct($configData);
+ }
+
/**
* @throws ConstraintException
* @throws QueryException
* @throws SPException
* @throws ServiceException
*/
- public function includeCustomFields(CategoryData $data, CustomFieldServiceInterface $customFieldService): Collection
+ public function includeCustomFields(CategoryData $data): Collection
{
return $this->collection(
- $this->getCustomFieldsForItem(AclActionsInterface::CATEGORY, $data->id, $customFieldService),
+ $this->getCustomFieldsForItem(AclActionsInterface::CATEGORY, $data->id, $this->customFieldService),
new CustomFieldAdapter($this->configData)
);
}
+ /**
+ * @throws ActionNotFoundException
+ */
public function transform(CategoryData $data): array
{
+ $actionRoute = $this->actions->getActionById(AclActionsInterface::CATEGORY_VIEW)->getRoute();
+
return [
- 'id' => $data->getId(),
- 'name' => $data->getName(),
- 'description' => $data->getDescription(),
+ 'id' => $data->getId(),
+ 'name' => $data->getName(),
+ 'description' => $data->getDescription(),
'customFields' => null,
- 'links' => [
+ 'links' => [
[
'rel' => 'self',
'uri' => Link::getDeepLink(
$data->getId(),
- AclActionsInterface::CATEGORY_VIEW,
+ $actionRoute,
$this->configData,
true
),
diff --git a/lib/SP/Domain/Category/Ports/CategoryAdapterInterface.php b/lib/SP/Domain/Category/Ports/CategoryAdapterInterface.php
index d64f74a3..4bd4b4f0 100644
--- a/lib/SP/Domain/Category/Ports/CategoryAdapterInterface.php
+++ b/lib/SP/Domain/Category/Ports/CategoryAdapterInterface.php
@@ -26,7 +26,10 @@ namespace SP\Domain\Category\Ports;
use League\Fractal\Resource\Collection;
use SP\DataModel\CategoryData;
-use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class CategoryAdapter
@@ -36,15 +39,12 @@ use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
interface CategoryAdapterInterface
{
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
*/
- public function includeCustomFields(
- CategoryData $data,
- CustomFieldServiceInterface $customFieldService
- ): Collection;
+ public function includeCustomFields(CategoryData $data): Collection;
public function transform(CategoryData $data): array;
}
diff --git a/lib/SP/Domain/Category/Ports/CategoryRepositoryInterface.php b/lib/SP/Domain/Category/Ports/CategoryRepositoryInterface.php
index b8c955b2..a2be064f 100644
--- a/lib/SP/Domain/Category/Ports/CategoryRepositoryInterface.php
+++ b/lib/SP/Domain/Category/Ports/CategoryRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Category\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/Category/Ports/CategoryServiceInterface.php b/lib/SP/Domain/Category/Ports/CategoryServiceInterface.php
index 6aa7a33c..02bd1b00 100644
--- a/lib/SP/Domain/Category/Ports/CategoryServiceInterface.php
+++ b/lib/SP/Domain/Category/Ports/CategoryServiceInterface.php
@@ -25,11 +25,12 @@
namespace SP\Domain\Category\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -64,16 +65,16 @@ interface CategoryServiceInterface
public function getByName(string $name): ?CategoryData;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): CategoryServiceInterface;
/**
* Deletes all the items for given ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/Category/Services/CategoryService.php b/lib/SP/Domain/Category/Services/CategoryService.php
index 65b1e78c..3b3d57f2 100644
--- a/lib/SP/Domain/Category/Services/CategoryService.php
+++ b/lib/SP/Domain/Category/Services/CategoryService.php
@@ -25,9 +25,6 @@
namespace SP\Domain\Category\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Category\Ports\CategoryRepositoryInterface;
@@ -35,6 +32,9 @@ use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -101,9 +101,9 @@ final class CategoryService extends Service implements CategoryServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): CategoryServiceInterface
{
@@ -117,7 +117,7 @@ final class CategoryService extends Service implements CategoryServiceInterface
/**
* Deletes all the items for given ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/Client/Adapters/ClientAdapter.php b/lib/SP/Domain/Client/Adapters/ClientAdapter.php
index 1132cacf..e77b97ec 100644
--- a/lib/SP/Domain/Client/Adapters/ClientAdapter.php
+++ b/lib/SP/Domain/Client/Adapters/ClientAdapter.php
@@ -25,14 +25,14 @@
namespace SP\Domain\Client\Adapters;
use League\Fractal\Resource\Collection;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\Domain\Client\Ports\ClientAdapterInterface;
use SP\Domain\Common\Adapters\Adapter;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Adapters\CustomFieldAdapter;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Mvc\Controller\ItemTrait;
diff --git a/lib/SP/Domain/Client/Ports/ClientAdapterInterface.php b/lib/SP/Domain/Client/Ports/ClientAdapterInterface.php
index 7fcecd4e..b73460cc 100644
--- a/lib/SP/Domain/Client/Ports/ClientAdapterInterface.php
+++ b/lib/SP/Domain/Client/Ports/ClientAdapterInterface.php
@@ -26,6 +26,10 @@ namespace SP\Domain\Client\Ports;
use League\Fractal\Resource\Collection;
use SP\DataModel\ClientData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
/**
@@ -36,10 +40,10 @@ use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
interface ClientAdapterInterface
{
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
*/
public function includeCustomFields(ClientData $data, CustomFieldServiceInterface $customFieldService): Collection;
diff --git a/lib/SP/Domain/Client/Ports/ClientRepositoryInterface.php b/lib/SP/Domain/Client/Ports/ClientRepositoryInterface.php
index 3cbf6a38..45361917 100644
--- a/lib/SP/Domain/Client/Ports/ClientRepositoryInterface.php
+++ b/lib/SP/Domain/Client/Ports/ClientRepositoryInterface.php
@@ -25,9 +25,9 @@
namespace SP\Domain\Client\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
use SP\Mvc\Model\QueryCondition;
diff --git a/lib/SP/Domain/Client/Ports/ClientServiceInterface.php b/lib/SP/Domain/Client/Ports/ClientServiceInterface.php
index c12db9bf..028f7451 100644
--- a/lib/SP/Domain/Client/Ports/ClientServiceInterface.php
+++ b/lib/SP/Domain/Client/Ports/ClientServiceInterface.php
@@ -25,13 +25,13 @@
namespace SP\Domain\Client\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -66,9 +66,9 @@ interface ClientServiceInterface
public function getByName(string $name): ?ClientData;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): ClientServiceInterface;
diff --git a/lib/SP/Domain/Client/Services/ClientService.php b/lib/SP/Domain/Client/Services/ClientService.php
index 13518b04..3db5d11b 100644
--- a/lib/SP/Domain/Client/Services/ClientService.php
+++ b/lib/SP/Domain/Client/Services/ClientService.php
@@ -25,9 +25,6 @@
namespace SP\Domain\Client\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
@@ -37,6 +34,9 @@ use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -49,8 +49,8 @@ final class ClientService extends Service implements ClientServiceInterface
{
use ServiceItemTrait;
- private ClientRepositoryInterface $clientRepository;
- private \SP\Domain\Account\Ports\AccountFilterUserInterface $accountFilterUser;
+ private ClientRepositoryInterface $clientRepository;
+ private AccountFilterUserInterface $accountFilterUser;
public function __construct(
Application $application,
@@ -64,9 +64,9 @@ final class ClientService extends Service implements ClientServiceInterface
}
/**
- * @param \SP\DataModel\ItemSearchData $itemSearchData
+ * @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult
{
@@ -110,8 +110,8 @@ final class ClientService extends Service implements ClientServiceInterface
/**
* @param int $id
*
- * @return \SP\Domain\Client\Ports\ClientServiceInterface
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @return ClientServiceInterface
+ * @throws NoSuchItemException
*/
public function delete(int $id): ClientServiceInterface
{
@@ -126,7 +126,7 @@ final class ClientService extends Service implements ClientServiceInterface
* @param int[] $ids
*
* @return int
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int
{
diff --git a/lib/SP/Domain/Common/Models/SerializedModel.php b/lib/SP/Domain/Common/Models/SerializedModel.php
index 0b5c60a8..fb62d19b 100644
--- a/lib/SP/Domain/Common/Models/SerializedModel.php
+++ b/lib/SP/Domain/Common/Models/SerializedModel.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Common\Models;
-use SP\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
use SP\Util\Util;
/**
diff --git a/lib/SP/Domain/Common/Services/ServiceException.php b/lib/SP/Domain/Common/Services/ServiceException.php
index 7983c1e2..929b91c6 100644
--- a/lib/SP/Domain/Common/Services/ServiceException.php
+++ b/lib/SP/Domain/Common/Services/ServiceException.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Common\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ServiceException
diff --git a/lib/SP/Domain/Config/Ports/ConfigRepositoryInterface.php b/lib/SP/Domain/Config/Ports/ConfigRepositoryInterface.php
index ec66dfac..4382b285 100644
--- a/lib/SP/Domain/Config/Ports/ConfigRepositoryInterface.php
+++ b/lib/SP/Domain/Config/Ports/ConfigRepositoryInterface.php
@@ -25,9 +25,9 @@
namespace SP\Domain\Config\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ConfigData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -86,8 +86,8 @@ interface ConfigRepositoryInterface
* @param string $param
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteByParam(string $param): int;
}
diff --git a/lib/SP/Domain/Config/Ports/ConfigServiceInterface.php b/lib/SP/Domain/Config/Ports/ConfigServiceInterface.php
index f0b0f046..3afb8595 100644
--- a/lib/SP/Domain/Config/Ports/ConfigServiceInterface.php
+++ b/lib/SP/Domain/Config/Ports/ConfigServiceInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\Config\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ConfigData;
use SP\DataModel\Dto\ConfigRequest;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
@@ -39,7 +40,7 @@ interface ConfigServiceInterface
{
/**
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getByParam(string $param, $default = null);
@@ -50,7 +51,7 @@ interface ConfigServiceInterface
public function create(ConfigData $configData): int;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function saveBatch(ConfigRequest $configRequest): void;
@@ -70,9 +71,9 @@ interface ConfigServiceInterface
public function getAll(): array;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function deleteByParam(string $param): void;
}
diff --git a/lib/SP/Domain/Config/Services/ConfigBackupService.php b/lib/SP/Domain/Config/Services/ConfigBackupService.php
index 8cfbb46b..f0735c51 100644
--- a/lib/SP/Domain/Config/Services/ConfigBackupService.php
+++ b/lib/SP/Domain/Config/Services/ConfigBackupService.php
@@ -25,16 +25,17 @@
namespace SP\Domain\Config\Services;
use Exception;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Adapters\ConfigData;
use SP\Domain\Config\Ports\ConfigBackupServiceInterface;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\File\FileException;
use SP\Util\Util;
+
use function SP\processException;
/**
diff --git a/lib/SP/Domain/Config/Services/ConfigFileService.php b/lib/SP/Domain/Config/Services/ConfigFileService.php
index 814c9a84..3844f251 100644
--- a/lib/SP/Domain/Config/Services/ConfigFileService.php
+++ b/lib/SP/Domain/Config/Services/ConfigFileService.php
@@ -26,14 +26,14 @@ namespace SP\Domain\Config\Services;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use Exception;
-use SP\Core\Exceptions\ConfigException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Adapters\ConfigData;
use SP\Domain\Config\Ports\ConfigBackupServiceInterface;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigInterface;
use SP\Domain\Core\AppInfoInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\ConfigException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\XmlFileStorageInterface;
diff --git a/lib/SP/Domain/Config/Services/ConfigService.php b/lib/SP/Domain/Config/Services/ConfigService.php
index 80b25ae1..06be0476 100644
--- a/lib/SP/Domain/Config/Services/ConfigService.php
+++ b/lib/SP/Domain/Config/Services/ConfigService.php
@@ -26,15 +26,15 @@ namespace SP\Domain\Config\Services;
use Exception;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ConfigData;
use SP\DataModel\Dto\ConfigRequest;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigRepositoryInterface;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Config\Repositories\ConfigRepository;
@@ -56,7 +56,7 @@ final class ConfigService extends Service implements ConfigServiceInterface
/**
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getByParam(string $param, $default = null)
{
@@ -90,9 +90,9 @@ final class ConfigService extends Service implements ConfigServiceInterface
}
/**
- * @param \SP\DataModel\Dto\ConfigRequest $configRequest
+ * @param ConfigRequest $configRequest
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function saveBatch(ConfigRequest $configRequest): void
{
@@ -152,9 +152,9 @@ final class ConfigService extends Service implements ConfigServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function deleteByParam(string $param): void
{
diff --git a/lib/SP/Domain/Config/Services/ConfigUtil.php b/lib/SP/Domain/Config/Services/ConfigUtil.php
index 5fc5d05c..28d0b36b 100644
--- a/lib/SP/Domain/Config/Services/ConfigUtil.php
+++ b/lib/SP/Domain/Config/Services/ConfigUtil.php
@@ -24,8 +24,8 @@
namespace SP\Domain\Config\Services;
-use SP\Core\Exceptions\ConfigException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConfigException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Util\Checks;
/**
@@ -111,4 +111,4 @@ final class ConfigUtil
);
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Acl/AccountPermissionException.php b/lib/SP/Domain/Core/Acl/AccountPermissionException.php
similarity index 72%
rename from lib/SP/Core/Acl/AccountPermissionException.php
rename to lib/SP/Domain/Core/Acl/AccountPermissionException.php
index 2939e641..32bf6a61 100644
--- a/lib/SP/Core/Acl/AccountPermissionException.php
+++ b/lib/SP/Domain/Core/Acl/AccountPermissionException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,15 +22,15 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Acl;
+namespace SP\Domain\Core\Acl;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
+
+use function SP\__u;
/**
* Class AccountPermissionException
- *
- * @package SP\Core\Acl
*/
final class AccountPermissionException extends SPException
{
@@ -39,6 +39,12 @@ final class AccountPermissionException extends SPException
*/
public function __construct(string $type, $code = 0, Exception $previous = null)
{
- parent::__construct(__u('You don\'t have permission to access this account'), $type, __u('Please contact to the administrator'), $code, $previous);
+ parent::__construct(
+ __u('You don\'t have permission to access this account'),
+ $type,
+ __u('Please contact to the administrator'),
+ $code,
+ $previous
+ );
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Acl/ActionNotFoundException.php b/lib/SP/Domain/Core/Acl/ActionNotFoundException.php
similarity index 84%
rename from lib/SP/Core/Acl/ActionNotFoundException.php
rename to lib/SP/Domain/Core/Acl/ActionNotFoundException.php
index e747295b..3a29e709 100644
--- a/lib/SP/Core/Acl/ActionNotFoundException.php
+++ b/lib/SP/Domain/Core/Acl/ActionNotFoundException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,16 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Acl;
+namespace SP\Domain\Core\Acl;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ActionNotFoundException
- *
- * @package SP\Core\Acl
*/
final class ActionNotFoundException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Core/Acl/ActionsInterface.php b/lib/SP/Domain/Core/Acl/ActionsInterface.php
index 8dd31790..f71f882a 100644
--- a/lib/SP/Domain/Core/Acl/ActionsInterface.php
+++ b/lib/SP/Domain/Core/Acl/ActionsInterface.php
@@ -24,7 +24,6 @@
namespace SP\Domain\Core\Acl;
-use SP\Core\Acl\ActionNotFoundException;
use SP\DataModel\ActionData;
use SP\Infrastructure\File\FileException;
diff --git a/lib/SP/Core/Acl/UnauthorizedActionException.php b/lib/SP/Domain/Core/Acl/UnauthorizedActionException.php
similarity index 80%
rename from lib/SP/Core/Acl/UnauthorizedActionException.php
rename to lib/SP/Domain/Core/Acl/UnauthorizedActionException.php
index 0ef05f1c..6043a4c6 100644
--- a/lib/SP/Core/Acl/UnauthorizedActionException.php
+++ b/lib/SP/Domain/Core/Acl/UnauthorizedActionException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,11 +22,12 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Acl;
-
+namespace SP\Domain\Core\Acl;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
+
+use function SP\__u;
/**
* Class UnauthorizedActionException
@@ -38,11 +39,11 @@ final class UnauthorizedActionException extends SPException
/**
* SPException constructor.
*
- * @param string $type
- * @param int $code
+ * @param string $type
+ * @param int $code
* @param Exception|null $previous
*/
- public function __construct(string $type, $code = 0, Exception $previous = null)
+ public function __construct(string $type, int $code = 0, Exception $previous = null)
{
parent::__construct(
__u('You don\'t have permission to do this operation'),
@@ -52,4 +53,4 @@ final class UnauthorizedActionException extends SPException
$previous
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Acl/UnauthorizedPageException.php b/lib/SP/Domain/Core/Acl/UnauthorizedPageException.php
similarity index 79%
rename from lib/SP/Core/Acl/UnauthorizedPageException.php
rename to lib/SP/Domain/Core/Acl/UnauthorizedPageException.php
index 0f5f77c6..1c135d03 100644
--- a/lib/SP/Core/Acl/UnauthorizedPageException.php
+++ b/lib/SP/Domain/Core/Acl/UnauthorizedPageException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,26 +22,26 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Acl;
+namespace SP\Domain\Core\Acl;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
+
+use function SP\__u;
/**
* Class UnauthorizedPageException
- *
- * @package SP\Core\Acl
*/
final class UnauthorizedPageException extends SPException
{
/**
* SPException constructor.
*
- * @param string $type
- * @param int $code
+ * @param string $type
+ * @param int $code
* @param Exception|null $previous
*/
- public function __construct($type, $code = 0, Exception $previous = null)
+ public function __construct(string $type, int $code = 0, Exception $previous = null)
{
parent::__construct(
__u('You don\'t have permission to access this page'),
@@ -52,4 +52,4 @@ final class UnauthorizedPageException extends SPException
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Core/Crypt/CryptInterface.php b/lib/SP/Domain/Core/Crypt/CryptInterface.php
index 1cbf1be5..62bf0540 100644
--- a/lib/SP/Domain/Core/Crypt/CryptInterface.php
+++ b/lib/SP/Domain/Core/Crypt/CryptInterface.php
@@ -26,7 +26,7 @@ namespace SP\Domain\Core\Crypt;
use Defuse\Crypto\Key;
use Defuse\Crypto\KeyProtectedByPassword;
-use SP\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\CryptException;
/**
* Class Crypt
diff --git a/lib/SP/Domain/Core/Crypt/VaultInterface.php b/lib/SP/Domain/Core/Crypt/VaultInterface.php
index 208d45ba..85c48004 100644
--- a/lib/SP/Domain/Core/Crypt/VaultInterface.php
+++ b/lib/SP/Domain/Core/Crypt/VaultInterface.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Core\Crypt;
-use SP\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\CryptException;
/**
* Class VaultInterface
diff --git a/lib/SP/Core/Exceptions/CheckException.php b/lib/SP/Domain/Core/Exceptions/CheckException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/CheckException.php
rename to lib/SP/Domain/Core/Exceptions/CheckException.php
index 91844c7c..0aff2da2 100644
--- a/lib/SP/Core/Exceptions/CheckException.php
+++ b/lib/SP/Domain/Core/Exceptions/CheckException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class CheckException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
class CheckException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/ConfigException.php b/lib/SP/Domain/Core/Exceptions/ConfigException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/ConfigException.php
rename to lib/SP/Domain/Core/Exceptions/ConfigException.php
index 5328eee1..3a82d354 100644
--- a/lib/SP/Core/Exceptions/ConfigException.php
+++ b/lib/SP/Domain/Core/Exceptions/ConfigException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class ConfigException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class ConfigException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/ConstraintException.php b/lib/SP/Domain/Core/Exceptions/ConstraintException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/ConstraintException.php
rename to lib/SP/Domain/Core/Exceptions/ConstraintException.php
index b4bf10e2..8c82cbe6 100644
--- a/lib/SP/Core/Exceptions/ConstraintException.php
+++ b/lib/SP/Domain/Core/Exceptions/ConstraintException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class ConstraintException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class ConstraintException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/CryptException.php b/lib/SP/Domain/Core/Exceptions/CryptException.php
similarity index 96%
rename from lib/SP/Core/Exceptions/CryptException.php
rename to lib/SP/Domain/Core/Exceptions/CryptException.php
index 7f6b178f..b67bb750 100644
--- a/lib/SP/Core/Exceptions/CryptException.php
+++ b/lib/SP/Domain/Core/Exceptions/CryptException.php
@@ -22,7 +22,7 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class CryptException
diff --git a/lib/SP/Core/Exceptions/FileNotFoundException.php b/lib/SP/Domain/Core/Exceptions/FileNotFoundException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/FileNotFoundException.php
rename to lib/SP/Domain/Core/Exceptions/FileNotFoundException.php
index cb809ced..d6ad85df 100644
--- a/lib/SP/Core/Exceptions/FileNotFoundException.php
+++ b/lib/SP/Domain/Core/Exceptions/FileNotFoundException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class FileNotFoundException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class FileNotFoundException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/InitializationException.php b/lib/SP/Domain/Core/Exceptions/InitializationException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/InitializationException.php
rename to lib/SP/Domain/Core/Exceptions/InitializationException.php
index e81336e1..66d88c11 100644
--- a/lib/SP/Core/Exceptions/InitializationException.php
+++ b/lib/SP/Domain/Core/Exceptions/InitializationException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class InitializationException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class InitializationException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/InstallError.php b/lib/SP/Domain/Core/Exceptions/InstallError.php
similarity index 85%
rename from lib/SP/Core/Exceptions/InstallError.php
rename to lib/SP/Domain/Core/Exceptions/InstallError.php
index daa9009f..8053ef27 100644
--- a/lib/SP/Core/Exceptions/InstallError.php
+++ b/lib/SP/Domain/Core/Exceptions/InstallError.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class InstallError
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class InstallError extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/InvalidArgumentException.php b/lib/SP/Domain/Core/Exceptions/InvalidArgumentException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/InvalidArgumentException.php
rename to lib/SP/Domain/Core/Exceptions/InvalidArgumentException.php
index 95ed1e21..bf0c0480 100644
--- a/lib/SP/Core/Exceptions/InvalidArgumentException.php
+++ b/lib/SP/Domain/Core/Exceptions/InvalidArgumentException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class InvalidArgumentException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class InvalidArgumentException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/InvalidClassException.php b/lib/SP/Domain/Core/Exceptions/InvalidClassException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/InvalidClassException.php
rename to lib/SP/Domain/Core/Exceptions/InvalidClassException.php
index ec941c75..2d68b47a 100644
--- a/lib/SP/Core/Exceptions/InvalidClassException.php
+++ b/lib/SP/Domain/Core/Exceptions/InvalidClassException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class InvalidClassException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class InvalidClassException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/InvalidImageException.php b/lib/SP/Domain/Core/Exceptions/InvalidImageException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/InvalidImageException.php
rename to lib/SP/Domain/Core/Exceptions/InvalidImageException.php
index 677fde7a..d858c284 100644
--- a/lib/SP/Core/Exceptions/InvalidImageException.php
+++ b/lib/SP/Domain/Core/Exceptions/InvalidImageException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class InvalidImageException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class InvalidImageException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/ItemException.php b/lib/SP/Domain/Core/Exceptions/ItemException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/ItemException.php
rename to lib/SP/Domain/Core/Exceptions/ItemException.php
index 74625039..9eb39249 100644
--- a/lib/SP/Core/Exceptions/ItemException.php
+++ b/lib/SP/Domain/Core/Exceptions/ItemException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,7 +22,7 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
use Exception;
@@ -30,9 +30,9 @@ use Exception;
/**
* Class ItemException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class ItemException extends Exception
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/NoSuchPropertyException.php b/lib/SP/Domain/Core/Exceptions/NoSuchPropertyException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/NoSuchPropertyException.php
rename to lib/SP/Domain/Core/Exceptions/NoSuchPropertyException.php
index 50f85c0b..3d266f5e 100644
--- a/lib/SP/Core/Exceptions/NoSuchPropertyException.php
+++ b/lib/SP/Domain/Core/Exceptions/NoSuchPropertyException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,16 +22,16 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
use Exception;
/**
* Class NoSuchPropertyException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
class NoSuchPropertyException extends Exception
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/QueryException.php b/lib/SP/Domain/Core/Exceptions/QueryException.php
similarity index 85%
rename from lib/SP/Core/Exceptions/QueryException.php
rename to lib/SP/Domain/Core/Exceptions/QueryException.php
index f4e73e1f..d0c2680f 100644
--- a/lib/SP/Core/Exceptions/QueryException.php
+++ b/lib/SP/Domain/Core/Exceptions/QueryException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class QueryException
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class QueryException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/SPException.php b/lib/SP/Domain/Core/Exceptions/SPException.php
similarity index 98%
rename from lib/SP/Core/Exceptions/SPException.php
rename to lib/SP/Domain/Core/Exceptions/SPException.php
index d8dafd75..5f69dcb8 100644
--- a/lib/SP/Core/Exceptions/SPException.php
+++ b/lib/SP/Domain/Core/Exceptions/SPException.php
@@ -22,7 +22,7 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
use Exception;
diff --git a/lib/SP/Core/Exceptions/SessionTimeout.php b/lib/SP/Domain/Core/Exceptions/SessionTimeout.php
similarity index 85%
rename from lib/SP/Core/Exceptions/SessionTimeout.php
rename to lib/SP/Domain/Core/Exceptions/SessionTimeout.php
index 4a5d2eea..1e7a0993 100644
--- a/lib/SP/Core/Exceptions/SessionTimeout.php
+++ b/lib/SP/Domain/Core/Exceptions/SessionTimeout.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,16 +22,16 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
use Exception;
/**
* Class SessionTimeout
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class SessionTimeout extends Exception
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Core/Exceptions/ValidationException.php b/lib/SP/Domain/Core/Exceptions/ValidationException.php
similarity index 86%
rename from lib/SP/Core/Exceptions/ValidationException.php
rename to lib/SP/Domain/Core/Exceptions/ValidationException.php
index 71db80f0..06b92254 100644
--- a/lib/SP/Core/Exceptions/ValidationException.php
+++ b/lib/SP/Domain/Core/Exceptions/ValidationException.php
@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
- * @copyright 2012-2021, Rubén DomÃnguez nuxsmin@$syspass.org
+ * @copyright 2012-2023, Rubén DomÃnguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -22,14 +22,14 @@
* along with sysPass. If not, see .
*/
-namespace SP\Core\Exceptions;
+namespace SP\Domain\Core\Exceptions;
/**
* Class ValidationException para excepciones en validación de formularios
*
- * @package SP\Core\Exceptions
+ * @package SP\Domain\Core\Exceptions
*/
final class ValidationException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Core/PhpExtensionCheckerInterface.php b/lib/SP/Domain/Core/PhpExtensionCheckerInterface.php
index 72d15fb4..21745f97 100644
--- a/lib/SP/Domain/Core/PhpExtensionCheckerInterface.php
+++ b/lib/SP/Domain/Core/PhpExtensionCheckerInterface.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Core;
-use SP\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\CheckException;
/**
* Class PhpExtensionCheckerInterface
diff --git a/lib/SP/Domain/Crypt/Ports/MasterPassServiceInterface.php b/lib/SP/Domain/Crypt/Ports/MasterPassServiceInterface.php
index 7f94dc24..1328c2a5 100644
--- a/lib/SP/Domain/Crypt/Ports/MasterPassServiceInterface.php
+++ b/lib/SP/Domain/Crypt/Ports/MasterPassServiceInterface.php
@@ -25,9 +25,9 @@
namespace SP\Domain\Crypt\Ports;
use Exception;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/lib/SP/Domain/Crypt/Ports/TemporaryMasterPassServiceInterface.php b/lib/SP/Domain/Crypt/Ports/TemporaryMasterPassServiceInterface.php
index 5084dd40..48c7346e 100644
--- a/lib/SP/Domain/Crypt/Ports/TemporaryMasterPassServiceInterface.php
+++ b/lib/SP/Domain/Crypt/Ports/TemporaryMasterPassServiceInterface.php
@@ -25,6 +25,10 @@
namespace SP\Domain\Crypt\Ports;
use Defuse\Crypto\Exception\CryptoException;
+use PHPMailer\PHPMailer\Exception;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
@@ -40,7 +44,7 @@ interface TemporaryMasterPassServiceInterface
* @param int $maxTime El tiempo máximo de validez de la clave
*
* @return string
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(int $maxTime = 14400): string;
@@ -50,23 +54,23 @@ interface TemporaryMasterPassServiceInterface
* @param string $pass clave a comprobar
*
* @return bool
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function checkTempMasterPass(string $pass): bool;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \PHPMailer\PHPMailer\Exception
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
+ * @throws Exception
*/
public function sendByEmailForGroup(int $groupId, string $key): void;
/**
- * @throws \PHPMailer\PHPMailer\Exception
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws Exception
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function sendByEmailForAllUsers(string $key): void;
@@ -77,7 +81,7 @@ interface TemporaryMasterPassServiceInterface
*
* @return string con la clave maestra desencriptada
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws CryptoException
*/
public function getUsingKey(string $key): string;
diff --git a/lib/SP/Domain/Crypt/Services/MasterPassService.php b/lib/SP/Domain/Crypt/Services/MasterPassService.php
index cb78c0ed..963cee03 100644
--- a/lib/SP/Domain/Crypt/Services/MasterPassService.php
+++ b/lib/SP/Domain/Crypt/Services/MasterPassService.php
@@ -27,13 +27,13 @@ namespace SP\Domain\Crypt\Services;
use Exception;
use SP\Core\Application;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountCryptServiceInterface;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Config\Services\ConfigService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Domain\CustomField\Ports\CustomFieldCryptServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldCryptService;
diff --git a/lib/SP/Domain/Crypt/Services/TemporaryMasterPassService.php b/lib/SP/Domain/Crypt/Services/TemporaryMasterPassService.php
index b793df03..2899ef6c 100644
--- a/lib/SP/Domain/Crypt/Services/TemporaryMasterPassService.php
+++ b/lib/SP/Domain/Crypt/Services/TemporaryMasterPassService.php
@@ -37,6 +37,8 @@ use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Crypt\Ports\TemporaryMasterPassServiceInterface;
use SP\Domain\Notification\Ports\MailServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
@@ -90,7 +92,7 @@ final class TemporaryMasterPassService extends Service
* @param int $maxTime El tiempo máximo de validez de la clave
*
* @return string
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(int $maxTime = 14400): string
{
@@ -139,7 +141,7 @@ final class TemporaryMasterPassService extends Service
* @param string $pass clave a comprobar
*
* @return bool
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function checkTempMasterPass(string $pass): bool
{
@@ -194,7 +196,7 @@ final class TemporaryMasterPassService extends Service
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
protected function expire(): void
{
@@ -218,9 +220,9 @@ final class TemporaryMasterPassService extends Service
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
* @throws \PHPMailer\PHPMailer\Exception
*/
public function sendByEmailForGroup(int $groupId, string $key): void
@@ -255,9 +257,9 @@ final class TemporaryMasterPassService extends Service
/**
* @throws \PHPMailer\PHPMailer\Exception
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function sendByEmailForAllUsers(string $key): void
{
@@ -280,7 +282,7 @@ final class TemporaryMasterPassService extends Service
*
* @return string con la clave maestra desencriptada
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws CryptoException
*/
public function getUsingKey(string $key): string
diff --git a/lib/SP/Domain/CustomField/Ports/CustomFieldDefServiceInterface.php b/lib/SP/Domain/CustomField/Ports/CustomFieldDefServiceInterface.php
index c821541c..e1541be8 100644
--- a/lib/SP/Domain/CustomField/Ports/CustomFieldDefServiceInterface.php
+++ b/lib/SP/Domain/CustomField/Ports/CustomFieldDefServiceInterface.php
@@ -24,12 +24,13 @@
namespace SP\Domain\CustomField\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Services\CustomFieldDefService;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -46,7 +47,7 @@ interface CustomFieldDefServiceInterface
public function search(ItemSearchData $itemSearchData): QueryResult;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function delete(int $id): CustomFieldDefService;
@@ -55,16 +56,16 @@ interface CustomFieldDefServiceInterface
*
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): void;
/**
- * @param \SP\DataModel\CustomFieldDefinitionData $itemData
+ * @param CustomFieldDefinitionData $itemData
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function create(CustomFieldDefinitionData $itemData): int;
@@ -74,14 +75,14 @@ interface CustomFieldDefServiceInterface
public function update(CustomFieldDefinitionData $itemData);
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): CustomFieldDefinitionData;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/CustomField/Ports/CustomFieldRepositoryInterface.php b/lib/SP/Domain/CustomField/Ports/CustomFieldRepositoryInterface.php
index eef9d9cb..3597042b 100644
--- a/lib/SP/Domain/CustomField/Ports/CustomFieldRepositoryInterface.php
+++ b/lib/SP/Domain/CustomField/Ports/CustomFieldRepositoryInterface.php
@@ -24,10 +24,10 @@
namespace SP\Domain\CustomField\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldData;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -68,8 +68,8 @@ interface CustomFieldRepositoryInterface extends RepositoryInterface
* @param int|null $definitionId
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteCustomFieldDataForDefinition(int $id, int $moduleId, ?int $definitionId): int;
@@ -123,8 +123,8 @@ interface CustomFieldRepositoryInterface extends RepositoryInterface
* @param int|null $itemId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForModuleAndItemId(int $moduleId, ?int $itemId): QueryResult;
}
diff --git a/lib/SP/Domain/CustomField/Ports/CustomFieldServiceInterface.php b/lib/SP/Domain/CustomField/Ports/CustomFieldServiceInterface.php
index 6004acd5..2c3f4d5b 100644
--- a/lib/SP/Domain/CustomField/Ports/CustomFieldServiceInterface.php
+++ b/lib/SP/Domain/CustomField/Ports/CustomFieldServiceInterface.php
@@ -25,10 +25,11 @@
namespace SP\Domain\CustomField\Ports;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
@@ -42,15 +43,15 @@ interface CustomFieldServiceInterface
* Desencriptar y formatear los datos del campo
*
* @throws CryptoException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function decryptData(string $data, string $key): string;
/**
* Returns the module's item for given id
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForModuleAndItemId(int $moduleId, ?int $itemId): array;
@@ -76,7 +77,7 @@ interface CustomFieldServiceInterface
*
* @throws CryptoException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws NoSuchItemException
*/
@@ -116,10 +117,10 @@ interface CustomFieldServiceInterface
/**
* Updates an item
*
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function updateMasterPass(CustomFieldData $customFieldData, string $masterPass): int;
diff --git a/lib/SP/Domain/CustomField/Ports/CustomFieldTypeServiceInterface.php b/lib/SP/Domain/CustomField/Ports/CustomFieldTypeServiceInterface.php
index ccbf6f0b..4df6ad07 100644
--- a/lib/SP/Domain/CustomField/Ports/CustomFieldTypeServiceInterface.php
+++ b/lib/SP/Domain/CustomField/Ports/CustomFieldTypeServiceInterface.php
@@ -24,9 +24,10 @@
namespace SP\Domain\CustomField\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldTypeData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
* Class CustomFieldTypeService
@@ -54,9 +55,9 @@ interface CustomFieldTypeServiceInterface
public function getAll(): array;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id);
}
diff --git a/lib/SP/Domain/CustomField/Services/CustomFieldCryptService.php b/lib/SP/Domain/CustomField/Services/CustomFieldCryptService.php
index 1c5c1d86..fd819c5e 100644
--- a/lib/SP/Domain/CustomField/Services/CustomFieldCryptService.php
+++ b/lib/SP/Domain/CustomField/Services/CustomFieldCryptService.php
@@ -31,12 +31,12 @@ use SP\Core\Application;
use SP\Core\Crypt\Crypt;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
use SP\Domain\CustomField\Ports\CustomFieldCryptServiceInterface;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
diff --git a/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php b/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php
index b2abeb3a..dbb94956 100644
--- a/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php
+++ b/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php
@@ -25,15 +25,15 @@
namespace SP\Domain\CustomField\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldDefRepositoryInterface;
use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface;
use SP\Domain\CustomField\Ports\CustomFieldRepositoryInterface;
diff --git a/lib/SP/Domain/CustomField/Services/CustomFieldService.php b/lib/SP/Domain/CustomField/Services/CustomFieldService.php
index 5d2222ee..9ed32f86 100644
--- a/lib/SP/Domain/CustomField/Services/CustomFieldService.php
+++ b/lib/SP/Domain/CustomField/Services/CustomFieldService.php
@@ -27,12 +27,12 @@ namespace SP\Domain\CustomField\Services;
use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Application;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldDefRepositoryInterface;
use SP\Domain\CustomField\Ports\CustomFieldRepositoryInterface;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
@@ -101,9 +101,9 @@ final class CustomFieldService extends Service implements CustomFieldServiceInte
/**
* Returns the module's item for given id
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function getForModuleAndItemId(int $moduleId, ?int $itemId): array
{
@@ -180,8 +180,8 @@ final class CustomFieldService extends Service implements CustomFieldServiceInte
}
/**
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws ServiceException
*/
protected function setSecureData(CustomFieldData $customFieldData, ?string $key = null): void
{
@@ -239,12 +239,12 @@ final class CustomFieldService extends Service implements CustomFieldServiceInte
/**
* Updates an item
*
- * @param \SP\DataModel\CustomFieldData $customFieldData
+ * @param CustomFieldData $customFieldData
* @param string $masterPass
*
* @return int
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws ServiceException
*/
public function updateMasterPass(CustomFieldData $customFieldData, string $masterPass): int
{
diff --git a/lib/SP/Domain/CustomField/Services/CustomFieldTypeService.php b/lib/SP/Domain/CustomField/Services/CustomFieldTypeService.php
index 664eb03f..a2c22595 100644
--- a/lib/SP/Domain/CustomField/Services/CustomFieldTypeService.php
+++ b/lib/SP/Domain/CustomField/Services/CustomFieldTypeService.php
@@ -25,11 +25,11 @@
namespace SP\Domain\CustomField\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldTypeData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldTypeRepositoryInterface;
use SP\Domain\CustomField\Ports\CustomFieldTypeServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -78,9 +78,9 @@ final class CustomFieldTypeService extends Service implements CustomFieldTypeSer
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id)
{
diff --git a/lib/SP/Domain/Export/Ports/BackupFilesInterface.php b/lib/SP/Domain/Export/Ports/BackupFilesInterface.php
index c1ddb5ef..cb59c373 100644
--- a/lib/SP/Domain/Export/Ports/BackupFilesInterface.php
+++ b/lib/SP/Domain/Export/Ports/BackupFilesInterface.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Export\Ports;
-use SP\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Infrastructure\File\ArchiveHandlerInterface;
use SP\Infrastructure\File\FileHandlerInterface;
diff --git a/lib/SP/Domain/Export/Ports/XmlExportServiceInterface.php b/lib/SP/Domain/Export/Ports/XmlExportServiceInterface.php
index 8bfdbb15..fa789aa5 100644
--- a/lib/SP/Domain/Export/Ports/XmlExportServiceInterface.php
+++ b/lib/SP/Domain/Export/Ports/XmlExportServiceInterface.php
@@ -24,7 +24,8 @@
namespace SP\Domain\Export\Ports;
-use SP\Core\Exceptions\CheckException;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Infrastructure\File\FileException;
/**
@@ -40,8 +41,8 @@ interface XmlExportServiceInterface
* @param string $exportPath
* @param string|null $pass La clave de exportación
*
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Infrastructure\File\FileException
+ * @throws ServiceException
+ * @throws FileException
*/
public function doExport(string $exportPath, ?string $pass = null): void;
diff --git a/lib/SP/Domain/Export/Services/BackupFiles.php b/lib/SP/Domain/Export/Services/BackupFiles.php
index fb6df5b3..d1fe5dee 100644
--- a/lib/SP/Domain/Export/Services/BackupFiles.php
+++ b/lib/SP/Domain/Export/Services/BackupFiles.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Export\Services;
-use SP\Core\Exceptions\CheckException;
use SP\Core\PhpExtensionChecker;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Domain\Export\Ports\BackupFilesInterface;
use SP\Infrastructure\File\ArchiveHandler;
use SP\Infrastructure\File\ArchiveHandlerInterface;
diff --git a/lib/SP/Domain/Export/Services/FileBackupService.php b/lib/SP/Domain/Export/Services/FileBackupService.php
index 9cc8061a..d3e83d34 100644
--- a/lib/SP/Domain/Export/Services/FileBackupService.php
+++ b/lib/SP/Domain/Export/Services/FileBackupService.php
@@ -30,15 +30,15 @@ use PDO;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigInterface;
use SP\Domain\Core\AppInfoInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Ports\BackupFilesInterface;
use SP\Domain\Export\Ports\FileBackupServiceInterface;
use SP\Infrastructure\Common\Repositories\Query;
diff --git a/lib/SP/Domain/Export/Services/XmlExportService.php b/lib/SP/Domain/Export/Services/XmlExportService.php
index f0d9b826..990898a4 100644
--- a/lib/SP/Domain/Export/Services/XmlExportService.php
+++ b/lib/SP/Domain/Export/Services/XmlExportService.php
@@ -33,8 +33,6 @@ use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Hash;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\CheckException;
-use SP\Core\Exceptions\SPException;
use SP\Core\PhpExtensionChecker;
use SP\DataModel\CategoryData;
use SP\Domain\Account\Ports\AccountServiceInterface;
@@ -45,6 +43,8 @@ use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\CheckException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Ports\XmlExportServiceInterface;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Infrastructure\File\ArchiveHandler;
@@ -103,8 +103,8 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
* @param string $exportPath
* @param string|null $pass La clave de exportación
*
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Infrastructure\File\FileException
+ * @throws ServiceException
+ * @throws FileException
*/
public function doExport(string $exportPath, ?string $pass = null): void
{
@@ -122,7 +122,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function setExportPath(string $exportPath): void
{
@@ -178,7 +178,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
/**
* Crear el documento XML y guardarlo
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function makeXML(): void
{
@@ -207,7 +207,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
/**
* Crear el nodo raÃz
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function createRoot(): void
{
@@ -303,7 +303,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
*
* @param DOMElement $node El nodo a añadir
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function appendNode(DOMElement $node): void
{
@@ -413,7 +413,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
/**
* Crear el nodo con los datos de las etiquetas
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function createTags(): void
{
@@ -520,7 +520,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
/**
* Crear el hash del archivo XML e insertarlo en el árbol DOM
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function createHash(): void
{
@@ -561,7 +561,7 @@ final class XmlExportService extends Service implements XmlExportServiceInterfac
/**
* Generar el archivo XML
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
private function writeXML(): void
{
diff --git a/lib/SP/Domain/Import/Services/CsvImportBase.php b/lib/SP/Domain/Import/Services/CsvImportBase.php
index abf0ffee..79b74673 100644
--- a/lib/SP/Domain/Import/Services/CsvImportBase.php
+++ b/lib/SP/Domain/Import/Services/CsvImportBase.php
@@ -29,9 +29,10 @@ use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventDispatcher;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ClientData;
+use SP\Domain\Account\Dtos\AccountRequest;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileException;
defined('APP_ROOT') || die();
@@ -112,7 +113,7 @@ abstract class CsvImportBase
$categoryId = $this->addCategory(new CategoryData(null, $categoryName));
// Crear la nueva cuenta
- $accountRequest = new \SP\Domain\Account\Dtos\AccountRequest();
+ $accountRequest = new AccountRequest();
$accountRequest->name = $accountName;
$accountRequest->login = $login;
$accountRequest->clientId = $clientId;
diff --git a/lib/SP/Domain/Import/Services/FileImport.php b/lib/SP/Domain/Import/Services/FileImport.php
index e002c48c..30ca4070 100644
--- a/lib/SP/Domain/Import/Services/FileImport.php
+++ b/lib/SP/Domain/Import/Services/FileImport.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Import\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\RequestInterface;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\FileHandler;
@@ -67,8 +67,8 @@ final class FileImport implements FileImportInterface
* @param array|null $file con los datos del archivo
*
* @return FileHandlerInterface
- * @throws \SP\Domain\Import\Services\ImportException
- * @throws \SP\Infrastructure\File\FileException
+ * @throws ImportException
+ * @throws FileException
*/
private static function checkFile(?array $file): FileHandlerInterface
{
diff --git a/lib/SP/Domain/Import/Services/ImportException.php b/lib/SP/Domain/Import/Services/ImportException.php
index 88229969..01e2fb09 100644
--- a/lib/SP/Domain/Import/Services/ImportException.php
+++ b/lib/SP/Domain/Import/Services/ImportException.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Import\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class ImportException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class ImportException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/Import/Services/ImportService.php b/lib/SP/Domain/Import/Services/ImportService.php
index 4d680284..b7965a5d 100644
--- a/lib/SP/Domain/Import/Services/ImportService.php
+++ b/lib/SP/Domain/Import/Services/ImportService.php
@@ -27,9 +27,9 @@ namespace SP\Domain\Import\Services;
use Exception;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Import\Ports\ImportServiceInterface;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\File\FileException;
diff --git a/lib/SP/Domain/Import/Services/ImportTrait.php b/lib/SP/Domain/Import/Services/ImportTrait.php
index 6ecf52b4..f5c83e27 100644
--- a/lib/SP/Domain/Import/Services/ImportTrait.php
+++ b/lib/SP/Domain/Import/Services/ImportTrait.php
@@ -26,10 +26,6 @@ namespace SP\Domain\Import\Services;
use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ClientData;
use SP\DataModel\TagData;
@@ -37,6 +33,10 @@ use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Client\Ports\ClientServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
@@ -80,7 +80,7 @@ trait ImportTrait
* @throws NoSuchPropertyException
* @throws QueryException
*/
- protected function addAccount(\SP\Domain\Account\Dtos\AccountRequest $accountRequest): void
+ protected function addAccount(AccountRequest $accountRequest): void
{
if (empty($accountRequest->categoryId)) {
throw new ImportException(__u('Category Id not set. Unable to import account.'));
diff --git a/lib/SP/Domain/Import/Services/KeepassImport.php b/lib/SP/Domain/Import/Services/KeepassImport.php
index c6acd7e1..4a788311 100644
--- a/lib/SP/Domain/Import/Services/KeepassImport.php
+++ b/lib/SP/Domain/Import/Services/KeepassImport.php
@@ -29,10 +29,10 @@ use DOMXPath;
use Exception;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ClientData;
use SP\Domain\Account\Dtos\AccountRequest;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Util\Filter;
defined('APP_ROOT') || die();
@@ -79,7 +79,7 @@ final class KeepassImport extends XmlImportBase implements ImportInterface
$this->getEntries();
- /** @var \SP\Domain\Account\Dtos\AccountRequest[] $group */
+ /** @var AccountRequest[] $group */
foreach ($this->items as $group => $entry) {
try {
$categoryId = $this->addCategory(new CategoryData(null, $group, 'KeePass'));
@@ -172,9 +172,9 @@ final class KeepassImport extends XmlImportBase implements ImportInterface
}
}
- private function mapEntryToAccount(array $entry): \SP\Domain\Account\Dtos\AccountRequest
+ private function mapEntryToAccount(array $entry): AccountRequest
{
- $accountRequest = new \SP\Domain\Account\Dtos\AccountRequest();
+ $accountRequest = new AccountRequest();
$accountRequest->name = isset($entry['Title']) ? Filter::getString($entry['Title']) : '';
$accountRequest->login = isset($entry['UserName']) ? Filter::getString($entry['UserName']) : '';
$accountRequest->pass = $entry['Password'] ?? '';
diff --git a/lib/SP/Domain/Import/Services/SyspassImport.php b/lib/SP/Domain/Import/Services/SyspassImport.php
index 1bc9a486..8d545a0d 100644
--- a/lib/SP/Domain/Import/Services/SyspassImport.php
+++ b/lib/SP/Domain/Import/Services/SyspassImport.php
@@ -34,10 +34,11 @@ use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Hash;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ClientData;
use SP\DataModel\TagData;
+use SP\Domain\Account\Dtos\AccountRequest;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Services\XmlVerifyService;
use SP\Util\VersionUtil;
@@ -421,7 +422,7 @@ final class SyspassImport extends XmlImportBase implements ImportInterface
'Accounts',
'Account',
function (DOMElement $account) {
- $accountRequest = new \SP\Domain\Account\Dtos\AccountRequest();
+ $accountRequest = new AccountRequest();
/** @var DOMElement $node */
foreach ($account->childNodes as $node) {
diff --git a/lib/SP/Domain/Import/Services/XmlFileImport.php b/lib/SP/Domain/Import/Services/XmlFileImport.php
index 20d26e5c..a5561341 100644
--- a/lib/SP/Domain/Import/Services/XmlFileImport.php
+++ b/lib/SP/Domain/Import/Services/XmlFileImport.php
@@ -25,7 +25,7 @@
namespace SP\Domain\Import\Services;
use DOMDocument;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileException;
/**
@@ -41,7 +41,7 @@ final class XmlFileImport implements XmlFileImportInterface
/**
* XmlFileImport constructor.
*
- * @param \SP\Domain\Import\Services\FileImportInterface $fileImport
+ * @param FileImportInterface $fileImport
*
* @throws ImportException
* @throws FileException
diff --git a/lib/SP/Domain/Import/Services/XmlImport.php b/lib/SP/Domain/Import/Services/XmlImport.php
index 2e941719..ab9dbb85 100644
--- a/lib/SP/Domain/Import/Services/XmlImport.php
+++ b/lib/SP/Domain/Import/Services/XmlImport.php
@@ -25,8 +25,8 @@
namespace SP\Domain\Import\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\SPException;
defined('APP_ROOT') || die();
@@ -78,7 +78,7 @@ final class XmlImport implements XmlImportInterface
* @param string $format
*
* @return KeepassImport|SyspassImport
- * @throws \SP\Domain\Import\Services\ImportException
+ * @throws ImportException
*/
protected function selectImportType(string $format)
{
diff --git a/lib/SP/Domain/Import/Services/XmlImportBase.php b/lib/SP/Domain/Import/Services/XmlImportBase.php
index c3f7a816..47297910 100644
--- a/lib/SP/Domain/Import/Services/XmlImportBase.php
+++ b/lib/SP/Domain/Import/Services/XmlImportBase.php
@@ -28,9 +28,9 @@ use DOMDocument;
use DOMElement;
use SP\Core\Application;
use SP\Core\Events\EventDispatcher;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class XmlImportBase
diff --git a/lib/SP/Domain/Install/Ports/InstallerServiceInterface.php b/lib/SP/Domain/Install/Ports/InstallerServiceInterface.php
index 21da2b4c..40e9d600 100644
--- a/lib/SP/Domain/Install/Ports/InstallerServiceInterface.php
+++ b/lib/SP/Domain/Install/Ports/InstallerServiceInterface.php
@@ -24,8 +24,8 @@
namespace SP\Domain\Install\Ports;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
/**
diff --git a/lib/SP/Domain/Install/Services/InstallerService.php b/lib/SP/Domain/Install/Services/InstallerService.php
index 1e3839d0..2f0b7804 100644
--- a/lib/SP/Domain/Install/Services/InstallerService.php
+++ b/lib/SP/Domain/Install/Services/InstallerService.php
@@ -27,10 +27,6 @@ namespace SP\Domain\Install\Services;
use Exception;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ConfigData;
use SP\DataModel\ProfileData;
use SP\DataModel\UserData;
@@ -39,6 +35,10 @@ use SP\DataModel\UserProfileData;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigInterface;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
use SP\Domain\Install\Ports\InstallerServiceInterface;
use SP\Domain\User\Ports\UserGroupServiceInterface;
@@ -47,6 +47,7 @@ use SP\Domain\User\Ports\UserServiceInterface;
use SP\Http\RequestInterface;
use SP\Infrastructure\Database\DatabaseConnectionData;
use SP\Util\VersionUtil;
+
use function SP\__u;
use function SP\processException;
@@ -311,7 +312,7 @@ final class InstallerService implements InstallerServiceInterface
/**
* Saves the master password metadata
*
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
private function saveMasterPassword(): void
{
diff --git a/lib/SP/Domain/Install/Services/MysqlService.php b/lib/SP/Domain/Install/Services/MysqlService.php
index a2d4acf1..464d34d0 100644
--- a/lib/SP/Domain/Install/Services/MysqlService.php
+++ b/lib/SP/Domain/Install/Services/MysqlService.php
@@ -24,14 +24,16 @@
namespace SP\Domain\Install\Services;
+use Exception;
use PDOException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
use SP\Infrastructure\Database\DatabaseFileInterface;
use SP\Infrastructure\Database\DatabaseUtil;
use SP\Infrastructure\Database\DbStorageInterface;
use SP\Infrastructure\File\FileException;
use SP\Util\PasswordUtil;
+
use function SP\__;
use function SP\__u;
use function SP\logger;
@@ -92,7 +94,7 @@ final class MysqlService implements DatabaseSetupInterface
/**
* @throws SPException
- * @throws \Exception
+ * @throws Exception
*/
public function setupDbUser(): array
{
@@ -320,7 +322,7 @@ final class MysqlService implements DatabaseSetupInterface
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
private function checkDatabase(string $exceptionHint): void
{
diff --git a/lib/SP/Domain/Install/Services/MysqlSetupBuilderInterface.php b/lib/SP/Domain/Install/Services/MysqlSetupBuilderInterface.php
index 709d2e89..4ab906ba 100644
--- a/lib/SP/Domain/Install/Services/MysqlSetupBuilderInterface.php
+++ b/lib/SP/Domain/Install/Services/MysqlSetupBuilderInterface.php
@@ -24,6 +24,7 @@
namespace SP\Domain\Install\Services;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
/**
@@ -32,10 +33,10 @@ use SP\Domain\Install\Adapters\InstallData;
interface MysqlSetupBuilderInterface
{
/**
- * @param \SP\Domain\Install\Adapters\InstallData $installData
+ * @param InstallData $installData
*
- * @return \SP\Domain\Install\Services\DatabaseSetupInterface
- * @throws \SP\Core\Exceptions\SPException
+ * @return DatabaseSetupInterface
+ * @throws SPException
*/
public static function build(InstallData $installData): DatabaseSetupInterface;
}
diff --git a/lib/SP/Domain/ItemPreset/Ports/ItemPresetRepositoryInterface.php b/lib/SP/Domain/ItemPreset/Ports/ItemPresetRepositoryInterface.php
index 148f4323..fe5084c3 100644
--- a/lib/SP/Domain/ItemPreset/Ports/ItemPresetRepositoryInterface.php
+++ b/lib/SP/Domain/ItemPreset/Ports/ItemPresetRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\ItemPreset\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/ItemPreset/Ports/ItemPresetServiceInterface.php b/lib/SP/Domain/ItemPreset/Ports/ItemPresetServiceInterface.php
index 11dfd189..8d706b59 100644
--- a/lib/SP/Domain/ItemPreset/Ports/ItemPresetServiceInterface.php
+++ b/lib/SP/Domain/ItemPreset/Ports/ItemPresetServiceInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\ItemPreset\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Models\ItemPreset;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Services\ItemPresetRequest;
use SP\Domain\ItemPreset\Services\ItemPresetService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -55,9 +56,9 @@ interface ItemPresetServiceInterface
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): ItemPresetService;
@@ -102,9 +103,9 @@ interface ItemPresetServiceInterface
/**
* @param int[] $ids
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int;
}
diff --git a/lib/SP/Domain/ItemPreset/Services/ItemPresetService.php b/lib/SP/Domain/ItemPreset/Services/ItemPresetService.php
index 83fee36e..69f26054 100644
--- a/lib/SP/Domain/ItemPreset/Services/ItemPresetService.php
+++ b/lib/SP/Domain/ItemPreset/Services/ItemPresetService.php
@@ -25,13 +25,13 @@
namespace SP\Domain\ItemPreset\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Models\ItemPreset;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\ItemPreset\Ports\ItemPresetRepositoryInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -75,9 +75,9 @@ final class ItemPresetService extends Service implements ItemPresetServiceInterf
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): ItemPresetService
{
@@ -109,7 +109,7 @@ final class ItemPresetService extends Service implements ItemPresetServiceInterf
/**
* Returns all the items
*
- * @return \SP\Domain\Account\Models\ItemPreset[]
+ * @return ItemPreset[]
* @throws ConstraintException
* @throws QueryException
*/
@@ -172,9 +172,9 @@ final class ItemPresetService extends Service implements ItemPresetServiceInterf
/**
* @param int[] $ids
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int
{
diff --git a/lib/SP/Domain/Notification/Ports/NotificationRepositoryInterface.php b/lib/SP/Domain/Notification/Ports/NotificationRepositoryInterface.php
index 78edf806..1d4f3b72 100644
--- a/lib/SP/Domain/Notification/Ports/NotificationRepositoryInterface.php
+++ b/lib/SP/Domain/Notification/Ports/NotificationRepositoryInterface.php
@@ -24,9 +24,10 @@
namespace SP\Domain\Notification\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -34,7 +35,7 @@ use SP\Infrastructure\Database\QueryResult;
*
* @package SP\Infrastructure\Notification\Repositories
*/
-interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInterface
+interface NotificationRepositoryInterface extends RepositoryInterface
{
/**
* Deletes an item
@@ -42,8 +43,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteAdmin(int $id): int;
@@ -88,8 +89,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function setCheckedById(int $id): int;
@@ -100,8 +101,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $userId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForUserIdByDate(string $component, int $userId): QueryResult;
@@ -109,8 +110,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllForUserId(int $id): QueryResult;
@@ -118,8 +119,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForUserId(int $id): QueryResult;
@@ -127,8 +128,8 @@ interface NotificationRepositoryInterface extends \SP\Domain\Common\Ports\Reposi
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForAdmin(int $id): QueryResult;
}
diff --git a/lib/SP/Domain/Notification/Ports/NotificationServiceInterface.php b/lib/SP/Domain/Notification/Ports/NotificationServiceInterface.php
index 8a42ae43..9e9d9e24 100644
--- a/lib/SP/Domain/Notification/Ports/NotificationServiceInterface.php
+++ b/lib/SP/Domain/Notification/Ports/NotificationServiceInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\Notification\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\NotificationData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -68,18 +69,18 @@ interface NotificationServiceInterface
/**
* Deletes an item preserving the sticky ones
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): NotificationServiceInterface;
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function deleteAdmin(int $id): NotificationServiceInterface;
@@ -90,7 +91,7 @@ interface NotificationServiceInterface
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteAdminBatch(array $ids): int;
@@ -101,7 +102,7 @@ interface NotificationServiceInterface
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int;
@@ -126,9 +127,9 @@ interface NotificationServiceInterface
/**
* Marcar una notificación como leÃda
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function setCheckedById(int $id): void;
@@ -136,8 +137,8 @@ interface NotificationServiceInterface
* Devolver las notificaciones de un usuario para una fecha y componente determinados
*
* @return NotificationData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForUserIdByDate(string $component, int $id): array;
@@ -150,8 +151,8 @@ interface NotificationServiceInterface
/**
* @return NotificationData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForUserId(int $id): array;
diff --git a/lib/SP/Domain/Notification/Services/MailService.php b/lib/SP/Domain/Notification/Services/MailService.php
index 914f24a2..c192db91 100644
--- a/lib/SP/Domain/Notification/Services/MailService.php
+++ b/lib/SP/Domain/Notification/Services/MailService.php
@@ -29,16 +29,17 @@ use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\Core\Messages\MailMessage;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Notification\Ports\MailServiceInterface;
use SP\Domain\Providers\MailerInterface;
use SP\Domain\Providers\MailProviderInterface;
use SP\Html\Html;
use SP\Providers\Mail\MailParams;
+use SP\Providers\Mail\MailProviderException;
/**
* Class MailService
@@ -51,7 +52,7 @@ final class MailService extends Service implements MailServiceInterface
private MailProviderInterface $mailProvider;
/**
- * @throws \SP\Providers\Mail\MailProviderException
+ * @throws MailProviderException
*/
public function __construct(Application $application, MailProviderInterface $mailProvider)
{
@@ -145,7 +146,7 @@ final class MailService extends Service implements MailServiceInterface
* @param array|string $to
* @param MailMessage $mailMessage
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function send(string $subject, $to, MailMessage $mailMessage): void
{
@@ -201,7 +202,7 @@ final class MailService extends Service implements MailServiceInterface
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function sendBatch(string $subject, array $to, MailMessage $mailMessage): void
{
diff --git a/lib/SP/Domain/Notification/Services/NotificationService.php b/lib/SP/Domain/Notification/Services/NotificationService.php
index 8cf1d1e2..fcfa4620 100644
--- a/lib/SP/Domain/Notification/Services/NotificationService.php
+++ b/lib/SP/Domain/Notification/Services/NotificationService.php
@@ -25,13 +25,13 @@
namespace SP\Domain\Notification\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\NotificationData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Notification\Ports\NotificationRepositoryInterface;
use SP\Domain\Notification\Ports\NotificationServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -93,9 +93,9 @@ final class NotificationService extends Service implements NotificationServiceIn
/**
* Deletes an item preserving the sticky ones
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): NotificationServiceInterface
{
@@ -109,9 +109,9 @@ final class NotificationService extends Service implements NotificationServiceIn
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function deleteAdmin(int $id): NotificationServiceInterface
{
@@ -129,7 +129,7 @@ final class NotificationService extends Service implements NotificationServiceIn
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteAdminBatch(array $ids): int
{
@@ -152,7 +152,7 @@ final class NotificationService extends Service implements NotificationServiceIn
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function deleteByIdBatch(array $ids): int
{
@@ -201,9 +201,9 @@ final class NotificationService extends Service implements NotificationServiceIn
/**
* Marcar una notificación como leÃda
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function setCheckedById(int $id): void
{
@@ -216,8 +216,8 @@ final class NotificationService extends Service implements NotificationServiceIn
* Devolver las notificaciones de un usuario para una fecha y componente determinados
*
* @return NotificationData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForUserIdByDate(string $component, int $id): array
{
@@ -236,8 +236,8 @@ final class NotificationService extends Service implements NotificationServiceIn
/**
* @return NotificationData[]
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForUserId(int $id): array
{
diff --git a/lib/SP/Domain/Plugin/Ports/PluginDataRepositoryInterface.php b/lib/SP/Domain/Plugin/Ports/PluginDataRepositoryInterface.php
index 3fc8bc09..88907855 100644
--- a/lib/SP/Domain/Plugin/Ports/PluginDataRepositoryInterface.php
+++ b/lib/SP/Domain/Plugin/Ports/PluginDataRepositoryInterface.php
@@ -24,8 +24,8 @@
namespace SP\Domain\Plugin\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\Plugin\Repositories\PluginDataModel;
@@ -64,8 +64,8 @@ interface PluginDataRepositoryInterface
* @param string $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(string $id): int;
diff --git a/lib/SP/Domain/Plugin/Ports/PluginDataServiceInterface.php b/lib/SP/Domain/Plugin/Ports/PluginDataServiceInterface.php
index 1803f928..bbc285c0 100644
--- a/lib/SP/Domain/Plugin/Ports/PluginDataServiceInterface.php
+++ b/lib/SP/Domain/Plugin/Ports/PluginDataServiceInterface.php
@@ -25,9 +25,10 @@
namespace SP\Domain\Plugin\Ports;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\Plugin\Repositories\PluginDataModel;
@@ -46,7 +47,7 @@ interface PluginDataServiceInterface
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(PluginDataModel $itemData): QueryResult;
@@ -57,7 +58,7 @@ interface PluginDataServiceInterface
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(PluginDataModel $itemData): int;
@@ -69,7 +70,7 @@ interface PluginDataServiceInterface
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getByItemId(string $name, int $id): PluginDataModel;
@@ -77,12 +78,12 @@ interface PluginDataServiceInterface
* Returns the item for given id
*
* @return PluginDataModel[]
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function getById(string $id): array;
@@ -90,20 +91,20 @@ interface PluginDataServiceInterface
* Returns all the items
*
* @return PluginDataModel[]
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws CryptoException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function getAll(): array;
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(string $id): void;
diff --git a/lib/SP/Domain/Plugin/Ports/PluginRepositoryInterface.php b/lib/SP/Domain/Plugin/Ports/PluginRepositoryInterface.php
index ef990c1b..fdc01d7a 100644
--- a/lib/SP/Domain/Plugin/Ports/PluginRepositoryInterface.php
+++ b/lib/SP/Domain/Plugin/Ports/PluginRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Plugin\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -54,8 +54,8 @@ interface PluginRepositoryInterface extends RepositoryInterface
* @param bool $enabled
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleEnabled(int $id, bool $enabled): int;
@@ -66,8 +66,8 @@ interface PluginRepositoryInterface extends RepositoryInterface
* @param bool $enabled
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleEnabledByName(string $name, bool $enabled): int;
@@ -78,8 +78,8 @@ interface PluginRepositoryInterface extends RepositoryInterface
* @param bool $available
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleAvailable(int $id, bool $available): int;
@@ -90,8 +90,8 @@ interface PluginRepositoryInterface extends RepositoryInterface
* @param bool $available
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleAvailableByName(string $name, bool $available): int;
diff --git a/lib/SP/Domain/Plugin/Ports/PluginServiceInterface.php b/lib/SP/Domain/Plugin/Ports/PluginServiceInterface.php
index 02676b68..13315bbe 100644
--- a/lib/SP/Domain/Plugin/Ports/PluginServiceInterface.php
+++ b/lib/SP/Domain/Plugin/Ports/PluginServiceInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\Plugin\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\Plugin\Repositories\PluginModel;
@@ -126,36 +126,36 @@ interface PluginServiceInterface
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleEnabled(int $id, bool $enabled): void;
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleEnabledByName(string $name, bool $enabled): void;
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleAvailable(int $id, bool $available): void;
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleAvailableByName(string $name, bool $available): void;
diff --git a/lib/SP/Domain/Plugin/Services/PluginDataService.php b/lib/SP/Domain/Plugin/Services/PluginDataService.php
index 1e7ab90e..5637e81b 100644
--- a/lib/SP/Domain/Plugin/Services/PluginDataService.php
+++ b/lib/SP/Domain/Plugin/Services/PluginDataService.php
@@ -26,11 +26,12 @@ namespace SP\Domain\Plugin\Services;
use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginDataRepositoryInterface;
use SP\Domain\Plugin\Ports\PluginDataServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -62,7 +63,7 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(PluginDataModel $itemData): QueryResult
{
@@ -76,7 +77,7 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(PluginDataModel $itemData): int
{
@@ -91,7 +92,7 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function getByItemId(string $name, int $id): PluginDataModel
{
@@ -110,13 +111,13 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
/**
* Returns the item for given id
*
- * @return \SP\Infrastructure\Plugin\Repositories\PluginDataModel[]
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @return PluginDataModel[]
+ * @throws CryptoException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws ServiceException
*/
public function getById(string $id): array
{
@@ -142,12 +143,12 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
/**
* Returns all the items
*
- * @return \SP\Infrastructure\Plugin\Repositories\PluginDataModel[]
- * @throws \Defuse\Crypto\Exception\CryptoException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @return PluginDataModel[]
+ * @throws CryptoException
+ * @throws ConstraintException
+ * @throws NoSuchPropertyException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function getAll(): array
{
@@ -156,7 +157,7 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
array_walk(
$data,
function ($itemData) {
- /** @var \SP\Infrastructure\Plugin\Repositories\PluginDataModel $itemData */
+ /** @var PluginDataModel $itemData */
$itemData->decrypt($this->getMasterKeyFromContext());
}
);
@@ -167,9 +168,9 @@ final class PluginDataService extends Service implements PluginDataServiceInterf
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(string $id): void
{
diff --git a/lib/SP/Domain/Plugin/Services/PluginService.php b/lib/SP/Domain/Plugin/Services/PluginService.php
index 1adb37a0..5ae8495d 100644
--- a/lib/SP/Domain/Plugin/Services/PluginService.php
+++ b/lib/SP/Domain/Plugin/Services/PluginService.php
@@ -25,13 +25,13 @@
namespace SP\Domain\Plugin\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginRepositoryInterface;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -184,9 +184,9 @@ final class PluginService extends Service implements PluginServiceInterface
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleEnabled(int $id, bool $enabled): void
{
@@ -198,9 +198,9 @@ final class PluginService extends Service implements PluginServiceInterface
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleEnabledByName(string $name, bool $enabled): void
{
@@ -212,9 +212,9 @@ final class PluginService extends Service implements PluginServiceInterface
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleAvailable(int $id, bool $available): void
{
@@ -226,9 +226,9 @@ final class PluginService extends Service implements PluginServiceInterface
/**
* Cambiar el estado del plugin
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function toggleAvailableByName(string $name, bool $available): void
{
diff --git a/lib/SP/Domain/Security/Ports/EventlogRepositoryInterface.php b/lib/SP/Domain/Security/Ports/EventlogRepositoryInterface.php
index a57cd3b7..28411f3b 100644
--- a/lib/SP/Domain/Security/Ports/EventlogRepositoryInterface.php
+++ b/lib/SP/Domain/Security/Ports/EventlogRepositoryInterface.php
@@ -24,10 +24,10 @@
namespace SP\Domain\Security\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/Security/Ports/EventlogServiceInterface.php b/lib/SP/Domain/Security/Ports/EventlogServiceInterface.php
index 523c0018..51c20eaa 100644
--- a/lib/SP/Domain/Security/Ports/EventlogServiceInterface.php
+++ b/lib/SP/Domain/Security/Ports/EventlogServiceInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\Security\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/Security/Ports/TrackRepositoryInterface.php b/lib/SP/Domain/Security/Ports/TrackRepositoryInterface.php
index 98c45b7d..409d235a 100644
--- a/lib/SP/Domain/Security/Ports/TrackRepositoryInterface.php
+++ b/lib/SP/Domain/Security/Ports/TrackRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\Security\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\Security\Repositories\TrackRequest;
diff --git a/lib/SP/Domain/Security/Ports/TrackServiceInterface.php b/lib/SP/Domain/Security/Ports/TrackServiceInterface.php
index 3a26e90e..91dbd68f 100644
--- a/lib/SP/Domain/Security/Ports/TrackServiceInterface.php
+++ b/lib/SP/Domain/Security/Ports/TrackServiceInterface.php
@@ -25,11 +25,12 @@
namespace SP\Domain\Security\Ports;
use Exception;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TrackData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\Security\Repositories\TrackRequest;
@@ -97,7 +98,7 @@ interface TrackServiceInterface
public function getTracksForClientFromTime(TrackRequest $trackRequest): int;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/Security/Services/EventlogService.php b/lib/SP/Domain/Security/Services/EventlogService.php
index 0fd4af54..55c48002 100644
--- a/lib/SP/Domain/Security/Services/EventlogService.php
+++ b/lib/SP/Domain/Security/Services/EventlogService.php
@@ -25,12 +25,12 @@
namespace SP\Domain\Security\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Security\Ports\EventlogRepositoryInterface;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Http\RequestInterface;
diff --git a/lib/SP/Domain/Security/Services/TrackService.php b/lib/SP/Domain/Security/Services/TrackService.php
index ee74f6ba..cf94864d 100644
--- a/lib/SP/Domain/Security/Services/TrackService.php
+++ b/lib/SP/Domain/Security/Services/TrackService.php
@@ -28,13 +28,13 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TrackData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\TrackRepositoryInterface;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Http\RequestInterface;
@@ -195,7 +195,7 @@ final class TrackService extends Service implements TrackServiceInterface
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/Tag/Ports/TagRepositoryInterface.php b/lib/SP/Domain/Tag/Ports/TagRepositoryInterface.php
index 92511c2a..1ca4422c 100644
--- a/lib/SP/Domain/Tag/Ports/TagRepositoryInterface.php
+++ b/lib/SP/Domain/Tag/Ports/TagRepositoryInterface.php
@@ -24,8 +24,9 @@
namespace SP\Domain\Tag\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -33,7 +34,7 @@ use SP\Infrastructure\Database\QueryResult;
*
* @package SP\Infrastructure\Common\Repositories\Tag
*/
-interface TagRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInterface
+interface TagRepositoryInterface extends RepositoryInterface
{
/**
* Returns the item for given id
diff --git a/lib/SP/Domain/Tag/Ports/TagServiceInterface.php b/lib/SP/Domain/Tag/Ports/TagServiceInterface.php
index bffc078f..2b3d2ca5 100644
--- a/lib/SP/Domain/Tag/Ports/TagServiceInterface.php
+++ b/lib/SP/Domain/Tag/Ports/TagServiceInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\Tag\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TagData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -47,9 +47,9 @@ interface TagServiceInterface
public function search(ItemSearchData $itemSearchData): QueryResult;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): TagData;
@@ -61,9 +61,9 @@ interface TagServiceInterface
public function getByName(string $name): ?TagData;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): TagServiceInterface;
diff --git a/lib/SP/Domain/Tag/Services/TagService.php b/lib/SP/Domain/Tag/Services/TagService.php
index cad53460..87e84873 100644
--- a/lib/SP/Domain/Tag/Services/TagService.php
+++ b/lib/SP/Domain/Tag/Services/TagService.php
@@ -25,14 +25,14 @@
namespace SP\Domain\Tag\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TagData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Tag\Ports\TagRepositoryInterface;
use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
@@ -68,9 +68,9 @@ final class TagService extends Service implements TagServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): TagData
{
@@ -100,9 +100,9 @@ final class TagService extends Service implements TagServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): TagServiceInterface
{
diff --git a/lib/SP/Domain/Upgrade/Services/UpgradeAppService.php b/lib/SP/Domain/Upgrade/Services/UpgradeAppService.php
index 708ba6ee..c3da0089 100644
--- a/lib/SP/Domain/Upgrade/Services/UpgradeAppService.php
+++ b/lib/SP/Domain/Upgrade/Services/UpgradeAppService.php
@@ -28,13 +28,13 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Ports\UpgradePublicLinkServiceInterface;
use SP\Domain\Account\Services\UpgradePublicLinkService;
use SP\Domain\Auth\Ports\UpgradeAuthTokenServiceInterface;
use SP\Domain\Auth\Services\UpgradeAuthTokenService;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\UpgradeCustomFieldDataServiceInterface;
use SP\Domain\CustomField\Ports\UpgradeCustomFieldDefinitionServiceInterface;
use SP\Domain\CustomField\Services\UpgradeCustomFieldDataService;
diff --git a/lib/SP/Domain/Upgrade/Services/UpgradeDatabaseService.php b/lib/SP/Domain/Upgrade/Services/UpgradeDatabaseService.php
index 83912ad3..7301a2dc 100644
--- a/lib/SP/Domain/Upgrade/Services/UpgradeDatabaseService.php
+++ b/lib/SP/Domain/Upgrade/Services/UpgradeDatabaseService.php
@@ -28,9 +28,9 @@ use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Persistence\Ports\UpgradeDatabaseServiceInterface;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\MysqlFileParser;
@@ -141,7 +141,7 @@ final class UpgradeDatabaseService extends Service implements UpgradeDatabaseSer
/**
* Actualiza la BBDD según la versión.
*
- * @throws \SP\Domain\Upgrade\Services\UpgradeException
+ * @throws UpgradeException
*/
private function applyUpgrade(string $version): bool
{
diff --git a/lib/SP/Domain/Upgrade/Services/UpgradeException.php b/lib/SP/Domain/Upgrade/Services/UpgradeException.php
index 97b1e313..441356c9 100644
--- a/lib/SP/Domain/Upgrade/Services/UpgradeException.php
+++ b/lib/SP/Domain/Upgrade/Services/UpgradeException.php
@@ -24,7 +24,7 @@
namespace SP\Domain\Upgrade\Services;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class UpgradeException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class UpgradeException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/User/Ports/UserGroupRepositoryInterface.php b/lib/SP/Domain/User/Ports/UserGroupRepositoryInterface.php
index e5d494ec..175f48e7 100644
--- a/lib/SP/Domain/User/Ports/UserGroupRepositoryInterface.php
+++ b/lib/SP/Domain/User/Ports/UserGroupRepositoryInterface.php
@@ -24,8 +24,9 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -33,7 +34,7 @@ use SP\Infrastructure\Database\QueryResult;
*
* @package SP\Infrastructure\User\Repositories
*/
-interface UserGroupRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInterface
+interface UserGroupRepositoryInterface extends RepositoryInterface
{
/**
* Returns the items that are using the given group id
diff --git a/lib/SP/Domain/User/Ports/UserGroupServiceInterface.php b/lib/SP/Domain/User/Ports/UserGroupServiceInterface.php
index a756ba86..305bf86a 100644
--- a/lib/SP/Domain/User/Ports/UserGroupServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserGroupServiceInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserGroupData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
@@ -52,28 +53,28 @@ interface UserGroupServiceInterface
public function getById(int $id): UserGroupData;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): UserGroupServiceInterface;
/**
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
public function deleteByIdBatch(array $ids): int;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(UserGroupData $itemData): int;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(UserGroupData $itemData): void;
diff --git a/lib/SP/Domain/User/Ports/UserPassRecoverRepositoryInterface.php b/lib/SP/Domain/User/Ports/UserPassRecoverRepositoryInterface.php
index 510bc027..f986889a 100644
--- a/lib/SP/Domain/User/Ports/UserPassRecoverRepositoryInterface.php
+++ b/lib/SP/Domain/User/Ports/UserPassRecoverRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -78,8 +78,8 @@ interface UserPassRecoverRepositoryInterface
* @param int $time
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserIdForHash(string $hash, int $time): QueryResult;
}
diff --git a/lib/SP/Domain/User/Ports/UserPassRecoverServiceInterface.php b/lib/SP/Domain/User/Ports/UserPassRecoverServiceInterface.php
index 3279ed7d..4a5dfb48 100644
--- a/lib/SP/Domain/User/Ports/UserPassRecoverServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserPassRecoverServiceInterface.php
@@ -25,9 +25,10 @@
namespace SP\Domain\User\Ports;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class UserPassRecoverService
@@ -37,8 +38,8 @@ use SP\Domain\Common\Services\ServiceException;
interface UserPassRecoverServiceInterface
{
/**
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws SPException
+ * @throws ServiceException
*/
public function toggleUsedByHash(string $hash): void;
@@ -59,15 +60,15 @@ interface UserPassRecoverServiceInterface
public function checkAttemptsByUserId(int $userId): bool;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $userId, string $hash): bool;
/**
* Comprobar el hash de recuperación de clave.
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/User/Ports/UserPassServiceInterface.php b/lib/SP/Domain/User/Ports/UserPassServiceInterface.php
index d6af542b..e84856f4 100644
--- a/lib/SP/Domain/User/Ports/UserPassServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserPassServiceInterface.php
@@ -25,10 +25,10 @@
namespace SP\Domain\User\Ports;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UserPassResponse;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/lib/SP/Domain/User/Ports/UserProfileRepositoryInterface.php b/lib/SP/Domain/User/Ports/UserProfileRepositoryInterface.php
index 768f980f..01a76a2e 100644
--- a/lib/SP/Domain/User/Ports/UserProfileRepositoryInterface.php
+++ b/lib/SP/Domain/User/Ports/UserProfileRepositoryInterface.php
@@ -24,9 +24,9 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
diff --git a/lib/SP/Domain/User/Ports/UserProfileServiceInterface.php b/lib/SP/Domain/User/Ports/UserProfileServiceInterface.php
index 13fff221..7b37f1d2 100644
--- a/lib/SP/Domain/User/Ports/UserProfileServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserProfileServiceInterface.php
@@ -24,11 +24,11 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserProfileData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
diff --git a/lib/SP/Domain/User/Ports/UserRepositoryInterface.php b/lib/SP/Domain/User/Ports/UserRepositoryInterface.php
index e816d9ba..c4d0b843 100644
--- a/lib/SP/Domain/User/Ports/UserRepositoryInterface.php
+++ b/lib/SP/Domain/User/Ports/UserRepositoryInterface.php
@@ -24,10 +24,11 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
+use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Services\UpdatePassRequest;
use SP\Infrastructure\Database\QueryResult;
@@ -36,7 +37,7 @@ use SP\Infrastructure\Database\QueryResult;
*
* @package SP\Infrastructure\User\Repositories
*/
-interface UserRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInterface
+interface UserRepositoryInterface extends RepositoryInterface
{
/**
* Updates an user's pass
@@ -76,8 +77,8 @@ interface UserRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInte
* @param string $key
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updateMasterPassById(int $id, string $pass, string $key): int;
@@ -96,8 +97,8 @@ interface UserRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInte
* @param string $login
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkExistsByLogin(string $login): bool;
@@ -128,8 +129,8 @@ interface UserRepositoryInterface extends \SP\Domain\Common\Ports\RepositoryInte
* @param int $groupId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserEmailForGroup(int $groupId): QueryResult;
diff --git a/lib/SP/Domain/User/Ports/UserServiceInterface.php b/lib/SP/Domain/User/Ports/UserServiceInterface.php
index 63ec60d3..79c09183 100644
--- a/lib/SP/Domain/User/Ports/UserServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserServiceInterface.php
@@ -25,12 +25,13 @@
namespace SP\Domain\User\Ports;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UserLoginRequest;
use SP\Domain\User\Services\UserService;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
@@ -54,8 +55,8 @@ interface UserServiceInterface
public function updateLastLoginById(int $id): int;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkExistsByLogin(string $login): bool;
@@ -69,25 +70,25 @@ interface UserServiceInterface
/**
* Returns the item for given id
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getByLogin(string $login): UserData;
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): UserService;
/**
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
@@ -129,7 +130,7 @@ interface UserServiceInterface
* @throws ConstraintException
* @throws QueryException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(UserData $userData): void;
@@ -138,13 +139,13 @@ interface UserServiceInterface
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updatePass(int $userId, string $pass): void;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updatePreferencesById(int $userId, UserPreferencesData $userPreferencesData): int;
@@ -166,8 +167,8 @@ interface UserServiceInterface
/**
* Obtener el email de los usuarios de un grupo
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserEmailForGroup(int $groupId): array;
diff --git a/lib/SP/Domain/User/Ports/UserToUserGroupRepositoryInterface.php b/lib/SP/Domain/User/Ports/UserToUserGroupRepositoryInterface.php
index 4d97ec0b..f47ce380 100644
--- a/lib/SP/Domain/User/Ports/UserToUserGroupRepositoryInterface.php
+++ b/lib/SP/Domain/User/Ports/UserToUserGroupRepositoryInterface.php
@@ -24,8 +24,8 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Database\QueryResult;
/**
@@ -53,8 +53,8 @@ interface UserToUserGroupRepositoryInterface
* @param int $userId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getGroupsForUser(int $userId): QueryResult;
diff --git a/lib/SP/Domain/User/Ports/UserToUserGroupServiceInterface.php b/lib/SP/Domain/User/Ports/UserToUserGroupServiceInterface.php
index d3869a49..876ad5e4 100644
--- a/lib/SP/Domain/User/Ports/UserToUserGroupServiceInterface.php
+++ b/lib/SP/Domain/User/Ports/UserToUserGroupServiceInterface.php
@@ -24,8 +24,9 @@
namespace SP\Domain\User\Ports;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
/**
* Class UserToUserGroupService
@@ -35,8 +36,8 @@ use SP\Core\Exceptions\QueryException;
interface UserToUserGroupServiceInterface
{
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $id, array $users): int;
@@ -53,25 +54,25 @@ interface UserToUserGroupServiceInterface
public function getUsersByGroupId(int $id): array;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): array;
/**
* Checks whether the user is included in the group
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkUserInGroup(int $groupId, int $userId): bool;
/**
* Returns the groups which the user belongs to
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getGroupsForUser(int $userId): array;
}
diff --git a/lib/SP/Domain/User/Services/UpdatedMasterPassException.php b/lib/SP/Domain/User/Services/UpdatedMasterPassException.php
index 6991a3b4..9c79fc25 100644
--- a/lib/SP/Domain/User/Services/UpdatedMasterPassException.php
+++ b/lib/SP/Domain/User/Services/UpdatedMasterPassException.php
@@ -25,7 +25,7 @@
namespace SP\Domain\User\Services;
use Exception;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class UpdatedMasterPassException
@@ -39,7 +39,7 @@ final class UpdatedMasterPassException extends SPException
*
* @param string $type
* @param int $code
- * @param \Exception|null $previous
+ * @param Exception|null $previous
*/
public function __construct(string $type, int $code = 0, Exception $previous = null)
{
@@ -52,4 +52,4 @@ final class UpdatedMasterPassException extends SPException
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Domain/User/Services/UserGroupService.php b/lib/SP/Domain/User/Services/UserGroupService.php
index 2c596f94..d8a8c758 100644
--- a/lib/SP/Domain/User/Services/UserGroupService.php
+++ b/lib/SP/Domain/User/Services/UserGroupService.php
@@ -26,14 +26,14 @@ namespace SP\Domain\User\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserGroupData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupRepositoryInterface;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserToUserGroupServiceInterface;
@@ -97,9 +97,9 @@ final class UserGroupService extends Service implements UserGroupServiceInterfac
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): UserGroupServiceInterface
{
@@ -115,7 +115,7 @@ final class UserGroupService extends Service implements UserGroupServiceInterfac
/**
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
@@ -134,7 +134,7 @@ final class UserGroupService extends Service implements UserGroupServiceInterfac
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function create(UserGroupData $itemData): int
{
@@ -155,7 +155,7 @@ final class UserGroupService extends Service implements UserGroupServiceInterfac
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(UserGroupData $itemData): void
{
diff --git a/lib/SP/Domain/User/Services/UserPassRecoverService.php b/lib/SP/Domain/User/Services/UserPassRecoverService.php
index 0edde3fb..14b0282c 100644
--- a/lib/SP/Domain/User/Services/UserPassRecoverService.php
+++ b/lib/SP/Domain/User/Services/UserPassRecoverService.php
@@ -27,12 +27,12 @@ namespace SP\Domain\User\Services;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Core\Messages\MailMessage;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserPassRecoverRepositoryInterface;
use SP\Domain\User\Ports\UserPassRecoverServiceInterface;
use SP\Html\Html;
@@ -82,8 +82,8 @@ final class UserPassRecoverService extends Service implements UserPassRecoverSer
}
/**
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws SPException
+ * @throws ServiceException
*/
public function toggleUsedByHash(string $hash): void
{
@@ -99,7 +99,7 @@ final class UserPassRecoverService extends Service implements UserPassRecoverSer
/**
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws EnvironmentIsBrokenException
*/
public function requestForUserId(int $id): string
@@ -130,8 +130,8 @@ final class UserPassRecoverService extends Service implements UserPassRecoverSer
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $userId, string $hash): bool
{
@@ -141,7 +141,7 @@ final class UserPassRecoverService extends Service implements UserPassRecoverSer
/**
* Comprobar el hash de recuperación de clave.
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
diff --git a/lib/SP/Domain/User/Services/UserPassService.php b/lib/SP/Domain/User/Services/UserPassService.php
index 4e51c0dc..52d3c093 100644
--- a/lib/SP/Domain/User/Services/UserPassService.php
+++ b/lib/SP/Domain/User/Services/UserPassService.php
@@ -28,14 +28,14 @@ use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Application;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Config\Services\ConfigFileService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserPassServiceInterface;
use SP\Domain\User\Ports\UserRepositoryInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/lib/SP/Domain/User/Services/UserProfileService.php b/lib/SP/Domain/User/Services/UserProfileService.php
index 5b3c4050..ef64ee0d 100644
--- a/lib/SP/Domain/User/Services/UserProfileService.php
+++ b/lib/SP/Domain/User/Services/UserProfileService.php
@@ -25,15 +25,15 @@
namespace SP\Domain\User\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\ProfileData;
use SP\DataModel\UserProfileData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserProfileRepositoryInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
diff --git a/lib/SP/Domain/User/Services/UserService.php b/lib/SP/Domain/User/Services/UserService.php
index 753823d4..e2a21a95 100644
--- a/lib/SP/Domain/User/Services/UserService.php
+++ b/lib/SP/Domain/User/Services/UserService.php
@@ -27,15 +27,15 @@ namespace SP\Domain\User\Services;
use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Application;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
use SP\Domain\Common\Services\Service;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Common\Services\ServiceItemTrait;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserPassServiceInterface;
use SP\Domain\User\Ports\UserRepositoryInterface;
use SP\Domain\User\Ports\UserServiceInterface;
@@ -126,8 +126,8 @@ final class UserService extends Service implements UserServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkExistsByLogin(string $login): bool
{
@@ -153,9 +153,9 @@ final class UserService extends Service implements UserServiceInterface
/**
* Returns the item for given id
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getByLogin(string $login): UserData
{
@@ -171,9 +171,9 @@ final class UserService extends Service implements UserServiceInterface
/**
* Deletes an item
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function delete(int $id): UserService
{
@@ -187,7 +187,7 @@ final class UserService extends Service implements UserServiceInterface
/**
* @param int[] $ids
*
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws ConstraintException
* @throws QueryException
*/
@@ -283,7 +283,7 @@ final class UserService extends Service implements UserServiceInterface
* @throws ConstraintException
* @throws QueryException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function update(UserData $userData): void
{
@@ -299,7 +299,7 @@ final class UserService extends Service implements UserServiceInterface
*
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function updatePass(int $userId, string $pass): void
{
@@ -318,8 +318,8 @@ final class UserService extends Service implements UserServiceInterface
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updatePreferencesById(int $userId, UserPreferencesData $userPreferencesData): int
{
@@ -360,8 +360,8 @@ final class UserService extends Service implements UserServiceInterface
/**
* Obtener el email de los usuarios de un grupo
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserEmailForGroup(int $groupId): array
{
diff --git a/lib/SP/Domain/User/Services/UserToUserGroupService.php b/lib/SP/Domain/User/Services/UserToUserGroupService.php
index 9131a1c0..850e5dc1 100644
--- a/lib/SP/Domain/User/Services/UserToUserGroupService.php
+++ b/lib/SP/Domain/User/Services/UserToUserGroupService.php
@@ -25,11 +25,11 @@
namespace SP\Domain\User\Services;
use SP\Core\Application;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserToUserGroupData;
use SP\Domain\Common\Services\Service;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserToUserGroupRepositoryInterface;
use SP\Domain\User\Ports\UserToUserGroupServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -52,8 +52,8 @@ final class UserToUserGroupService extends Service implements UserToUserGroupSer
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $id, array $users): int
{
@@ -92,9 +92,9 @@ final class UserToUserGroupService extends Service implements UserToUserGroupSer
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
*/
public function getById(int $id): array
{
@@ -110,8 +110,8 @@ final class UserToUserGroupService extends Service implements UserToUserGroupSer
/**
* Checks whether the user is included in the group
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkUserInGroup(int $groupId, int $userId): bool
{
@@ -121,8 +121,8 @@ final class UserToUserGroupService extends Service implements UserToUserGroupSer
/**
* Returns the groups which the user belongs to
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getGroupsForUser(int $userId): array
{
diff --git a/lib/SP/Html/DataGrid/DataGridBase.php b/lib/SP/Html/DataGrid/DataGridBase.php
index f614634e..cc0ee35b 100644
--- a/lib/SP/Html/DataGrid/DataGridBase.php
+++ b/lib/SP/Html/DataGrid/DataGridBase.php
@@ -24,7 +24,7 @@
namespace SP\Html\DataGrid;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Html\DataGrid\Action\DataGridActionInterface;
use SP\Html\DataGrid\Layout\DataGridHeaderInterface;
diff --git a/lib/SP/Html/DataGrid/DataGridDataBase.php b/lib/SP/Html/DataGrid/DataGridDataBase.php
index 2d5ddc1f..2f6a756c 100644
--- a/lib/SP/Html/DataGrid/DataGridDataBase.php
+++ b/lib/SP/Html/DataGrid/DataGridDataBase.php
@@ -24,7 +24,7 @@
namespace SP\Html\DataGrid;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Html\Assets\IconInterface;
use SP\Infrastructure\Database\QueryResult;
diff --git a/lib/SP/Http/Address.php b/lib/SP/Http/Address.php
index 5fc42b8d..8cab110b 100644
--- a/lib/SP/Http/Address.php
+++ b/lib/SP/Http/Address.php
@@ -24,8 +24,9 @@
namespace SP\Http;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\SPException;
+
use function SP\__;
use function SP\__u;
use function SP\logger;
@@ -40,7 +41,7 @@ final class Address
public const PATTERN_IP_ADDRESS = '#^(?
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3})(?:/(?:(?[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3})|(?[\d]{1,2})))?$#';
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
+ * @throws InvalidArgumentException
*/
public static function toBinary(string $address): string
{
diff --git a/lib/SP/Http/Json.php b/lib/SP/Http/Json.php
index d967432c..aad33f3b 100644
--- a/lib/SP/Http/Json.php
+++ b/lib/SP/Http/Json.php
@@ -26,7 +26,7 @@ namespace SP\Http;
use JsonException;
use Klein\Response;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
@@ -118,10 +118,10 @@ final class Json
/**
* Devuelve una respuesta en formato JSON con el estado y el mensaje.
*
- * @param \SP\Http\JsonResponse $jsonResponse
+ * @param JsonResponse $jsonResponse
*
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function returnJson(JsonResponse $jsonResponse): bool
{
@@ -155,4 +155,4 @@ final class Json
throw new SPException(__u('Encoding error'), SPException::ERROR, $e->getMessage());
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Http/Request.php b/lib/SP/Http/Request.php
index a41fc538..5808a8ce 100644
--- a/lib/SP/Http/Request.php
+++ b/lib/SP/Http/Request.php
@@ -28,8 +28,8 @@ use Exception;
use Klein\DataCollection\DataCollection;
use Klein\DataCollection\HeaderDataCollection;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\Crypt\CryptPKIInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Util\Filter;
use SP\Util\Util;
diff --git a/lib/SP/Http/RequestInterface.php b/lib/SP/Http/RequestInterface.php
index a68bfb91..b6b6ae4e 100644
--- a/lib/SP/Http/RequestInterface.php
+++ b/lib/SP/Http/RequestInterface.php
@@ -25,7 +25,7 @@
namespace SP\Http;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Clase Request para la gestión de peticiones HTTP
@@ -120,4 +120,4 @@ interface RequestInterface
public function getRequest(): \Klein\Request;
public function getServer(string $key): string;
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountFileRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountFileRepository.php
index e98aa50a..368113b3 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountFileRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountFileRepository.php
@@ -24,15 +24,16 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\FileData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Ports\AccountFileRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -141,8 +142,8 @@ final class AccountFileRepository extends Repository implements AccountFileRepos
* @param int $id
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): bool
{
@@ -187,7 +188,7 @@ final class AccountFileRepository extends Repository implements AccountFileRepos
*
* @param ItemSearchData $itemSearchData
*
- * @return \SP\Infrastructure\Database\QueryResult
+ * @return QueryResult
*/
public function search(ItemSearchData $itemSearchData): QueryResult
{
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountHistoryRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountHistoryRepository.php
index 64db028a..34b45b78 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountHistoryRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountHistoryRepository.php
@@ -24,16 +24,17 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Account\Ports\AccountHistoryRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -76,11 +77,11 @@ final class AccountHistoryRepository extends Repository implements AccountHistor
/**
* Crea una nueva cuenta en la BBDD
*
- * @param \SP\Domain\Account\Dtos\AccountHistoryCreateDto $dto
+ * @param AccountHistoryCreateDto $dto
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function create(AccountHistoryCreateDto $dto): int
{
@@ -129,8 +130,8 @@ final class AccountHistoryRepository extends Repository implements AccountHistor
* @param int $id
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): bool
{
@@ -383,11 +384,11 @@ final class AccountHistoryRepository extends Repository implements AccountHistor
* Actualiza la clave de una cuenta en la BBDD.
*
* @param int $accountId
- * @param \SP\Domain\Account\Dtos\EncryptedPassword $encryptedPassword
+ * @param EncryptedPassword $encryptedPassword
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updatePassword(int $accountId, EncryptedPassword $encryptedPassword): bool
{
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php
index be510b4f..45e14cc7 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php
@@ -25,8 +25,6 @@
namespace SP\Infrastructure\Account\Repositories;
use Aura\SqlQuery\QueryFactory;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Account\Models\Account;
@@ -36,6 +34,8 @@ use SP\Domain\Account\Ports\AccountFilterUserInterface;
use SP\Domain\Account\Ports\AccountRepositoryInterface;
use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\DatabaseInterface;
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepository.php
index d8b06a22..e54213e5 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepository.php
@@ -24,12 +24,13 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountToFavoriteRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountToTagRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountToTagRepository.php
index 629bd66c..975cc22c 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountToTagRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountToTagRepository.php
@@ -24,13 +24,14 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Domain\Account\Dtos\AccountDto;
-use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -72,8 +73,8 @@ final class AccountToTagRepository extends Repository implements AccountToTagRep
* @param int $id
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteByAccountId(int $id): bool
{
@@ -97,8 +98,8 @@ final class AccountToTagRepository extends Repository implements AccountToTagRep
* @param array $tags
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function add(int $accountId, array $tags): void
{
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepository.php
index 42964975..5af788c1 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepository.php
@@ -24,15 +24,16 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Query;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -98,8 +99,8 @@ final class AccountToUserGroupRepository extends Repository implements AccountTo
* @param $id int
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteByUserGroupId(int $id): bool
{
@@ -147,8 +148,8 @@ final class AccountToUserGroupRepository extends Repository implements AccountTo
* @param bool $isEdit
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addByType(int $accountId, array $items, bool $isEdit = false): void
{
diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountToUserRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountToUserRepository.php
index b6664108..2fdd5ee3 100644
--- a/lib/SP/Infrastructure/Account/Repositories/AccountToUserRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/AccountToUserRepository.php
@@ -24,15 +24,16 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Query;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -51,8 +52,8 @@ final class AccountToUserRepository extends Repository implements AccountToUserR
* @param bool $isEdit
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteTypeByAccountId(int $id, bool $isEdit): void
{
@@ -79,8 +80,8 @@ final class AccountToUserRepository extends Repository implements AccountToUserR
* @param bool $isEdit
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addByType(int $accountId, array $items, bool $isEdit = false): void
{
diff --git a/lib/SP/Infrastructure/Account/Repositories/PublicLinkRepository.php b/lib/SP/Infrastructure/Account/Repositories/PublicLinkRepository.php
index 9ebf790a..4311caf1 100644
--- a/lib/SP/Infrastructure/Account/Repositories/PublicLinkRepository.php
+++ b/lib/SP/Infrastructure/Account/Repositories/PublicLinkRepository.php
@@ -24,17 +24,18 @@
namespace SP\Infrastructure\Account\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\Domain\Account\Ports\PublicLinkRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
+
use function SP\__u;
/**
@@ -52,8 +53,8 @@ final class PublicLinkRepository extends Repository implements PublicLinkReposit
* @param int $id
*
* @return void
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): void
{
@@ -223,8 +224,8 @@ final class PublicLinkRepository extends Repository implements PublicLinkReposit
* @param int $id
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
private function checkDuplicatedOnAdd(int $id): bool
{
@@ -244,8 +245,8 @@ final class PublicLinkRepository extends Repository implements PublicLinkReposit
* @param PublicLinkData $publicLinkData
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function addLinkView(PublicLinkData $publicLinkData): bool
{
@@ -266,11 +267,11 @@ final class PublicLinkRepository extends Repository implements PublicLinkReposit
/**
* Updates an item
*
- * @param \SP\DataModel\PublicLinkData $publicLinkData
+ * @param PublicLinkData $publicLinkData
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function update(PublicLinkData $publicLinkData): bool
{
diff --git a/lib/SP/Infrastructure/Auth/Repositories/AuthTokenRepository.php b/lib/SP/Infrastructure/Auth/Repositories/AuthTokenRepository.php
index 603116df..239960c3 100644
--- a/lib/SP/Infrastructure/Auth/Repositories/AuthTokenRepository.php
+++ b/lib/SP/Infrastructure/Auth/Repositories/AuthTokenRepository.php
@@ -25,11 +25,11 @@
namespace SP\Infrastructure\Auth\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\AuthTokenData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -51,8 +51,8 @@ final class AuthTokenRepository extends Repository implements RepositoryInterfac
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -286,8 +286,8 @@ final class AuthTokenRepository extends Repository implements RepositoryInterfac
* @param int $id
*
* @return string
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getTokenByUserId(int $id): ?string
{
@@ -379,8 +379,8 @@ final class AuthTokenRepository extends Repository implements RepositoryInterfac
* @param string $token
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function refreshTokenByUserId(int $id, string $token): int
{
@@ -406,8 +406,8 @@ final class AuthTokenRepository extends Repository implements RepositoryInterfac
* @param string $hash
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function refreshVaultByUserId(int $id, string $vault, string $hash): int
{
diff --git a/lib/SP/Infrastructure/Category/Repositories/CategoryRepository.php b/lib/SP/Infrastructure/Category/Repositories/CategoryRepository.php
index 7d1c6ec9..628c8f0f 100644
--- a/lib/SP/Infrastructure/Category/Repositories/CategoryRepository.php
+++ b/lib/SP/Infrastructure/Category/Repositories/CategoryRepository.php
@@ -25,12 +25,12 @@
namespace SP\Infrastructure\Category\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Category\Ports\CategoryRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
diff --git a/lib/SP/Infrastructure/Client/Repositories/ClientRepository.php b/lib/SP/Infrastructure/Client/Repositories/ClientRepository.php
index ccb9806d..c9e62fb0 100644
--- a/lib/SP/Infrastructure/Client/Repositories/ClientRepository.php
+++ b/lib/SP/Infrastructure/Client/Repositories/ClientRepository.php
@@ -25,13 +25,13 @@
namespace SP\Infrastructure\Client\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Client\Ports\ClientRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -275,8 +275,8 @@ final class ClientRepository extends Repository implements ClientRepositoryInter
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
diff --git a/lib/SP/Infrastructure/Common/Repositories/DuplicatedItemException.php b/lib/SP/Infrastructure/Common/Repositories/DuplicatedItemException.php
index 9fc47f9e..751f0d26 100644
--- a/lib/SP/Infrastructure/Common/Repositories/DuplicatedItemException.php
+++ b/lib/SP/Infrastructure/Common/Repositories/DuplicatedItemException.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\Common\Repositories;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class DuplicatedItemException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class DuplicatedItemException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Common/Repositories/NoSuchItemException.php b/lib/SP/Infrastructure/Common/Repositories/NoSuchItemException.php
index 010a3de6..1faed5de 100644
--- a/lib/SP/Infrastructure/Common/Repositories/NoSuchItemException.php
+++ b/lib/SP/Infrastructure/Common/Repositories/NoSuchItemException.php
@@ -25,7 +25,7 @@
namespace SP\Infrastructure\Common\Repositories;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class NoSuchItemException
@@ -35,4 +35,4 @@ use SP\Core\Exceptions\SPException;
final class NoSuchItemException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Common/Repositories/Repository.php b/lib/SP/Infrastructure/Common/Repositories/Repository.php
index bcd9b218..d1db3bb5 100644
--- a/lib/SP/Infrastructure/Common/Repositories/Repository.php
+++ b/lib/SP/Infrastructure/Common/Repositories/Repository.php
@@ -29,11 +29,11 @@ use Closure;
use Exception;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Ports\RepositoryInterface;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
diff --git a/lib/SP/Infrastructure/Config/Repositories/ConfigRepository.php b/lib/SP/Infrastructure/Config/Repositories/ConfigRepository.php
index b4436730..263ee7e5 100644
--- a/lib/SP/Infrastructure/Config/Repositories/ConfigRepository.php
+++ b/lib/SP/Infrastructure/Config/Repositories/ConfigRepository.php
@@ -24,10 +24,10 @@
namespace SP\Infrastructure\Config\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ConfigData;
use SP\Domain\Config\Ports\ConfigRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Database\QueryData;
use SP\Infrastructure\Database\QueryResult;
@@ -122,8 +122,8 @@ final class ConfigRepository extends Repository implements ConfigRepositoryInter
* @param string $param
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteByParam(string $param): int
{
diff --git a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldDefRepository.php b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldDefRepository.php
index e3a0ff1e..76dfe908 100644
--- a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldDefRepository.php
+++ b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldDefRepository.php
@@ -25,11 +25,11 @@
namespace SP\Infrastructure\CustomField\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldDefRepositoryInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Common\Repositories\Repository;
@@ -248,8 +248,8 @@ final class CustomFieldDefRepository extends Repository implements CustomFieldDe
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
diff --git a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldRepository.php b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldRepository.php
index 668b3ba1..6c46d4a6 100644
--- a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldRepository.php
+++ b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldRepository.php
@@ -25,10 +25,10 @@
namespace SP\Infrastructure\CustomField\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -176,8 +176,8 @@ final class CustomFieldRepository extends Repository implements CustomFieldRepos
* @param int|null $definitionId
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteCustomFieldDataForDefinition(
int $id,
@@ -367,8 +367,8 @@ final class CustomFieldRepository extends Repository implements CustomFieldRepos
* @param int|null $itemId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForModuleAndItemId(int $moduleId, ?int $itemId): QueryResult
{
diff --git a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldTypeRepository.php b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldTypeRepository.php
index 4fcf09af..ee94cc26 100644
--- a/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldTypeRepository.php
+++ b/lib/SP/Infrastructure/CustomField/Repositories/CustomFieldTypeRepository.php
@@ -25,11 +25,11 @@
namespace SP\Infrastructure\CustomField\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldTypeData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldTypeRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
diff --git a/lib/SP/Infrastructure/Database/Database.php b/lib/SP/Infrastructure/Database/Database.php
index 1e66bc0b..8923e3ce 100644
--- a/lib/SP/Infrastructure/Database/Database.php
+++ b/lib/SP/Infrastructure/Database/Database.php
@@ -32,9 +32,9 @@ use PDOStatement;
use SP\Core\Events\Event;
use SP\Core\Events\EventDispatcher;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use function SP\__u;
use function SP\logger;
@@ -160,9 +160,9 @@ final class Database implements DatabaseInterface
* @param QueryInterface $query Los datos de la consulta
* @param array $options
*
- * @return \PDOStatement
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return PDOStatement
+ * @throws ConstraintException
+ * @throws QueryException
*/
private function prepareQueryData(
QueryInterface $query,
diff --git a/lib/SP/Infrastructure/Database/DatabaseException.php b/lib/SP/Infrastructure/Database/DatabaseException.php
index 1d2e059b..1e56a88a 100644
--- a/lib/SP/Infrastructure/Database/DatabaseException.php
+++ b/lib/SP/Infrastructure/Database/DatabaseException.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\Database;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class DatabaseException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class DatabaseException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Database/DatabaseInterface.php b/lib/SP/Infrastructure/Database/DatabaseInterface.php
index 9898d3cf..3960a1a9 100644
--- a/lib/SP/Infrastructure/Database/DatabaseInterface.php
+++ b/lib/SP/Infrastructure/Database/DatabaseInterface.php
@@ -24,10 +24,9 @@
namespace SP\Infrastructure\Database;
-use Aura\SqlQuery\QueryInterface;
use PDOStatement;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
/**
* Interface DatabaseInterface
@@ -73,4 +72,4 @@ interface DatabaseInterface
public function rollbackTransaction(): bool;
public function getColumnsForTable(string $table): array;
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Database/MysqlHandler.php b/lib/SP/Infrastructure/Database/MysqlHandler.php
index 21f9b0ef..7cfc3c59 100644
--- a/lib/SP/Infrastructure/Database/MysqlHandler.php
+++ b/lib/SP/Infrastructure/Database/MysqlHandler.php
@@ -26,7 +26,7 @@ namespace SP\Infrastructure\Database;
use Exception;
use PDO;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
defined('APP_ROOT') || die();
@@ -188,4 +188,4 @@ final class MysqlHandler implements DbStorageInterface
{
return $this->connectionData->getDbName();
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Database/QueryData.php b/lib/SP/Infrastructure/Database/QueryData.php
index e9170cc6..164eda99 100644
--- a/lib/SP/Infrastructure/Database/QueryData.php
+++ b/lib/SP/Infrastructure/Database/QueryData.php
@@ -26,8 +26,8 @@ namespace SP\Infrastructure\Database;
use Aura\SqlQuery\Common\Select;
use Aura\SqlQuery\QueryInterface;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\QueryException;
use function SP\__u;
diff --git a/lib/SP/Infrastructure/Database/QueryResult.php b/lib/SP/Infrastructure/Database/QueryResult.php
index 9a7ec288..d7dfa416 100644
--- a/lib/SP/Infrastructure/Database/QueryResult.php
+++ b/lib/SP/Infrastructure/Database/QueryResult.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\Database;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use function SP\__u;
diff --git a/lib/SP/Infrastructure/File/ArchiveHandler.php b/lib/SP/Infrastructure/File/ArchiveHandler.php
index c617e9c2..65255b12 100644
--- a/lib/SP/Infrastructure/File/ArchiveHandler.php
+++ b/lib/SP/Infrastructure/File/ArchiveHandler.php
@@ -27,8 +27,8 @@ namespace SP\Infrastructure\File;
use Phar;
use PharData;
-use SP\Core\Exceptions\CheckException;
use SP\Core\PhpExtensionChecker;
+use SP\Domain\Core\Exceptions\CheckException;
/**
* Class ArchiveHandler
diff --git a/lib/SP/Infrastructure/File/FileCache.php b/lib/SP/Infrastructure/File/FileCache.php
index 97fecda9..488d1214 100644
--- a/lib/SP/Infrastructure/File/FileCache.php
+++ b/lib/SP/Infrastructure/File/FileCache.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\File;
-use SP\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use function SP\__u;
diff --git a/lib/SP/Infrastructure/File/FileException.php b/lib/SP/Infrastructure/File/FileException.php
index 6e4479a7..a6163d64 100644
--- a/lib/SP/Infrastructure/File/FileException.php
+++ b/lib/SP/Infrastructure/File/FileException.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\File;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class FileException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class FileException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/ItemPreset/Repositories/ItemPresetRepository.php b/lib/SP/Infrastructure/ItemPreset/Repositories/ItemPresetRepository.php
index add8cdf9..0c439d46 100644
--- a/lib/SP/Infrastructure/ItemPreset/Repositories/ItemPresetRepository.php
+++ b/lib/SP/Infrastructure/ItemPreset/Repositories/ItemPresetRepository.php
@@ -25,11 +25,11 @@
namespace SP\Infrastructure\ItemPreset\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Models\ItemPreset;
use SP\Domain\Common\Ports\RepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Ports\ItemPresetRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
diff --git a/lib/SP/Infrastructure/Notification/Repositories/NotificationRepository.php b/lib/SP/Infrastructure/Notification/Repositories/NotificationRepository.php
index 4e3b9a0b..3a2d13b6 100644
--- a/lib/SP/Infrastructure/Notification/Repositories/NotificationRepository.php
+++ b/lib/SP/Infrastructure/Notification/Repositories/NotificationRepository.php
@@ -25,10 +25,10 @@
namespace SP\Infrastructure\Notification\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\NotificationData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Notification\Ports\NotificationRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -128,8 +128,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -147,8 +147,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function deleteAdmin(int $id): int
{
@@ -473,8 +473,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function setCheckedById(int $id): int
{
@@ -496,8 +496,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $userId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getForUserIdByDate(string $component, int $userId): QueryResult
{
@@ -530,8 +530,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllForUserId(int $id): QueryResult
{
@@ -563,8 +563,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForUserId(int $id): QueryResult
{
@@ -597,8 +597,8 @@ final class NotificationRepository extends Repository implements NotificationRep
* @param int $id
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getAllActiveForAdmin(int $id): QueryResult
{
diff --git a/lib/SP/Infrastructure/Plugin/Repositories/PluginDataRepository.php b/lib/SP/Infrastructure/Plugin/Repositories/PluginDataRepository.php
index a7e31238..12544072 100644
--- a/lib/SP/Infrastructure/Plugin/Repositories/PluginDataRepository.php
+++ b/lib/SP/Infrastructure/Plugin/Repositories/PluginDataRepository.php
@@ -24,8 +24,8 @@
namespace SP\Infrastructure\Plugin\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Ports\PluginDataRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -103,8 +103,8 @@ final class PluginDataRepository extends Repository implements PluginDataReposit
* @param string $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(string $id): int
{
diff --git a/lib/SP/Infrastructure/Plugin/Repositories/PluginRepository.php b/lib/SP/Infrastructure/Plugin/Repositories/PluginRepository.php
index a81c8e86..5cbb9c64 100644
--- a/lib/SP/Infrastructure/Plugin/Repositories/PluginRepository.php
+++ b/lib/SP/Infrastructure/Plugin/Repositories/PluginRepository.php
@@ -25,11 +25,11 @@
namespace SP\Infrastructure\Plugin\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -241,8 +241,8 @@ final class PluginRepository extends Repository implements PluginRepositoryInter
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -358,8 +358,8 @@ final class PluginRepository extends Repository implements PluginRepositoryInter
* @param bool $enabled
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleEnabled(int $id, bool $enabled): int
{
@@ -378,8 +378,8 @@ final class PluginRepository extends Repository implements PluginRepositoryInter
* @param bool $enabled
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleEnabledByName(string $name, bool $enabled): int
{
@@ -398,8 +398,8 @@ final class PluginRepository extends Repository implements PluginRepositoryInter
* @param bool $available
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleAvailable(int $id, bool $available): int
{
@@ -418,8 +418,8 @@ final class PluginRepository extends Repository implements PluginRepositoryInter
* @param bool $available
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function toggleAvailableByName(string $name, bool $available): int
{
diff --git a/lib/SP/Infrastructure/Security/Repositories/EventlogRepository.php b/lib/SP/Infrastructure/Security/Repositories/EventlogRepository.php
index ce944dc6..fae7a32a 100644
--- a/lib/SP/Infrastructure/Security/Repositories/EventlogRepository.php
+++ b/lib/SP/Infrastructure/Security/Repositories/EventlogRepository.php
@@ -24,10 +24,10 @@
namespace SP\Infrastructure\Security\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\EventlogRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Database\QueryData;
diff --git a/lib/SP/Infrastructure/Security/Repositories/TrackRepository.php b/lib/SP/Infrastructure/Security/Repositories/TrackRepository.php
index 7c8f132d..1e3b323c 100644
--- a/lib/SP/Infrastructure/Security/Repositories/TrackRepository.php
+++ b/lib/SP/Infrastructure/Security/Repositories/TrackRepository.php
@@ -24,10 +24,10 @@
namespace SP\Infrastructure\Security\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TrackData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\TrackRepositoryInterface;
use SP\Domain\Security\Services\TrackService;
use SP\Infrastructure\Common\Repositories\Repository;
diff --git a/lib/SP/Infrastructure/Security/Repositories/TrackRequest.php b/lib/SP/Infrastructure/Security/Repositories/TrackRequest.php
index 2c286563..5863f23e 100644
--- a/lib/SP/Infrastructure/Security/Repositories/TrackRequest.php
+++ b/lib/SP/Infrastructure/Security/Repositories/TrackRequest.php
@@ -24,7 +24,7 @@
namespace SP\Infrastructure\Security\Repositories;
-use SP\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
use SP\Http\Address;
/**
@@ -84,4 +84,4 @@ final class TrackRequest
{
return $this->ipv4;
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Infrastructure/Tag/Repositories/TagRepository.php b/lib/SP/Infrastructure/Tag/Repositories/TagRepository.php
index 2c97e29e..b913302d 100644
--- a/lib/SP/Infrastructure/Tag/Repositories/TagRepository.php
+++ b/lib/SP/Infrastructure/Tag/Repositories/TagRepository.php
@@ -24,10 +24,10 @@
namespace SP\Infrastructure\Tag\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TagData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Tag\Ports\TagRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
@@ -201,9 +201,9 @@ final class TagRepository extends Repository implements TagRepositoryInterface
*
* @param array $ids
*
- * @return \SP\Infrastructure\Database\QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return QueryResult
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getByIdBatch(array $ids): QueryResult
{
@@ -251,8 +251,8 @@ final class TagRepository extends Repository implements TagRepositoryInterface
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
diff --git a/lib/SP/Infrastructure/User/Repositories/UserGroupRepository.php b/lib/SP/Infrastructure/User/Repositories/UserGroupRepository.php
index f8b9703c..453b315e 100644
--- a/lib/SP/Infrastructure/User/Repositories/UserGroupRepository.php
+++ b/lib/SP/Infrastructure/User/Repositories/UserGroupRepository.php
@@ -24,11 +24,11 @@
namespace SP\Infrastructure\User\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserGroupData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
@@ -51,8 +51,8 @@ final class UserGroupRepository extends Repository implements UserGroupRepositor
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -214,9 +214,9 @@ final class UserGroupRepository extends Repository implements UserGroupRepositor
*
* @param array $ids
*
- * @return \SP\Infrastructure\Database\QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return QueryResult
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getByIdBatch(array $ids): QueryResult
{
diff --git a/lib/SP/Infrastructure/User/Repositories/UserPassRecoverRepository.php b/lib/SP/Infrastructure/User/Repositories/UserPassRecoverRepository.php
index b145d9b9..9d6e5ec0 100644
--- a/lib/SP/Infrastructure/User/Repositories/UserPassRecoverRepository.php
+++ b/lib/SP/Infrastructure/User/Repositories/UserPassRecoverRepository.php
@@ -24,9 +24,9 @@
namespace SP\Infrastructure\User\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserPassRecoverRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Database\QueryData;
@@ -125,8 +125,8 @@ final class UserPassRecoverRepository extends Repository implements UserPassReco
* @param int $time
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserIdForHash(string $hash, int $time): QueryResult
{
diff --git a/lib/SP/Infrastructure/User/Repositories/UserProfileRepository.php b/lib/SP/Infrastructure/User/Repositories/UserProfileRepository.php
index 1f4e43e0..07d67e0b 100644
--- a/lib/SP/Infrastructure/User/Repositories/UserProfileRepository.php
+++ b/lib/SP/Infrastructure/User/Repositories/UserProfileRepository.php
@@ -24,10 +24,10 @@
namespace SP\Infrastructure\User\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserProfileData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserProfileRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\Repository;
@@ -68,8 +68,8 @@ final class UserProfileRepository extends Repository implements UserProfileRepos
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -139,9 +139,9 @@ final class UserProfileRepository extends Repository implements UserProfileRepos
*
* @param array $ids
*
- * @return \SP\Infrastructure\Database\QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return QueryResult
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getByIdBatch(array $ids): QueryResult
{
@@ -265,9 +265,9 @@ final class UserProfileRepository extends Repository implements UserProfileRepos
* @param UserProfileData $itemData
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\DuplicatedItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws DuplicatedItemException
*/
public function update($itemData): int
{
diff --git a/lib/SP/Infrastructure/User/Repositories/UserRepository.php b/lib/SP/Infrastructure/User/Repositories/UserRepository.php
index e042d252..4ac701fb 100644
--- a/lib/SP/Infrastructure/User/Repositories/UserRepository.php
+++ b/lib/SP/Infrastructure/User/Repositories/UserRepository.php
@@ -25,12 +25,12 @@
namespace SP\Infrastructure\User\Repositories;
use RuntimeException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserRepositoryInterface;
use SP\Domain\User\Services\UpdatePassRequest;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
@@ -176,8 +176,8 @@ final class UserRepository extends Repository implements UserRepositoryInterface
* @param int $id
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function delete(int $id): int
{
@@ -287,9 +287,9 @@ final class UserRepository extends Repository implements UserRepositoryInterface
*
* @param array $ids
*
- * @return \SP\Infrastructure\Database\QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @return QueryResult
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getByIdBatch(array $ids): QueryResult
{
@@ -599,8 +599,8 @@ final class UserRepository extends Repository implements UserRepositoryInterface
* @param string $key
*
* @return int
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function updateMasterPassById(
int $id,
@@ -645,8 +645,8 @@ final class UserRepository extends Repository implements UserRepositoryInterface
* @param string $login
*
* @return bool
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function checkExistsByLogin(string $login): bool
{
@@ -719,8 +719,8 @@ final class UserRepository extends Repository implements UserRepositoryInterface
* @param int $groupId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getUserEmailForGroup(int $groupId): QueryResult
{
diff --git a/lib/SP/Infrastructure/User/Repositories/UserToUserGroupRepository.php b/lib/SP/Infrastructure/User/Repositories/UserToUserGroupRepository.php
index 0ebf5586..212b9ab1 100644
--- a/lib/SP/Infrastructure/User/Repositories/UserToUserGroupRepository.php
+++ b/lib/SP/Infrastructure/User/Repositories/UserToUserGroupRepository.php
@@ -24,9 +24,9 @@
namespace SP\Infrastructure\User\Repositories;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\UserToUserGroupData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserToUserGroupRepositoryInterface;
use SP\Infrastructure\Common\Repositories\Repository;
use SP\Infrastructure\Common\Repositories\RepositoryItemTrait;
@@ -67,8 +67,8 @@ final class UserToUserGroupRepository extends Repository implements UserToUserGr
* @param int $userId
*
* @return QueryResult
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function getGroupsForUser(int $userId): QueryResult
{
diff --git a/lib/SP/Mvc/Controller/ControllerTrait.php b/lib/SP/Mvc/Controller/ControllerTrait.php
index d87824db..c7c9426b 100644
--- a/lib/SP/Mvc/Controller/ControllerTrait.php
+++ b/lib/SP/Mvc/Controller/ControllerTrait.php
@@ -27,8 +27,8 @@ namespace SP\Mvc\Controller;
use Closure;
use Klein\Klein;
use SP\Core\Bootstrap\BootstrapBase;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
use SP\Http\JsonResponse;
use SP\Http\RequestInterface;
@@ -63,11 +63,11 @@ trait ControllerTrait
/**
* Logout from current session
*
- * @param \SP\Http\RequestInterface $request
- * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData
- * @param \Closure $onRedirect
+ * @param RequestInterface $request
+ * @param ConfigDataInterface $configData
+ * @param Closure $onRedirect
*
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function sessionLogout(
RequestInterface $request,
@@ -111,7 +111,7 @@ trait ControllerTrait
/**
* Acción no disponible
*
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function invalidAction(): void
{
diff --git a/lib/SP/Mvc/Controller/ItemTrait.php b/lib/SP/Mvc/Controller/ItemTrait.php
index 627bd96c..968fb06b 100644
--- a/lib/SP/Mvc/Controller/ItemTrait.php
+++ b/lib/SP/Mvc/Controller/ItemTrait.php
@@ -25,14 +25,19 @@
namespace SP\Mvc\Controller;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldItem;
use SP\Domain\CustomField\Services\CustomFieldService;
use SP\Http\RequestInterface;
+use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Util\Filter;
+
use function SP\__u;
/**
@@ -43,10 +48,10 @@ trait ItemTrait
/**
* Obtener la lista de campos personalizados y sus valores
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
*/
protected function getCustomFieldsForItem(
int $moduleId,
@@ -93,13 +98,13 @@ trait ItemTrait
* @param int $moduleId
* @param int|int[] $itemId
* @param RequestInterface $request
- * @param \SP\Domain\CustomField\Ports\CustomFieldServiceInterface $customFieldService
+ * @param CustomFieldServiceInterface $customFieldService
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
+ * @throws ServiceException
+ * @throws NoSuchItemException
*/
protected function addCustomFieldsForItem(
int $moduleId,
@@ -127,7 +132,7 @@ trait ItemTrait
}
/**
- * @param \SP\Http\RequestInterface $request
+ * @param RequestInterface $request
*
* @return array|null
*/
@@ -144,11 +149,11 @@ trait ItemTrait
*
* @param int $moduleId
* @param int|int[] $itemId
- * @param \SP\Domain\CustomField\Ports\CustomFieldServiceInterface $customFieldService
+ * @param CustomFieldServiceInterface $customFieldService
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
protected function deleteCustomFieldsForItem(
int $moduleId,
@@ -168,11 +173,11 @@ trait ItemTrait
* @param int $moduleId
* @param int|int[] $itemId
* @param RequestInterface $request
- * @param \SP\Domain\CustomField\Ports\CustomFieldServiceInterface $customFieldService
+ * @param CustomFieldServiceInterface $customFieldService
*
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
protected function updateCustomFieldsForItem(
int $moduleId,
diff --git a/lib/SP/Mvc/Controller/Validators/PasswordValidator.php b/lib/SP/Mvc/Controller/Validators/PasswordValidator.php
index 6ce34d50..eddfdd15 100644
--- a/lib/SP/Mvc/Controller/Validators/PasswordValidator.php
+++ b/lib/SP/Mvc/Controller/Validators/PasswordValidator.php
@@ -24,10 +24,11 @@
namespace SP\Mvc\Controller\Validators;
-use SP\Core\Exceptions\SPException;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ItemPreset\Password;
use SP\DataModel\ItemPreset\PresetInterface;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ValidationException;
+
use function SP\__;
use function SP\__u;
diff --git a/lib/SP/Mvc/View/Components/DataTab.php b/lib/SP/Mvc/View/Components/DataTab.php
index 533edf8c..a497655b 100644
--- a/lib/SP/Mvc/View/Components/DataTab.php
+++ b/lib/SP/Mvc/View/Components/DataTab.php
@@ -24,7 +24,7 @@
namespace SP\Mvc\View\Components;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Mvc\View\TemplateInterface;
/**
@@ -64,4 +64,4 @@ final class DataTab
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Mvc/View/Components/SelectItemAdapter.php b/lib/SP/Mvc/View/Components/SelectItemAdapter.php
index 90698591..022966de 100644
--- a/lib/SP/Mvc/View/Components/SelectItemAdapter.php
+++ b/lib/SP/Mvc/View/Components/SelectItemAdapter.php
@@ -25,9 +25,10 @@
namespace SP\Mvc\View\Components;
use RuntimeException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Adapters\DataModelInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Json;
+
use function SP\__u;
/**
diff --git a/lib/SP/Mvc/View/Template.php b/lib/SP/Mvc/View/Template.php
index 23ec6562..a772fdfc 100644
--- a/lib/SP/Mvc/View/Template.php
+++ b/lib/SP/Mvc/View/Template.php
@@ -27,7 +27,7 @@ namespace SP\Mvc\View;
defined('APP_ROOT') || die();
use SP\Core\Bootstrap\BootstrapBase;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\Core\UI\ThemeInterface;
use SP\Http\Uri;
@@ -59,7 +59,7 @@ final class Template implements TemplateInterface
private bool $upgraded = false;
/**
- * @param \SP\Domain\Core\UI\ThemeInterface $theme
+ * @param ThemeInterface $theme
*/
public function __construct(ThemeInterface $theme)
{
diff --git a/lib/SP/Mvc/View/TemplateInterface.php b/lib/SP/Mvc/View/TemplateInterface.php
index f00f71d7..eb4539e3 100644
--- a/lib/SP/Mvc/View/TemplateInterface.php
+++ b/lib/SP/Mvc/View/TemplateInterface.php
@@ -25,7 +25,7 @@
namespace SP\Mvc\View;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\Core\UI\ThemeInterface;
/**
diff --git a/lib/SP/Plugin/PluginBase.php b/lib/SP/Plugin/PluginBase.php
index 36d447eb..260506e5 100644
--- a/lib/SP/Plugin/PluginBase.php
+++ b/lib/SP/Plugin/PluginBase.php
@@ -26,10 +26,10 @@ namespace SP\Plugin;
use Defuse\Crypto\Exception\CryptoException;
use Psr\Container\ContainerInterface;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Services\PluginService;
/**
@@ -161,4 +161,4 @@ abstract class PluginBase implements PluginInterface
{
return $this->base;
}
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Plugin/PluginManager.php b/lib/SP/Plugin/PluginManager.php
index 6962eb94..1828c681 100644
--- a/lib/SP/Plugin/PluginManager.php
+++ b/lib/SP/Plugin/PluginManager.php
@@ -30,9 +30,9 @@ use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Events\Event;
use SP\Core\Events\EventDispatcher;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Services\InstallerService;
use SP\Domain\Plugin\Ports\PluginDataServiceInterface;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
@@ -63,7 +63,7 @@ class PluginManager
/**
* PluginManager constructor.
*
- * @param \SP\Domain\Plugin\Ports\PluginServiceInterface $pluginService
+ * @param PluginServiceInterface $pluginService
* @param PluginDataServiceInterface $pluginDataService
* @param EventDispatcher $eventDispatcher
*/
diff --git a/lib/SP/Plugin/PluginOperation.php b/lib/SP/Plugin/PluginOperation.php
index d49b4aac..5f826d4a 100644
--- a/lib/SP/Plugin/PluginOperation.php
+++ b/lib/SP/Plugin/PluginOperation.php
@@ -25,10 +25,10 @@
namespace SP\Plugin;
use Defuse\Crypto\Exception\CryptoException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Ports\PluginDataServiceInterface;
use SP\Domain\Plugin\Services\PluginDataService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -51,8 +51,8 @@ final class PluginOperation
* @param string $pluginName
*/
public function __construct(
- \SP\Domain\Plugin\Ports\PluginDataServiceInterface $pluginDataService,
- string $pluginName
+ PluginDataServiceInterface $pluginDataService,
+ string $pluginName
)
{
$this->pluginDataService = $pluginDataService;
@@ -93,7 +93,7 @@ final class PluginOperation
*/
public function update(int $itemId, $data): int
{
- $itemData = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $itemData = new PluginDataModel();
$itemData->setName($this->pluginName);
$itemData->setItemId($itemId);
$itemData->setData(serialize($data));
diff --git a/lib/SP/Providers/Acl/AclHandler.php b/lib/SP/Providers/Acl/AclHandler.php
index a99c760d..1910b94d 100644
--- a/lib/SP/Providers/Acl/AclHandler.php
+++ b/lib/SP/Providers/Acl/AclHandler.php
@@ -27,10 +27,10 @@ namespace SP\Providers\Acl;
use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\FileNotFoundException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Services\AccountAclService;
use SP\Domain\Core\Events\EventReceiver;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Providers\EventsTrait;
diff --git a/lib/SP/Providers/Auth/AuthProvider.php b/lib/SP/Providers/Auth/AuthProvider.php
index ca11f881..26c83723 100644
--- a/lib/SP/Providers/Auth/AuthProvider.php
+++ b/lib/SP/Providers/Auth/AuthProvider.php
@@ -25,9 +25,9 @@
namespace SP\Providers\Auth;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
use SP\Domain\Auth\Services\AuthException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Providers\Provider;
use SplObjectStorage;
diff --git a/lib/SP/Providers/Auth/Ldap/LdapException.php b/lib/SP/Providers/Auth/Ldap/LdapException.php
index aa04e1c7..f3972aba 100644
--- a/lib/SP/Providers/Auth/Ldap/LdapException.php
+++ b/lib/SP/Providers/Auth/Ldap/LdapException.php
@@ -24,7 +24,7 @@
namespace SP\Providers\Auth\Ldap;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class LdapException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class LdapException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Providers/Auth/Ldap/LdapMsAds.php b/lib/SP/Providers/Auth/Ldap/LdapMsAds.php
index 9ff7dee9..7f500120 100644
--- a/lib/SP/Providers/Auth/Ldap/LdapMsAds.php
+++ b/lib/SP/Providers/Auth/Ldap/LdapMsAds.php
@@ -26,7 +26,7 @@ namespace SP\Providers\Auth\Ldap;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\Address;
use function SP\__u;
diff --git a/lib/SP/Providers/Auth/Ldap/LdapParams.php b/lib/SP/Providers/Auth/Ldap/LdapParams.php
index a57fdc65..9b456730 100644
--- a/lib/SP/Providers/Auth/Ldap/LdapParams.php
+++ b/lib/SP/Providers/Auth/Ldap/LdapParams.php
@@ -24,8 +24,8 @@
namespace SP\Providers\Auth\Ldap;
-use SP\Core\Exceptions\ValidationException;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\ValidationException;
use function SP\__u;
diff --git a/lib/SP/Providers/Log/DatabaseLogHandler.php b/lib/SP/Providers/Log/DatabaseLogHandler.php
index 29ed873c..38a3b76b 100644
--- a/lib/SP/Providers/Log/DatabaseLogHandler.php
+++ b/lib/SP/Providers/Log/DatabaseLogHandler.php
@@ -27,11 +27,11 @@ namespace SP\Providers\Log;
use Exception;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\InvalidClassException;
-use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\DataModel\EventlogData;
use SP\Domain\Core\Events\EventReceiver;
+use SP\Domain\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Core\LanguageInterface;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Domain\Security\Services\EventlogService;
diff --git a/lib/SP/Providers/Log/FileLogHandler.php b/lib/SP/Providers/Log/FileLogHandler.php
index c22b202d..0eb8e9c7 100644
--- a/lib/SP/Providers/Log/FileLogHandler.php
+++ b/lib/SP/Providers/Log/FileLogHandler.php
@@ -27,7 +27,7 @@ namespace SP\Providers\Log;
use Monolog\Handler\StreamHandler;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Providers\EventsTrait;
use SplSubject;
diff --git a/lib/SP/Providers/Log/LoggerBase.php b/lib/SP/Providers/Log/LoggerBase.php
index c5790eea..76385ff1 100644
--- a/lib/SP/Providers/Log/LoggerBase.php
+++ b/lib/SP/Providers/Log/LoggerBase.php
@@ -28,9 +28,9 @@ use Exception;
use Monolog\Logger;
use SP\Core\Application;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Core\Language;
use SP\Domain\Core\Events\EventReceiver;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Core\LanguageInterface;
use SP\Http\Request;
use SP\Http\RequestInterface;
diff --git a/lib/SP/Providers/Log/RemoteSyslogHandler.php b/lib/SP/Providers/Log/RemoteSyslogHandler.php
index 48a72255..c5a3aace 100644
--- a/lib/SP/Providers/Log/RemoteSyslogHandler.php
+++ b/lib/SP/Providers/Log/RemoteSyslogHandler.php
@@ -27,7 +27,7 @@ namespace SP\Providers\Log;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Logger;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SplSubject;
/**
diff --git a/lib/SP/Providers/Log/SyslogHandler.php b/lib/SP/Providers/Log/SyslogHandler.php
index 65977ced..bc8d3a50 100644
--- a/lib/SP/Providers/Log/SyslogHandler.php
+++ b/lib/SP/Providers/Log/SyslogHandler.php
@@ -26,7 +26,7 @@ namespace SP\Providers\Log;
use Monolog\Handler\SyslogHandler as MSyslogHandler;
use SP\Core\Events\Event;
-use SP\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SplSubject;
/**
diff --git a/lib/SP/Providers/Mail/MailProvider.php b/lib/SP/Providers/Mail/MailProvider.php
index ea8b4745..41079dd7 100644
--- a/lib/SP/Providers/Mail/MailProvider.php
+++ b/lib/SP/Providers/Mail/MailProvider.php
@@ -26,8 +26,8 @@ namespace SP\Providers\Mail;
use Exception;
use SP\Core\Application;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Core\AppInfoInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Providers\MailerInterface;
use SP\Domain\Providers\MailProviderInterface;
use SP\Providers\Provider;
@@ -40,7 +40,7 @@ use SP\Providers\Provider;
final class MailProvider extends Provider implements MailProviderInterface
{
/**
- * @var \SP\Domain\Providers\MailerInterface | \SP\Providers\Mail\PhpMailerWrapper
+ * @var MailerInterface | PhpMailerWrapper
*/
private MailerInterface $mailer;
private bool $debug = false;
diff --git a/lib/SP/Providers/Mail/MailProviderException.php b/lib/SP/Providers/Mail/MailProviderException.php
index be553415..f09899cc 100644
--- a/lib/SP/Providers/Mail/MailProviderException.php
+++ b/lib/SP/Providers/Mail/MailProviderException.php
@@ -24,7 +24,7 @@
namespace SP\Providers\Mail;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
/**
* Class MailerException
@@ -34,4 +34,4 @@ use SP\Core\Exceptions\SPException;
final class MailProviderException extends SPException
{
-}
\ No newline at end of file
+}
diff --git a/lib/SP/Util/ErrorUtil.php b/lib/SP/Util/ErrorUtil.php
index c5981ca4..7319aab4 100644
--- a/lib/SP/Util/ErrorUtil.php
+++ b/lib/SP/Util/ErrorUtil.php
@@ -25,13 +25,14 @@
namespace SP\Util;
use Exception;
-use SP\Core\Acl\AccountPermissionException;
-use SP\Core\Acl\UnauthorizedPageException;
-use SP\Core\Exceptions\FileNotFoundException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Acl\AccountPermissionException;
+use SP\Domain\Core\Acl\UnauthorizedPageException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UpdatedMasterPassException;
use SP\Mvc\View\Template;
use SP\Mvc\View\TemplateInterface;
+
use function SP\processException;
/**
diff --git a/lib/SP/Util/FileUtil.php b/lib/SP/Util/FileUtil.php
index 95b23973..fd67fdd2 100644
--- a/lib/SP/Util/FileUtil.php
+++ b/lib/SP/Util/FileUtil.php
@@ -27,9 +27,9 @@ namespace SP\Util;
use FilesystemIterator;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
-use SP\Core\Exceptions\FileNotFoundException;
-use SP\Core\Exceptions\InvalidClassException;
use SP\DataModel\FileData;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Infrastructure\File\FileException;
use function SP\__;
diff --git a/lib/SP/Util/ImageUtil.php b/lib/SP/Util/ImageUtil.php
index c24414f0..6b2e0f04 100644
--- a/lib/SP/Util/ImageUtil.php
+++ b/lib/SP/Util/ImageUtil.php
@@ -24,8 +24,8 @@
namespace SP\Util;
-use SP\Core\Exceptions\InvalidImageException;
use SP\Core\PhpExtensionChecker;
+use SP\Domain\Core\Exceptions\InvalidImageException;
use function SP\__u;
diff --git a/lib/SP/Util/ImageUtilInterface.php b/lib/SP/Util/ImageUtilInterface.php
index 4603141e..bcd8fb84 100644
--- a/lib/SP/Util/ImageUtilInterface.php
+++ b/lib/SP/Util/ImageUtilInterface.php
@@ -24,7 +24,7 @@
namespace SP\Util;
-use SP\Core\Exceptions\InvalidImageException;
+use SP\Domain\Core\Exceptions\InvalidImageException;
/**
* Class ImageUtil para la manipulación de imágenes
diff --git a/lib/SP/Util/Link.php b/lib/SP/Util/Link.php
index 4cf485b0..05bcbea4 100644
--- a/lib/SP/Util/Link.php
+++ b/lib/SP/Util/Link.php
@@ -24,7 +24,6 @@
namespace SP\Util;
-use SP\Core\Acl\Acl;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Http\Uri;
@@ -37,17 +36,17 @@ use SP\Http\Uri;
final class Link
{
public static function getDeepLink(
- int $itemId,
- int $actionId,
+ int $itemId,
+ string $actionRoute,
ConfigDataInterface $configData,
- bool $useUI = false
+ bool $useUI = false
): string {
- $route = Acl::getActionRoute($actionId).'/'.$itemId;
+ $route = sprintf('%s/%d', $actionRoute, $itemId);
if ($useUI) {
- $baseUrl = ($configData->getApplicationUrl() ?? BootstrapBase::$WEBURI).'/index.php';
+ $baseUrl = ($configData->getApplicationUrl() ?? BootstrapBase::$WEBURI) . '/index.php';
} else {
- $baseUrl = ($configData->getApplicationUrl() ?? BootstrapBase::$WEBURI).BootstrapBase::$SUBURI;
+ $baseUrl = ($configData->getApplicationUrl() ?? BootstrapBase::$WEBURI) . BootstrapBase::$SUBURI;
}
$uri = new Uri($baseUrl);
diff --git a/tests/SP/Core/Acl/ActionsTest.php b/tests/SP/Core/Acl/ActionsTest.php
index daba8a34..60c28e44 100644
--- a/tests/SP/Core/Acl/ActionsTest.php
+++ b/tests/SP/Core/Acl/ActionsTest.php
@@ -26,10 +26,10 @@ namespace SP\Tests\Core\Acl;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Acl\ActionNotFoundException;
use SP\Core\Acl\Actions;
use SP\Core\Context\ContextException;
use SP\DataModel\ActionData;
+use SP\Domain\Core\Acl\ActionNotFoundException;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\FileHandlerInterface;
diff --git a/tests/SP/Core/Crypt/CryptPKITest.php b/tests/SP/Core/Crypt/CryptPKITest.php
index 464a61d4..895936ba 100644
--- a/tests/SP/Core/Crypt/CryptPKITest.php
+++ b/tests/SP/Core/Crypt/CryptPKITest.php
@@ -25,12 +25,14 @@
namespace SP\Tests\Core\Crypt;
use phpseclib\Crypt\RSA;
+use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Core\Crypt\CryptPKI;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\File\FileException;
use SP\Infrastructure\File\FileHandlerInterface;
use SP\Tests\UnitaryTestCase;
+
use function PHPUnit\Framework\once;
/**
@@ -78,7 +80,7 @@ class CryptPKITest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateKeys()
{
@@ -108,7 +110,7 @@ class CryptPKITest extends UnitaryTestCase
* This method is called before a test is executed.
*
* @throws SPException
- * @throws \PHPUnit\Framework\MockObject\Exception
+ * @throws Exception
*/
protected function setUp(): void
{
diff --git a/tests/SP/Core/Crypt/CryptTest.php b/tests/SP/Core/Crypt/CryptTest.php
index 6f10474c..4f141ec4 100644
--- a/tests/SP/Core/Crypt/CryptTest.php
+++ b/tests/SP/Core/Crypt/CryptTest.php
@@ -24,9 +24,8 @@
namespace SP\Tests\Core\Crypt;
-use Defuse\Crypto\Exception\CryptoException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\CryptException;
use SP\Tests\UnitaryTestCase;
/**
@@ -39,7 +38,7 @@ class CryptTest extends UnitaryTestCase
/**
* Comprobar la generación de una llave de cifrado
*
- * @throws \SP\Core\Exceptions\CryptException
+ * @throws CryptException
*/
public function testMakeSecuredKey()
{
@@ -51,7 +50,7 @@ class CryptTest extends UnitaryTestCase
/**
* Comprobar la generación de una llave de cifrado
*
- * @throws \SP\Core\Exceptions\CryptException
+ * @throws CryptException
*/
public function testMakeSecuredKeyNoAscii()
{
@@ -63,7 +62,7 @@ class CryptTest extends UnitaryTestCase
/**
* Comprobar la encriptación y desencriptado de datos
*
- * @throws \SP\Core\Exceptions\CryptException
+ * @throws CryptException
*/
public function testEncryptAndDecrypt()
{
@@ -83,7 +82,7 @@ class CryptTest extends UnitaryTestCase
/**
* Comprobar la encriptación y desencriptado de datos
*
- * @throws \SP\Core\Exceptions\CryptException
+ * @throws CryptException
*/
public function testEncryptAndDecryptWithDifferentPassword()
{
diff --git a/tests/SP/Core/Crypt/SessionTest.php b/tests/SP/Core/Crypt/SessionTest.php
index dcc91c52..c5848a6a 100644
--- a/tests/SP/Core/Crypt/SessionTest.php
+++ b/tests/SP/Core/Crypt/SessionTest.php
@@ -27,9 +27,9 @@ namespace SP\Tests\Core\Crypt;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Core\Crypt\Session;
-use SP\Core\Exceptions\CryptException;
use SP\Domain\Core\Context\SessionContextInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\CryptException;
use SP\Tests\UnitaryTestCase;
/**
diff --git a/tests/SP/Core/Crypt/VaultTest.php b/tests/SP/Core/Crypt/VaultTest.php
index 2c84c7df..83b45e21 100644
--- a/tests/SP/Core/Crypt/VaultTest.php
+++ b/tests/SP/Core/Crypt/VaultTest.php
@@ -24,9 +24,10 @@
namespace SP\Tests\Core\Crypt;
+use RuntimeException;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\CryptException;
use SP\Tests\UnitaryTestCase;
/**
@@ -57,7 +58,7 @@ class VaultTest extends UnitaryTestCase
$vault = Vault::factory(new Crypt());
- $this->expectException(\RuntimeException::class);
+ $this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Either data or key must be set');
$vault->getData($key);
diff --git a/tests/SP/Core/PhpExtensionCheckerTest.php b/tests/SP/Core/PhpExtensionCheckerTest.php
index 94b464a0..6307b8d7 100644
--- a/tests/SP/Core/PhpExtensionCheckerTest.php
+++ b/tests/SP/Core/PhpExtensionCheckerTest.php
@@ -25,8 +25,8 @@
namespace SP\Tests\Core;
use RuntimeException;
-use SP\Core\Exceptions\CheckException;
use SP\Core\PhpExtensionChecker;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Tests\UnitaryTestCase;
/**
diff --git a/tests/SP/Core/UI/ThemeIconsTest.php b/tests/SP/Core/UI/ThemeIconsTest.php
index f6a279e0..e1a7cd8a 100644
--- a/tests/SP/Core/UI/ThemeIconsTest.php
+++ b/tests/SP/Core/UI/ThemeIconsTest.php
@@ -25,9 +25,9 @@
namespace SP\Tests\Core\UI;
use PHPUnit\Framework\MockObject\Exception;
-use SP\Core\Exceptions\InvalidClassException;
use SP\Core\UI\ThemeIcons;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\InvalidClassException;
use SP\Domain\Core\UI\ThemeContextInterface;
use SP\Html\Assets\FontIcon;
use SP\Infrastructure\File\FileCacheInterface;
diff --git a/tests/SP/Domain/Account/Adapters/AccountAdapterTest.php b/tests/SP/Domain/Account/Adapters/AccountAdapterTest.php
index 05bd72a4..5f20ea2b 100644
--- a/tests/SP/Domain/Account/Adapters/AccountAdapterTest.php
+++ b/tests/SP/Domain/Account/Adapters/AccountAdapterTest.php
@@ -26,7 +26,12 @@ namespace SP\Tests\Domain\Account\Adapters;
use League\Fractal\Manager;
use League\Fractal\Resource\Item;
+use PHPUnit\Framework\MockObject\Exception;
+use SP\DataModel\ActionData;
use SP\Domain\Account\Adapters\AccountAdapter;
+use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\ActionNotFoundException;
+use SP\Domain\Core\Acl\ActionsInterface;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Mvc\View\Components\SelectItemAdapter;
use SP\Tests\Generators\AccountDataGenerator;
@@ -40,13 +45,30 @@ use SP\Tests\UnitaryTestCase;
*/
class AccountAdapterTest extends UnitaryTestCase
{
+ /**
+ * @throws Exception
+ * @throws ActionNotFoundException
+ */
public function testAdapt(): void
{
$dataGenerator = AccountDataGenerator::factory();
+ $actions = $this->createMock(ActionsInterface::class);
+ $actions->expects(self::once())
+ ->method('getActionById')
+ ->with(AclActionsInterface::ACCOUNT_VIEW)
+ ->willReturn(
+ new ActionData(
+ self::$faker->randomNumber(),
+ self::$faker->colorName,
+ self::$faker->sentence,
+ self::$faker->colorName
+ )
+ );
$adapter = new AccountAdapter(
$this->config->getConfigData(),
- $this->createStub(CustomFieldServiceInterface::class)
+ $this->createStub(CustomFieldServiceInterface::class),
+ $actions
);
$accountData = $dataGenerator->buildAccountEnrichedDto();
@@ -102,6 +124,9 @@ class AccountAdapterTest extends UnitaryTestCase
$this->assertNotEmpty($out['links'][0]['uri']);
}
+ /**
+ * @throws Exception
+ */
public function testIncludeCustomFields(): void
{
$customFieldData = CustomFieldGenerator::factory()->buildSimpleModel();
@@ -110,7 +135,21 @@ class AccountAdapterTest extends UnitaryTestCase
->method('getForModuleAndItemId')
->willReturn([$customFieldData]);
- $adapter = new AccountAdapter($this->config->getConfigData(), $customFieldsService);
+ $actions = $this->createMock(ActionsInterface::class);
+ $actions->expects(self::once())
+ ->method('getActionById')
+ ->with(AclActionsInterface::ACCOUNT_VIEW)
+ ->willReturn(
+ new ActionData(
+ self::$faker->randomNumber(),
+ self::$faker->colorName,
+ self::$faker->sentence,
+ self::$faker->colorName
+ )
+ );
+
+
+ $adapter = new AccountAdapter($this->config->getConfigData(), $customFieldsService, $actions);
$fractal = new Manager();
$fractal->parseIncludes('customFields');
diff --git a/tests/SP/Domain/Account/Search/AccountSearchDataBuilderTest.php b/tests/SP/Domain/Account/Search/AccountSearchDataBuilderTest.php
index 06088f5d..c898b706 100644
--- a/tests/SP/Domain/Account/Search/AccountSearchDataBuilderTest.php
+++ b/tests/SP/Domain/Account/Search/AccountSearchDataBuilderTest.php
@@ -25,17 +25,20 @@
namespace SP\Tests\Domain\Account\Search;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\DataModel\AccountSearchVData;
use SP\Domain\Account\Ports\AccountAclServiceInterface;
use SP\Domain\Account\Ports\AccountCacheServiceInterface;
use SP\Domain\Account\Ports\AccountToFavoriteServiceInterface;
use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
use SP\Domain\Account\Search\AccountSearchDataBuilder;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
use SP\Tests\Generators\AccountDataGenerator;
use SP\Tests\UnitaryTestCase;
+
use function PHPUnit\Framework\exactly;
use function PHPUnit\Framework\once;
@@ -55,9 +58,9 @@ class AccountSearchDataBuilderTest extends UnitaryTestCase
private MockObject|FileCacheInterface $fileCache;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testBuildFrom(): void
{
@@ -93,9 +96,9 @@ class AccountSearchDataBuilderTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testBuildFromWithColorCacheException(): void
{
diff --git a/tests/SP/Domain/Account/Services/AccountAclServiceTest.php b/tests/SP/Domain/Account/Services/AccountAclServiceTest.php
index 3b8dabeb..4f80efa7 100644
--- a/tests/SP/Domain/Account/Services/AccountAclServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountAclServiceTest.php
@@ -26,14 +26,15 @@ namespace SP\Tests\Domain\Account\Services;
use PHPUnit\Framework\MockObject\Exception;
use SP\Core\Acl\Acl;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Dtos\AccountAclDto;
use SP\Domain\Account\Services\AccountAcl;
use SP\Domain\Account\Services\AccountAclService;
use SP\Domain\Common\Models\Simple;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Acl\ActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserToUserGroupServiceInterface;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
@@ -68,48 +69,48 @@ class AccountAclServiceTest extends UnitaryTestCase
self::$accounts = [
1 => [
- 'userGroupId' => 1,
- 'userId' => 1,
- 'isPrivate' => 0,
- 'isPrivateGroup' => 0,
+ 'userGroupId' => 1,
+ 'userId' => 1,
+ 'isPrivate' => 0,
+ 'isPrivateGroup' => 0,
'otherUserGroupEdit' => 0,
- 'otherUserEdit' => 0,
- 'users' => [new ItemData(['id' => 3, 'isEdit' => 1])],
- 'groups' => [new ItemData(['id' => 2, 'isEdit' => 1])],
+ 'otherUserEdit' => 0,
+ 'users' => [new ItemData(['id' => 3, 'isEdit' => 1])],
+ 'groups' => [new ItemData(['id' => 2, 'isEdit' => 1])],
],
2 => [
- 'userGroupId' => 1,
- 'userId' => 1,
- 'isPrivate' => 0,
- 'isPrivateGroup' => 0,
+ 'userGroupId' => 1,
+ 'userId' => 1,
+ 'isPrivate' => 0,
+ 'isPrivateGroup' => 0,
'otherUserGroupEdit' => 0,
- 'otherUserEdit' => 0,
- 'users' => [],
- 'groups' => [
+ 'otherUserEdit' => 0,
+ 'users' => [],
+ 'groups' => [
new ItemData(['id' => 2, 'isEdit' => 1]),
new ItemData(['id' => 3, 'isEdit' => 1]),
],
],
3 => [
- 'userGroupId' => 3,
- 'userId' => 3,
- 'isPrivate' => 1,
- 'isPrivateGroup' => 0,
+ 'userGroupId' => 3,
+ 'userId' => 3,
+ 'isPrivate' => 1,
+ 'isPrivateGroup' => 0,
'otherUserGroupEdit' => 0,
- 'otherUserEdit' => 0,
- 'users' => [],
- 'groups' => [],
+ 'otherUserEdit' => 0,
+ 'users' => [],
+ 'groups' => [],
],
4 => [
- 'userGroupId' => 3,
- 'userId' => 3,
- 'isPrivate' => 0,
- 'isPrivateGroup' => 1,
+ 'userGroupId' => 3,
+ 'userId' => 3,
+ 'isPrivate' => 0,
+ 'isPrivateGroup' => 1,
'otherUserGroupEdit' => 0,
- 'otherUserEdit' => 0,
- 'users' => [],
- 'groups' => [],
+ 'otherUserEdit' => 0,
+ 'users' => [],
+ 'groups' => [],
],
];
}
@@ -198,8 +199,8 @@ class AccountAclServiceTest extends UnitaryTestCase
}
/**
- * @param AccountAclDto $accountAclDto The ACL dto to compile the ACL for the user
- * @param AccountAcl $example An example ACL to test against the compiled ACL
+ * @param AccountAclDto $accountAclDto The ACL dto to compile the ACL for the user
+ * @param AccountAcl $example An example ACL to test against the compiled ACL
*
* @throws ConstraintException
* @throws QueryException
@@ -301,12 +302,12 @@ class AccountAclServiceTest extends UnitaryTestCase
}
/**
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
*
- * @param bool $isAdminApp
- * @param bool|int $isAdminAcc
+ * @param bool $isAdminApp
+ * @param bool|int $isAdminAcc
*
* @return AccountAclDto
*/
@@ -401,11 +402,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -437,11 +438,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -473,11 +474,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -509,11 +510,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -546,11 +547,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -582,11 +583,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -618,11 +619,11 @@ class AccountAclServiceTest extends UnitaryTestCase
* @group acl:action
* @dataProvider accountPropertiesProvider
*
- * @param int $accountId
- * @param int $userId
- * @param int $groupId
- * @param bool $shouldView
- * @param bool $shouldEdit
+ * @param int $accountId
+ * @param int $userId
+ * @param int $groupId
+ * @param bool $shouldView
+ * @param bool $shouldEdit
*
* @throws ConstraintException
* @throws QueryException
@@ -676,10 +677,11 @@ class AccountAclServiceTest extends UnitaryTestCase
$userToUserGroupService = $this->createMock(UserToUserGroupServiceInterface::class);
$userToUserGroupService->method('getGroupsForUser')->willReturn([]);
$fileCache = $this->createMock(FileCacheInterface::class);
+ $actions = $this->createMock(ActionsInterface::class);
$accountAclService = new AccountAclService(
$this->application,
- new Acl($this->context, $this->application->getEventDispatcher()),
+ new Acl($this->context, $this->application->getEventDispatcher(), $actions),
$userToUserGroupService,
$fileCache
);
@@ -716,10 +718,11 @@ class AccountAclServiceTest extends UnitaryTestCase
$userToUserGroupService = $this->createMock(UserToUserGroupServiceInterface::class);
$userToUserGroupService->method('getGroupsForUser')->willReturn([]);
$fileCache = $this->createMock(FileCacheInterface::class);
+ $actions = $this->createMock(ActionsInterface::class);
$accountAclService = new AccountAclService(
$this->application,
- new Acl($this->context, $this->application->getEventDispatcher()),
+ new Acl($this->context, $this->application->getEventDispatcher(), $actions),
$userToUserGroupService,
$fileCache
);
@@ -760,10 +763,11 @@ class AccountAclServiceTest extends UnitaryTestCase
$userToUserGroupService = $this->createMock(UserToUserGroupServiceInterface::class);
$userToUserGroupService->method('getGroupsForUser')->willReturn([]);
$fileCache = $this->createMock(FileCacheInterface::class);
+ $actions = $this->createMock(ActionsInterface::class);
$accountAclService = new AccountAclService(
$this->application,
- new Acl($this->context, $this->application->getEventDispatcher()),
+ new Acl($this->context, $this->application->getEventDispatcher(), $actions),
$userToUserGroupService,
$fileCache
);
@@ -795,10 +799,11 @@ class AccountAclServiceTest extends UnitaryTestCase
$userToUserGroupService = $this->createMock(UserToUserGroupServiceInterface::class);
$userToUserGroupService->method('getGroupsForUser')->willReturn([]);
$fileCache = $this->createMock(FileCacheInterface::class);
+ $actions = $this->createMock(ActionsInterface::class);
$accountAclService = new AccountAclService(
$this->application,
- new Acl($this->context, $this->application->getEventDispatcher()),
+ new Acl($this->context, $this->application->getEventDispatcher(), $actions),
$userToUserGroupService,
$fileCache
);
@@ -818,15 +823,17 @@ class AccountAclServiceTest extends UnitaryTestCase
{
parent::setUp();
- $acl = new Acl($this->context, $this->application->getEventDispatcher());
+ $actions = $this->createMock(ActionsInterface::class);
+
+ $acl = new Acl($this->context, $this->application->getEventDispatcher(), $actions);
$userToUserGroupService = $this->createMock(UserToUserGroupServiceInterface::class);
$userToUserGroupService->method('getGroupsForUser')
->willReturnMap([
- [1, [new Simple(['userGroupId' => 2])]],
- [2, [new Simple(['userGroupId' => 1])]],
- [3, [new Simple(['userGroupId' => 2])]],
- [4, []],
- ]);
+ [1, [new Simple(['userGroupId' => 2])]],
+ [2, [new Simple(['userGroupId' => 1])]],
+ [3, [new Simple(['userGroupId' => 2])]],
+ [4, []],
+ ]);
$this->accountAclService = new AccountAclService(
$this->application,
diff --git a/tests/SP/Domain/Account/Services/AccountCacheServiceTest.php b/tests/SP/Domain/Account/Services/AccountCacheServiceTest.php
index 94ffacd3..b03af3a8 100644
--- a/tests/SP/Domain/Account/Services/AccountCacheServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountCacheServiceTest.php
@@ -29,6 +29,9 @@ use SP\Domain\Account\Dtos\AccountCacheDto;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Account\Services\AccountCacheService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\UnitaryTestCase;
@@ -45,9 +48,9 @@ class AccountCacheServiceTest extends UnitaryTestCase
private AccountCacheService $accountCacheService;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetCacheForAccount()
{
@@ -74,9 +77,9 @@ class AccountCacheServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetCacheForAccountWithCacheHit()
{
diff --git a/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php b/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php
index f6ca102f..540fd9bb 100644
--- a/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php
@@ -28,12 +28,12 @@ use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use RuntimeException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Account\Ports\AccountHistoryServiceInterface;
use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Account\Services\AccountCryptService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Crypt\CryptInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
use SP\Domain\Task\Ports\TaskInterface;
use SP\Domain\Task\Services\TaskFactory;
diff --git a/tests/SP/Domain/Account/Services/AccountFileServiceTest.php b/tests/SP/Domain/Account/Services/AccountFileServiceTest.php
index 2d85b746..ae541f29 100644
--- a/tests/SP/Domain/Account/Services/AccountFileServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountFileServiceTest.php
@@ -25,14 +25,14 @@
namespace SP\Tests\Domain\Account\Services;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidImageException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\FileData;
use SP\DataModel\FileExtData;
use SP\Domain\Account\Ports\AccountFileRepositoryInterface;
use SP\Domain\Account\Services\AccountFileService;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidImageException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\Generators\FileDataGenerator;
diff --git a/tests/SP/Domain/Account/Services/AccountHistoryServiceTest.php b/tests/SP/Domain/Account/Services/AccountHistoryServiceTest.php
index 23aa6f60..8f621701 100644
--- a/tests/SP/Domain/Account/Services/AccountHistoryServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountHistoryServiceTest.php
@@ -32,6 +32,7 @@ use SP\Domain\Account\Models\AccountHistory;
use SP\Domain\Account\Ports\AccountHistoryRepositoryInterface;
use SP\Domain\Account\Services\AccountHistoryService;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\Generators\AccountDataGenerator;
@@ -73,7 +74,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testGetHistoryForAccount()
{
@@ -85,7 +86,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testGetAccountsPassData()
{
@@ -95,7 +96,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDelete()
{
@@ -107,7 +108,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDeleteError()
{
@@ -122,7 +123,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws NoSuchItemException
*/
public function testGetById()
{
@@ -137,7 +138,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
+ * @throws NoSuchItemException
*/
public function testGetByIdError()
{
@@ -172,7 +173,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdatePasswordMasterPass()
{
@@ -188,7 +189,7 @@ class AccountHistoryServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdatePasswordMasterPassError()
{
diff --git a/tests/SP/Domain/Account/Services/AccountPresetServiceTest.php b/tests/SP/Domain/Account/Services/AccountPresetServiceTest.php
index 831afff4..154632c8 100644
--- a/tests/SP/Domain/Account/Services/AccountPresetServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountPresetServiceTest.php
@@ -25,11 +25,14 @@
namespace SP\Tests\Domain\Account\Services;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ItemPreset\Password;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Account\Services\AccountPresetService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Mvc\Controller\Validators\ValidatorInterface;
@@ -50,10 +53,10 @@ class AccountPresetServiceTest extends UnitaryTestCase
private ValidatorInterface|MockObject $passwordValidator;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\ValidationException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ValidationException
+ * @throws NoSuchPropertyException
*/
public function testCheckPasswordPreset(): void
{
@@ -77,10 +80,10 @@ class AccountPresetServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\ValidationException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ValidationException
+ * @throws NoSuchPropertyException
*/
public function testCheckPasswordPresetThrowsValidatorException(): void
{
@@ -107,10 +110,10 @@ class AccountPresetServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\ValidationException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ValidationException
+ * @throws NoSuchPropertyException
*/
public function testCheckPasswordPresetWithoutFixed(): void
{
@@ -131,10 +134,10 @@ class AccountPresetServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\ValidationException
- * @throws \SP\Core\Exceptions\NoSuchPropertyException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ValidationException
+ * @throws NoSuchPropertyException
*/
public function testCheckPasswordPresetWithPassDateChangeModified(): void
{
diff --git a/tests/SP/Domain/Account/Services/AccountSearchServiceTest.php b/tests/SP/Domain/Account/Services/AccountSearchServiceTest.php
index 84417b81..ce9b38db 100644
--- a/tests/SP/Domain/Account/Services/AccountSearchServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountSearchServiceTest.php
@@ -34,6 +34,9 @@ use SP\Domain\Account\Ports\AccountSearchRepositoryInterface;
use SP\Domain\Account\Search\AccountSearchConstants;
use SP\Domain\Account\Search\AccountSearchFilter;
use SP\Domain\Account\Services\AccountSearchService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
use SP\Infrastructure\Database\QueryResult;
@@ -56,9 +59,9 @@ class AccountSearchServiceTest extends UnitaryTestCase
/**
* @dataProvider searchUsingStringDataProvider
*
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetByFilter(string $search)
{
@@ -81,9 +84,9 @@ class AccountSearchServiceTest extends UnitaryTestCase
/**
* @dataProvider searchByItemDataProvider
*
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetByFilterUsingItems(string $search, array $expected)
{
@@ -152,9 +155,9 @@ class AccountSearchServiceTest extends UnitaryTestCase
/**
* @dataProvider searchByItemDataProvider
*
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetByFilterUsingItemsDoesNotThrowException(string $search, array $expected)
{
@@ -180,9 +183,9 @@ class AccountSearchServiceTest extends UnitaryTestCase
/**
* @dataProvider searchByConditionDataProvider
*
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetByFilterUsingConditions(string $search, array $expected)
{
diff --git a/tests/SP/Domain/Account/Services/AccountServiceTest.php b/tests/SP/Domain/Account/Services/AccountServiceTest.php
index 5c6dcc26..549090bc 100644
--- a/tests/SP/Domain/Account/Services/AccountServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountServiceTest.php
@@ -45,6 +45,9 @@ use SP\Domain\Account\Services\AccountService;
use SP\Domain\Common\Models\Simple;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\ItemPreset\Ports\ItemPresetInterface;
use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
@@ -74,7 +77,7 @@ class AccountServiceTest extends UnitaryTestCase
private AccountService $accountService;
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdate()
{
@@ -103,7 +106,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUserCannotChangePermissionsWithoutAdminApp()
{
@@ -132,7 +135,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUserCanChangePermissionsWithAdminAcc()
{
@@ -163,7 +166,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUserCanChangePermissionsWithProfilePermission()
{
@@ -194,7 +197,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateWithPresetPrivateForUser()
{
@@ -261,7 +264,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateWithPresetPrivateForGroup()
{
@@ -328,9 +331,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetLinked()
{
@@ -342,9 +345,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetForUser()
{
@@ -356,10 +359,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetPasswordForId()
{
@@ -372,10 +375,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetPasswordForIdNotFound()
{
@@ -391,9 +394,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ServiceException
*/
public function testUpdatePasswordMasterPass()
{
@@ -412,9 +415,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws ServiceException
*/
public function testUpdatePasswordMasterPassError()
{
@@ -436,8 +439,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetById()
{
@@ -452,8 +455,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetByIdNotFound()
{
@@ -470,8 +473,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetByIdEnriched()
{
@@ -486,8 +489,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetByIdEnrichedError()
{
@@ -504,7 +507,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateBulk()
{
@@ -536,7 +539,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateBulkCannotChangePermissionsWithoutAdminApp()
{
@@ -565,7 +568,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateBulkCanChangePermissionsWithAdminAcc()
{
@@ -599,7 +602,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateBulkCanChangePermissionsWithProfilePermission()
{
@@ -632,9 +635,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testWithUsersById()
{
@@ -652,7 +655,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDelete()
{
@@ -679,7 +682,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDeleteNotFound()
{
@@ -709,8 +712,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementViewCounter()
{
@@ -726,8 +729,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementViewCounterNoRows()
{
@@ -743,7 +746,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testGetAllBasic()
{
@@ -753,10 +756,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetDataForLink()
{
@@ -771,10 +774,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws NoSuchItemException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetDataForLinkNotFound()
{
@@ -792,9 +795,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function testRestoreRemoved()
{
@@ -813,9 +816,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws ServiceException
*/
public function testRestoreRemovedError()
{
@@ -836,7 +839,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testEditPassword()
{
@@ -870,7 +873,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testRestoreModified()
{
@@ -906,7 +909,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testRestoreModifiedError()
{
@@ -954,9 +957,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testWithTagsById()
{
@@ -974,7 +977,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreate()
{
@@ -1010,7 +1013,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreateCannotChangePermissions()
{
@@ -1048,7 +1051,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreateWithPrivateForUser()
{
@@ -1106,7 +1109,7 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreateWithPrivateForGroup()
{
@@ -1164,9 +1167,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetTotalNumAccounts()
{
@@ -1181,10 +1184,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetPasswordHistoryForId()
{
@@ -1197,10 +1200,10 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws NoSuchItemException
+ * @throws SPException
*/
public function testGetPasswordHistoryForIdNotFound()
{
@@ -1216,9 +1219,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetAccountsPassData()
{
@@ -1229,8 +1232,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ServiceException
+ * @throws SPException
*/
public function testDeleteByIdBatch()
{
@@ -1246,8 +1249,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ServiceException
+ * @throws SPException
*/
public function testDeleteByIdBatchError()
{
@@ -1266,9 +1269,9 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testWithUserGroupsById()
{
@@ -1286,8 +1289,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementDecryptCounter()
{
@@ -1303,8 +1306,8 @@ class AccountServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementDecryptCounterNoRows()
{
diff --git a/tests/SP/Domain/Account/Services/AccountToFavoriteServiceTest.php b/tests/SP/Domain/Account/Services/AccountToFavoriteServiceTest.php
index 5d7b0747..faa9da9e 100644
--- a/tests/SP/Domain/Account/Services/AccountToFavoriteServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountToFavoriteServiceTest.php
@@ -27,6 +27,9 @@ namespace SP\Tests\Domain\Account\Services;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Domain\Account\Ports\AccountToFavoriteRepositoryInterface;
use SP\Domain\Account\Services\AccountToFavoriteService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\UnitaryTestCase;
@@ -42,9 +45,9 @@ class AccountToFavoriteServiceTest extends UnitaryTestCase
private AccountToFavoriteService $accountToFavoriteService;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetForUserId()
{
@@ -63,8 +66,8 @@ class AccountToFavoriteServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDelete()
{
@@ -83,8 +86,8 @@ class AccountToFavoriteServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testAdd()
{
diff --git a/tests/SP/Domain/Account/Services/AccountToTagServiceTest.php b/tests/SP/Domain/Account/Services/AccountToTagServiceTest.php
index 43082be1..257cf435 100644
--- a/tests/SP/Domain/Account/Services/AccountToTagServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountToTagServiceTest.php
@@ -29,6 +29,9 @@ use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
use SP\Domain\Account\Services\AccountToTagService;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\UnitaryTestCase;
@@ -44,9 +47,9 @@ class AccountToTagServiceTest extends UnitaryTestCase
private AccountToTagRepositoryInterface|MockObject $accountToTagRepository;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetTagsByAccountId()
{
@@ -69,9 +72,9 @@ class AccountToTagServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetTagsByAccountIdWithNotags()
{
diff --git a/tests/SP/Domain/Account/Services/AccountToUserGroupServiceTest.php b/tests/SP/Domain/Account/Services/AccountToUserGroupServiceTest.php
index 82bcd03f..f89f758b 100644
--- a/tests/SP/Domain/Account/Services/AccountToUserGroupServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountToUserGroupServiceTest.php
@@ -28,6 +28,9 @@ use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
use SP\Domain\Account\Services\AccountToUserGroupService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\UnitaryTestCase;
@@ -43,9 +46,9 @@ class AccountToUserGroupServiceTest extends UnitaryTestCase
private AccountToUserGroupRepositoryInterface|MockObject $accountToUserGroupRepository;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetUserGroupsByAccountId()
{
@@ -78,9 +81,9 @@ class AccountToUserGroupServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws QueryException
+ * @throws ConstraintException
+ * @throws SPException
*/
public function testGetUserGroupsByAccountIdWithNoUserGroups()
{
diff --git a/tests/SP/Domain/Account/Services/AccountToUserServiceTest.php b/tests/SP/Domain/Account/Services/AccountToUserServiceTest.php
index 04844036..21ed1dfd 100644
--- a/tests/SP/Domain/Account/Services/AccountToUserServiceTest.php
+++ b/tests/SP/Domain/Account/Services/AccountToUserServiceTest.php
@@ -28,6 +28,9 @@ use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\ItemData;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
use SP\Domain\Account\Services\AccountToUserService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\QueryResult;
use SP\Tests\UnitaryTestCase;
@@ -43,9 +46,9 @@ class AccountToUserServiceTest extends UnitaryTestCase
private AccountToUserService $accountToUserService;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetUsersByAccountId()
{
@@ -79,9 +82,9 @@ class AccountToUserServiceTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testGetUsersByAccountIdWithNoUsers()
{
diff --git a/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php b/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php
index 0791dd1a..afa44a0a 100644
--- a/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php
+++ b/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php
@@ -28,9 +28,6 @@ use Defuse\Crypto\Exception\CryptoException;
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\Domain\Account\Ports\AccountServiceInterface;
@@ -40,6 +37,9 @@ use SP\Domain\Common\Models\Simple;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Context\ContextInterface;
use SP\Domain\Core\Crypt\CryptInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Http\RequestInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Database\QueryResult;
diff --git a/tests/SP/Domain/Api/Services/ApiServiceTest.php b/tests/SP/Domain/Api/Services/ApiServiceTest.php
index fd4f0213..1b677e41 100644
--- a/tests/SP/Domain/Api/Services/ApiServiceTest.php
+++ b/tests/SP/Domain/Api/Services/ApiServiceTest.php
@@ -31,10 +31,6 @@ use ReflectionClass;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\CryptException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\InvalidClassException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\Domain\Api\Ports\ApiRequestInterface;
use SP\Domain\Api\Services\ApiService;
@@ -42,6 +38,10 @@ use SP\Domain\Auth\Ports\AuthTokenServiceInterface;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\CryptException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\InvalidClassException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
diff --git a/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php b/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php
index 054e58d2..b23e91f7 100644
--- a/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php
+++ b/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php
@@ -32,10 +32,10 @@ use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\UuidCookie;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\CryptException;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Crypt\CryptInterface;
use SP\Domain\Core\Crypt\RequestBasedPasswordInterface;
+use SP\Domain\Core\Exceptions\CryptException;
use SP\Domain\Crypt\Services\SecureSessionService;
use SP\Infrastructure\File\FileCacheInterface;
use SP\Infrastructure\File\FileException;
diff --git a/tests/SP/Domain/Export/Services/FileBackupServiceTest.php b/tests/SP/Domain/Export/Services/FileBackupServiceTest.php
index 21a57d8e..96279572 100644
--- a/tests/SP/Domain/Export/Services/FileBackupServiceTest.php
+++ b/tests/SP/Domain/Export/Services/FileBackupServiceTest.php
@@ -24,12 +24,14 @@
namespace SP\Tests\Domain\Export\Services;
+use PDO;
+use PDOStatement;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Export\Ports\BackupFilesInterface;
use SP\Domain\Export\Services\FileBackupService;
use SP\Infrastructure\Database\DatabaseInterface;
@@ -43,8 +45,6 @@ use SP\Infrastructure\File\FileHandlerInterface;
use SP\Tests\UnitaryTestCase;
use stdClass;
-use function SP\__u;
-
/**
* Class FileBackupServiceTest
*
@@ -90,10 +90,10 @@ class FileBackupServiceTest extends UnitaryTestCase
)
->willReturn(...$queryResults);
- $statement = $this->createMock(\PDOStatement::class);
+ $statement = $this->createMock(PDOStatement::class);
$statement->expects(self::exactly($tablesCount - 1))
->method('fetch')
- ->with(\PDO::FETCH_NUM)
+ ->with(PDO::FETCH_NUM)
->willReturn(['value1', 2, null], false);
$this->database
@@ -103,7 +103,7 @@ class FileBackupServiceTest extends UnitaryTestCase
new Callback(static function (QueryData $queryData) {
return preg_match('/^SELECT \* FROM `\w+`$/', $queryData->getQuery()) === 1;
}),
- [\PDO::ATTR_CURSOR => \PDO::CURSOR_SCROLL],
+ [PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL],
false
)
->willReturn($statement);
diff --git a/tests/SP/Domain/Install/Services/InstallerTest.php b/tests/SP/Domain/Install/Services/InstallerTest.php
index 2545dc80..0d01c969 100644
--- a/tests/SP/Domain/Install/Services/InstallerTest.php
+++ b/tests/SP/Domain/Install/Services/InstallerTest.php
@@ -25,9 +25,11 @@
namespace SP\Tests\Domain\Install\Services;
use Exception;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\SPException;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\MockObject\Stub;
use SP\Domain\Config\Ports\ConfigServiceInterface;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
use SP\Domain\Install\Ports\InstallerServiceInterface;
use SP\Domain\Install\Services\DatabaseSetupInterface;
@@ -35,6 +37,7 @@ use SP\Domain\Install\Services\InstallerService;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Domain\User\Ports\UserServiceInterface;
+use SP\Domain\User\Services\UserService;
use SP\Http\RequestInterface;
use SP\Infrastructure\Database\DatabaseConnectionData;
use SP\Tests\UnitaryTestCase;
@@ -48,27 +51,27 @@ use SP\Util\VersionUtil;
class InstallerTest extends UnitaryTestCase
{
/**
- * @var \PHPUnit\Framework\MockObject\MockObject|\SP\Domain\Install\Services\DatabaseSetupInterface
+ * @var MockObject|DatabaseSetupInterface
*/
private $databaseSetup;
/**
- * @var \PHPUnit\Framework\MockObject\MockObject|\SP\Domain\User\Services\UserService
+ * @var MockObject|UserService
*/
private $userService;
/**
- * @var \PHPUnit\Framework\MockObject\Stub|RequestInterface
+ * @var Stub|RequestInterface
*/
private $request;
/**
- * @var \PHPUnit\Framework\MockObject\MockObject|\SP\Domain\Config\Ports\ConfigServiceInterface
+ * @var MockObject|ConfigServiceInterface
*/
private $configService;
/**
- * @var \PHPUnit\Framework\MockObject\MockObject|\SP\Domain\User\Ports\UserGroupServiceInterface
+ * @var MockObject|UserGroupServiceInterface
*/
private $userGroupService;
/**
- * @var \PHPUnit\Framework\MockObject\MockObject|\SP\Domain\User\Ports\UserProfileServiceInterface
+ * @var MockObject|UserProfileServiceInterface
*/
private $userProfileService;
@@ -112,7 +115,7 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @return \SP\Domain\Install\Adapters\InstallData
+ * @return InstallData
*/
private function getInstallData(): InstallData
{
@@ -130,7 +133,7 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @return \SP\Domain\Install\Ports\InstallerServiceInterface
+ * @return InstallerServiceInterface
*/
private function getDefaultInstaller(): InstallerServiceInterface
{
@@ -147,8 +150,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testSocketIsUsedForDBConnection(): void
{
@@ -173,8 +176,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testLocalhostIsUsedForDBConnection(): void
{
@@ -194,8 +197,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testHostAndPortAreUsedForDBConnection(): void
{
@@ -217,8 +220,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testHostingModeIsUsed(): void
{
@@ -239,8 +242,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testAdminUserIsNotCreated(): void
{
@@ -259,8 +262,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
*/
public function testConfigIsNotSaved(): void
{
@@ -280,8 +283,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testAdminLoginIsNotBlank(): void
{
@@ -297,8 +300,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testAdminPassIsNotBlank(): void
{
@@ -314,8 +317,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testMasterPasswordIsNotBlank(): void
{
@@ -331,8 +334,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testMasterPasswordLengthIsWrong(): void
{
@@ -348,8 +351,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testDbAdminUserIsWrong(): void
{
@@ -365,8 +368,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testDbAdminPassIsWrong(): void
{
@@ -382,8 +385,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testDbNameIsBlank(): void
{
@@ -399,8 +402,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testDbNameIsWrong(): void
{
@@ -416,8 +419,8 @@ class InstallerTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\InvalidArgumentException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws InvalidArgumentException
+ * @throws SPException
**/
public function testDbHostIsBlank(): void
{
diff --git a/tests/SP/Domain/Install/Services/MySQLTest.php b/tests/SP/Domain/Install/Services/MySQLTest.php
index 6930d6d9..ddaa425a 100644
--- a/tests/SP/Domain/Install/Services/MySQLTest.php
+++ b/tests/SP/Domain/Install/Services/MySQLTest.php
@@ -26,10 +26,12 @@ namespace SP\Tests\Domain\Install\Services;
use PDO;
use PDOException;
+use PDOStatement;
use PHPUnit\Framework\Constraint\Callback;
+use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Install\Adapters\InstallData;
use SP\Domain\Install\Services\MysqlService;
use SP\Infrastructure\Database\DatabaseFileInterface;
@@ -37,6 +39,7 @@ use SP\Infrastructure\Database\DatabaseUtil;
use SP\Infrastructure\Database\DbStorageInterface;
use SP\Infrastructure\File\FileException;
use SP\Tests\UnitaryTestCase;
+
use function SP\__;
use function SP\__u;
@@ -56,7 +59,7 @@ class MySQLTest extends UnitaryTestCase
private DatabaseUtil|MockObject $databaseUtil;
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testConnectDatabaseIsSuccessful(): void
{
@@ -66,7 +69,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testConnectDatabaseIsNotSuccessful(): void
{
@@ -83,13 +86,13 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testSetupUserIsSuccessful(): void
{
$query = 'SELECT COUNT(*) FROM mysql.user WHERE `user` = ? AND (`host` = ? OR `host` = ?)';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -125,7 +128,7 @@ class MySQLTest extends UnitaryTestCase
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -142,7 +145,7 @@ class MySQLTest extends UnitaryTestCase
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -156,14 +159,14 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
- * @throws \PHPUnit\Framework\MockObject\Exception
+ * @throws SPException
+ * @throws Exception
*/
public function testCreateDatabaseIsSuccessful(): void
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -209,7 +212,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDatabaseIsSuccessfulInHostingMode(): void
{
@@ -228,13 +231,13 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDatabaseIsNotSuccessfulWithDuplicateDatabase(): void
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -251,14 +254,14 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
- * @throws \PHPUnit\Framework\MockObject\Exception
+ * @throws SPException
+ * @throws Exception
*/
public function testCreateDatabaseIsSuccessfulWithDns(): void
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -315,13 +318,13 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDatabaseIsNotSuccessfulWithCreateError(): void
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -348,14 +351,14 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
- * @throws \PHPUnit\Framework\MockObject\Exception
+ * @throws SPException
+ * @throws Exception
*/
public function testCreateDatabaseIsNotSuccessfulWithPermissionError(): void
{
$query = 'SELECT COUNT(*) FROM information_schema.schemata WHERE `schema_name` = ? LIMIT 1';
- $pdoStatement = $this->createMock(\PDOStatement::class);
+ $pdoStatement = $this->createMock(PDOStatement::class);
$this->pdo->expects(self::once())->method('prepare')->with($query)->willReturn($pdoStatement);
$pdoStatement->expects(self::once())->method('execute')->with(
@@ -421,7 +424,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDatabaseIsNotSuccessfulInHostingMode(): void
{
@@ -531,7 +534,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBStructureIsSuccessful(): void
{
@@ -556,7 +559,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBStructureIsNotSuccessfulWithUseDatabaseError(): void
{
@@ -580,7 +583,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBStructureIsNotSuccessfulWithCreateSchemaError(): void
{
@@ -624,7 +627,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBStructureIsNotSuccessfulWithParseSchemaError(): void
{
@@ -659,7 +662,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCheckConnectionIsSuccessful(): void
{
@@ -672,7 +675,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCheckConnectionIsNotSuccessful(): void
{
@@ -701,7 +704,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBUserIsSuccessful(): void
{
@@ -732,7 +735,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBUserIsSuccessfulWithDns(): void
{
@@ -773,7 +776,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBUserIsSuccessfulWithHostingMode(): void
{
@@ -788,7 +791,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testCreateDBUserIsNotSuccessful(): void
{
@@ -806,7 +809,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
protected function setUp(): void
{
@@ -832,7 +835,7 @@ class MySQLTest extends UnitaryTestCase
}
/**
- * @return \SP\Domain\Install\Adapters\InstallData
+ * @return InstallData
*/
private function getInstallData(): InstallData
{
diff --git a/tests/SP/Http/AddressTest.php b/tests/SP/Http/AddressTest.php
index 722e41e5..d2ffe5b1 100644
--- a/tests/SP/Http/AddressTest.php
+++ b/tests/SP/Http/AddressTest.php
@@ -25,7 +25,7 @@
namespace SP\Tests\Http;
use Faker\Factory;
-use SP\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
use SP\Http\Address;
use SP\Tests\UnitaryTestCase;
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountFileRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountFileRepositoryTest.php
index 89c94a12..303808c5 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountFileRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountFileRepositoryTest.php
@@ -30,6 +30,8 @@ use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\FileData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountFileRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -48,8 +50,8 @@ class AccountFileRepositoryTest extends UnitaryTestCase
private AccountFileRepository $accountFileRepository;
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByIdBatch(): void
{
@@ -76,8 +78,8 @@ class AccountFileRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByIdBatchWithNoIds(): void
{
@@ -88,8 +90,8 @@ class AccountFileRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testCreate(): void
{
@@ -145,8 +147,8 @@ class AccountFileRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDelete(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountHistoryRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountHistoryRepositoryTest.php
index fd032bba..666dcd05 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountHistoryRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountHistoryRepositoryTest.php
@@ -31,6 +31,8 @@ use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
use SP\Domain\Account\Dtos\EncryptedPassword;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountHistoryRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -89,8 +91,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByIdBatch(): void
{
@@ -117,8 +119,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByIdBatchWithoutIds(): void
{
@@ -129,8 +131,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testUpdatePassword(): void
{
@@ -223,8 +225,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testCreate(): void
{
@@ -287,8 +289,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDelete(): void
{
@@ -312,8 +314,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteNoResults(): void
{
@@ -355,8 +357,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByAccountIdBatch(): void
{
@@ -383,8 +385,8 @@ class AccountHistoryRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByAccountIdBatchWithoutIds(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountRepositoryTest.php
index 4ad65d7f..4779cafb 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountRepositoryTest.php
@@ -34,6 +34,9 @@ use SP\Domain\Account\Models\AccountDataView;
use SP\Domain\Account\Models\AccountSearchView;
use SP\Domain\Account\Ports\AccountFilterUserInterface;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Account\Repositories\AccountRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -111,8 +114,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testIncrementDecryptCounter(): void
{
@@ -134,8 +137,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementDecryptCounterNoRows(): void
{
@@ -157,8 +160,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testCreate(): void
{
@@ -197,8 +200,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testEditPassword(): void
{
@@ -224,8 +227,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testUpdatePassword(): void
{
@@ -250,8 +253,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testEditRestore(): void
{
@@ -290,8 +293,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDelete(): void
{
@@ -310,8 +313,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteWithouResults(): void
{
@@ -333,7 +336,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdate(): void
{
@@ -370,7 +373,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateWithoutGroup(): void
{
@@ -407,7 +410,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateWithoutOwner(): void
{
@@ -444,7 +447,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateBulk(): void
{
@@ -474,7 +477,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateBulkWithoutOwner(): void
{
@@ -506,7 +509,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateBulkWithoutGroup(): void
{
@@ -536,7 +539,7 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
public function testUpdateBulkNoFieldsToUpdate(): void
{
@@ -600,8 +603,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByIdBatch(): void
{
@@ -626,8 +629,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByIdBatchWithNoIds(): void
{
@@ -677,8 +680,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testIncrementViewCounter(): void
{
@@ -701,8 +704,8 @@ class AccountRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testIncrementViewCounterNoRows(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepositoryTest.php
index 8a3791c4..4037f553 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountToFavoriteRepositoryTest.php
@@ -28,6 +28,8 @@ use Aura\SqlQuery\QueryFactory;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToFavoriteRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -95,8 +97,8 @@ class AccountToFavoriteRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testAdd()
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountToTagRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountToTagRepositoryTest.php
index d45ec266..5ab84be9 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountToTagRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountToTagRepositoryTest.php
@@ -26,8 +26,12 @@ namespace SP\Tests\Infrastructure\Account\Repositories;
use Aura\SqlQuery\QueryFactory;
use PHPUnit\Framework\Constraint\Callback;
+use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
+use SP\Core\Context\ContextException;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToTagRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -68,8 +72,8 @@ class AccountToTagRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByAccountId(): void
{
@@ -98,8 +102,8 @@ class AccountToTagRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testAdd(): void
{
@@ -133,8 +137,8 @@ class AccountToTagRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Context\ContextException
- * @throws \PHPUnit\Framework\MockObject\Exception
+ * @throws ContextException
+ * @throws Exception
*/
protected function setUp(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepositoryTest.php
index 07cb5f5b..41d6d3aa 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountToUserGroupRepositoryTest.php
@@ -28,6 +28,8 @@ use Aura\SqlQuery\QueryFactory;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\ItemData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToUserGroupRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -45,8 +47,8 @@ class AccountToUserGroupRepositoryTest extends UnitaryTestCase
private AccountToUserGroupRepository $accountToUserGroupRepository;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteTypeByAccountId(): void
{
@@ -98,8 +100,8 @@ class AccountToUserGroupRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByUserGroupId(): void
{
@@ -129,8 +131,8 @@ class AccountToUserGroupRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testAddByType(): void
{
@@ -153,8 +155,8 @@ class AccountToUserGroupRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByAccountId(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/AccountToUserRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/AccountToUserRepositoryTest.php
index 8924910a..3be3cc3c 100644
--- a/tests/SP/Infrastructure/Account/Repositories/AccountToUserRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/AccountToUserRepositoryTest.php
@@ -28,6 +28,8 @@ use Aura\SqlQuery\QueryFactory;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\ItemData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToUserRepository;
use SP\Infrastructure\Database\DatabaseInterface;
use SP\Infrastructure\Database\QueryData;
@@ -45,8 +47,8 @@ class AccountToUserRepositoryTest extends UnitaryTestCase
private AccountToUserRepository $accountToUserRepository;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteTypeByAccountId(): void
{
@@ -98,8 +100,8 @@ class AccountToUserRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByUserGroupId(): void
{
@@ -129,8 +131,8 @@ class AccountToUserRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testAddByType(): void
{
@@ -153,8 +155,8 @@ class AccountToUserRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByAccountId(): void
{
diff --git a/tests/SP/Infrastructure/Account/Repositories/PublicLinkRepositoryTest.php b/tests/SP/Infrastructure/Account/Repositories/PublicLinkRepositoryTest.php
index aae8e07d..d4cdd1c0 100644
--- a/tests/SP/Infrastructure/Account/Repositories/PublicLinkRepositoryTest.php
+++ b/tests/SP/Infrastructure/Account/Repositories/PublicLinkRepositoryTest.php
@@ -30,6 +30,9 @@ use PHPUnit\Framework\MockObject\MockObject;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\Domain\Common\Models\Simple;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Account\Repositories\PublicLinkRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Database\DatabaseInterface;
@@ -49,8 +52,8 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
private MockObject|DatabaseInterface $database;
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDelete(): void
{
@@ -140,8 +143,8 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testAddLinkView(): void
{
@@ -192,9 +195,9 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\DuplicatedItemException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws DuplicatedItemException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testCreate(): void
{
@@ -234,9 +237,9 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Infrastructure\Common\Repositories\DuplicatedItemException
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws DuplicatedItemException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testCreateWithDuplicate(): void
{
@@ -281,9 +284,9 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\SPException
+ * @throws ConstraintException
+ * @throws QueryException
+ * @throws SPException
*/
public function testRefresh(): void
{
@@ -312,8 +315,8 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\QueryException
- * @throws \SP\Core\Exceptions\ConstraintException
+ * @throws QueryException
+ * @throws ConstraintException
*/
public function testDeleteByIdBatch(): void
{
@@ -340,8 +343,8 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testDeleteByIdBatchWithNoIds(): void
{
@@ -372,8 +375,8 @@ class PublicLinkRepositoryTest extends UnitaryTestCase
}
/**
- * @throws \SP\Core\Exceptions\ConstraintException
- * @throws \SP\Core\Exceptions\QueryException
+ * @throws ConstraintException
+ * @throws QueryException
*/
public function testUpdate(): void
{
diff --git a/tests/SP/Modules/Api/ApiTestCase.php b/tests/SP/Modules/Api/ApiTestCase.php
index 92927e0d..b83871e1 100644
--- a/tests/SP/Modules/Api/ApiTestCase.php
+++ b/tests/SP/Modules/Api/ApiTestCase.php
@@ -38,9 +38,6 @@ use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use RuntimeException;
use SP\Core\Bootstrap\BootstrapApi;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\Domain\Api\Services\ApiRequest;
use SP\Domain\Auth\Services\AuthTokenService;
@@ -48,6 +45,9 @@ use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Config\Ports\ConfigInterface;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Database\DatabaseConnectionData;
use SP\Infrastructure\Database\DbStorageInterface;
use SP\Infrastructure\Database\MysqlHandler;
diff --git a/tests/SP/Modules/Cli/Commands/BackupCommandTest.php b/tests/SP/Modules/Cli/Commands/BackupCommandTest.php
index 4de0bcc3..f3cb9449 100644
--- a/tests/SP/Modules/Cli/Commands/BackupCommandTest.php
+++ b/tests/SP/Modules/Cli/Commands/BackupCommandTest.php
@@ -26,11 +26,12 @@ namespace SP\Tests\Modules\Cli\Commands;
use DI\DependencyException;
use DI\NotFoundException;
-use SP\Core\Exceptions\FileNotFoundException;
use SP\Domain\Config\Services\ConfigFileService;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\Export\Services\BackupFiles;
use SP\Modules\Cli\Commands\BackupCommand;
use SP\Tests\Modules\Cli\CliTestCase;
+
use function SP\Tests\recreateDir;
/**
diff --git a/tests/SP/Modules/Cli/Commands/UpdateMasterPasswordCommandTest.php b/tests/SP/Modules/Cli/Commands/UpdateMasterPasswordCommandTest.php
index 52c5976c..e102dc2c 100644
--- a/tests/SP/Modules/Cli/Commands/UpdateMasterPasswordCommandTest.php
+++ b/tests/SP/Modules/Cli/Commands/UpdateMasterPasswordCommandTest.php
@@ -26,11 +26,12 @@ namespace SP\Tests\Modules\Cli\Commands;
use DI\DependencyException;
use DI\NotFoundException;
-use SP\Core\Exceptions\FileNotFoundException;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Modules\Cli\Commands\Crypt\UpdateMasterPasswordCommand;
use SP\Tests\DatabaseTrait;
use SP\Tests\Modules\Cli\CliTestCase;
use SP\Tests\Services\Account\AccountCryptServiceTest;
+
use function SP\Tests\recreateDir;
/**
@@ -192,8 +193,8 @@ class UpdateMasterPasswordCommandTest extends CliTestCase
}
/**
- * @throws \DI\DependencyException
- * @throws \DI\NotFoundException
+ * @throws DependencyException
+ * @throws NotFoundException
*/
public function testSameMasterPassword(): void
{
@@ -214,8 +215,8 @@ class UpdateMasterPasswordCommandTest extends CliTestCase
}
/**
- * @throws \DI\DependencyException
- * @throws \DI\NotFoundException
+ * @throws DependencyException
+ * @throws NotFoundException
*/
public function testWrongMasterPassword(): void
{
diff --git a/tests/SP/Mvc/Controller/Validators/PasswordValidatorTest.php b/tests/SP/Mvc/Controller/Validators/PasswordValidatorTest.php
index 629199b4..a5caff41 100644
--- a/tests/SP/Mvc/Controller/Validators/PasswordValidatorTest.php
+++ b/tests/SP/Mvc/Controller/Validators/PasswordValidatorTest.php
@@ -25,8 +25,8 @@
namespace SP\Tests\Mvc\Controller\Validators;
use PHPUnit\Framework\TestCase;
-use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ItemPreset\Password;
+use SP\Domain\Core\Exceptions\ValidationException;
use SP\Mvc\Controller\Validators\PasswordValidator;
/**
diff --git a/tests/SP/Providers/Acl/AclHandlerTest.php b/tests/SP/Providers/Acl/AclHandlerTest.php
index 64b80b2f..a69670f1 100644
--- a/tests/SP/Providers/Acl/AclHandlerTest.php
+++ b/tests/SP/Providers/Acl/AclHandlerTest.php
@@ -28,7 +28,7 @@ use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupServiceInterface;
use SP\Domain\User\Ports\UserProfileServiceInterface;
use SP\Providers\Acl\AclHandler;
diff --git a/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php b/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php
index fae9ebaf..b1fae294 100644
--- a/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php
+++ b/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php
@@ -28,12 +28,12 @@ use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Rule\InvokedCount;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
use SP\Domain\Auth\Ports\LdapActionsInterface;
use SP\Domain\Auth\Ports\LdapInterface;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Providers\Auth\Ldap\AttributeCollection;
use SP\Providers\Auth\Ldap\LdapAuth;
use SP\Providers\Auth\Ldap\LdapException;
diff --git a/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php b/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php
index f06c11c9..85af2451 100644
--- a/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php
+++ b/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php
@@ -25,10 +25,10 @@
namespace SP\Tests\Providers\Auth\Ldap;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Ports\LdapActionsInterface;
use SP\Domain\Auth\Ports\LdapConnectionInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Providers\Auth\Ldap\LdapException;
use SP\Providers\Auth\Ldap\LdapMsAds;
use SP\Providers\Auth\Ldap\LdapParams;
diff --git a/tests/SP/Providers/Auth/Ldap/LdapStdTest.php b/tests/SP/Providers/Auth/Ldap/LdapStdTest.php
index 964e16d8..42119340 100644
--- a/tests/SP/Providers/Auth/Ldap/LdapStdTest.php
+++ b/tests/SP/Providers/Auth/Ldap/LdapStdTest.php
@@ -25,10 +25,10 @@
namespace SP\Tests\Providers\Auth\Ldap;
use PHPUnit\Framework\MockObject\MockObject;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Auth\Ports\LdapActionsInterface;
use SP\Domain\Auth\Ports\LdapConnectionInterface;
use SP\Domain\Core\Events\EventDispatcherInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Providers\Auth\Ldap\LdapException;
use SP\Providers\Auth\Ldap\LdapParams;
use SP\Providers\Auth\Ldap\LdapStd;
diff --git a/tests/SP/Repositories/AccountFileRepositoryTest.php b/tests/SP/Repositories/AccountFileRepositoryTest.php
index aa6abc95..8c388570 100644
--- a/tests/SP/Repositories/AccountFileRepositoryTest.php
+++ b/tests/SP/Repositories/AccountFileRepositoryTest.php
@@ -27,14 +27,15 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\FileData;
use SP\DataModel\FileExtData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Ports\AccountFileRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountFileRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -45,7 +46,7 @@ use function SP\Tests\setupContext;
class AccountFileRepositoryTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Account\Ports\AccountFileRepositoryInterface
+ * @var AccountFileRepositoryInterface
*/
private static $repository;
diff --git a/tests/SP/Repositories/AccountHistoryRepositoryTest.php b/tests/SP/Repositories/AccountHistoryRepositoryTest.php
index 74cb3440..a8ddc862 100644
--- a/tests/SP/Repositories/AccountHistoryRepositoryTest.php
+++ b/tests/SP/Repositories/AccountHistoryRepositoryTest.php
@@ -28,17 +28,18 @@ use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
use SP\Domain\Account\Dtos\AccountPasswordRequest;
use SP\Domain\Account\Models\AccountHistory;
use SP\Domain\Account\Ports\AccountHistoryRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Account\Repositories\AccountHistoryRepository;
use SP\Tests\DatabaseTestCase;
use SP\Util\PasswordUtil;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/AccountToFavoriteRepositoryTest.php b/tests/SP/Repositories/AccountToFavoriteRepositoryTest.php
index efe0fe37..1b2c5478 100644
--- a/tests/SP/Repositories/AccountToFavoriteRepositoryTest.php
+++ b/tests/SP/Repositories/AccountToFavoriteRepositoryTest.php
@@ -27,11 +27,12 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Ports\AccountToFavoriteRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToFavoriteRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -42,7 +43,7 @@ use function SP\Tests\setupContext;
class AccountToFavoriteRepositoryTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Account\Ports\AccountToFavoriteRepositoryInterface
+ * @var AccountToFavoriteRepositoryInterface
*/
private static $repository;
diff --git a/tests/SP/Repositories/AccountToTagRepositoryTest.php b/tests/SP/Repositories/AccountToTagRepositoryTest.php
index 01bcb3fe..5bd55a03 100644
--- a/tests/SP/Repositories/AccountToTagRepositoryTest.php
+++ b/tests/SP/Repositories/AccountToTagRepositoryTest.php
@@ -27,13 +27,14 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Account\Ports\AccountToTagRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToTagRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/AccountToUserGroupRepositoryTest.php b/tests/SP/Repositories/AccountToUserGroupRepositoryTest.php
index 5166ea21..47cf714a 100644
--- a/tests/SP/Repositories/AccountToUserGroupRepositoryTest.php
+++ b/tests/SP/Repositories/AccountToUserGroupRepositoryTest.php
@@ -27,13 +27,14 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Account\Ports\AccountToUserGroupRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToUserGroupRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/AccountToUserRepositoryTest.php b/tests/SP/Repositories/AccountToUserRepositoryTest.php
index f3113a09..0a2e5552 100644
--- a/tests/SP/Repositories/AccountToUserRepositoryTest.php
+++ b/tests/SP/Repositories/AccountToUserRepositoryTest.php
@@ -27,13 +27,14 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemData;
use SP\Domain\Account\Dtos\AccountRequest;
use SP\Domain\Account\Ports\AccountToUserRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Account\Repositories\AccountToUserRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/AuthTokenRepositoryTest.php b/tests/SP/Repositories/AuthTokenRepositoryTest.php
index d0e3ddc4..74161bb4 100644
--- a/tests/SP/Repositories/AuthTokenRepositoryTest.php
+++ b/tests/SP/Repositories/AuthTokenRepositoryTest.php
@@ -31,13 +31,13 @@ use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Hash;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Auth\Repositories\AuthTokenRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Tests\DatabaseTestCase;
diff --git a/tests/SP/Repositories/CategoryRepositoryTest.php b/tests/SP/Repositories/CategoryRepositoryTest.php
index 651d14f5..45f7f705 100644
--- a/tests/SP/Repositories/CategoryRepositoryTest.php
+++ b/tests/SP/Repositories/CategoryRepositoryTest.php
@@ -27,16 +27,17 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Category\Ports\CategoryRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Category\Repositories\CategoryRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -49,7 +50,7 @@ use function SP\Tests\setupContext;
class CategoryRepositoryTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Category\Ports\CategoryRepositoryInterface
+ * @var CategoryRepositoryInterface
*/
private static $repository;
diff --git a/tests/SP/Repositories/ClientRepositoryTest.php b/tests/SP/Repositories/ClientRepositoryTest.php
index d7f485fc..e1b30ff0 100644
--- a/tests/SP/Repositories/ClientRepositoryTest.php
+++ b/tests/SP/Repositories/ClientRepositoryTest.php
@@ -27,15 +27,16 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Client\Repositories\ClientRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Mvc\Model\QueryCondition;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/ConfigRepositoryTest.php b/tests/SP/Repositories/ConfigRepositoryTest.php
index 5575ea9f..78361fe4 100644
--- a/tests/SP/Repositories/ConfigRepositoryTest.php
+++ b/tests/SP/Repositories/ConfigRepositoryTest.php
@@ -27,12 +27,13 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ConfigData;
use SP\Domain\Config\Ports\ConfigRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Config\Repositories\ConfigRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/CustomFieldDefRepositoryTest.php b/tests/SP/Repositories/CustomFieldDefRepositoryTest.php
index cd12410a..beadb0bb 100644
--- a/tests/SP/Repositories/CustomFieldDefRepositoryTest.php
+++ b/tests/SP/Repositories/CustomFieldDefRepositoryTest.php
@@ -27,12 +27,12 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldDefRepositoryInterface;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\CustomField\Repositories\CustomFieldDefRepository;
diff --git a/tests/SP/Repositories/CustomFieldRepositoryTest.php b/tests/SP/Repositories/CustomFieldRepositoryTest.php
index d763a98b..f2b3de74 100644
--- a/tests/SP/Repositories/CustomFieldRepositoryTest.php
+++ b/tests/SP/Repositories/CustomFieldRepositoryTest.php
@@ -27,10 +27,10 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldData;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Ports\CustomFieldRepositoryInterface;
use SP\Infrastructure\CustomField\Repositories\CustomFieldRepository;
use SP\Tests\DatabaseTestCase;
diff --git a/tests/SP/Repositories/CustomFieldTypeRepositoryTest.php b/tests/SP/Repositories/CustomFieldTypeRepositoryTest.php
index d40a2d26..d8c3be5c 100644
--- a/tests/SP/Repositories/CustomFieldTypeRepositoryTest.php
+++ b/tests/SP/Repositories/CustomFieldTypeRepositoryTest.php
@@ -27,13 +27,14 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldTypeData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldTypeRepositoryInterface;
use SP\Infrastructure\CustomField\Repositories\CustomFieldTypeRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/EventlogRepositoryTest.php b/tests/SP/Repositories/EventlogRepositoryTest.php
index 5ff8d09a..53b47122 100644
--- a/tests/SP/Repositories/EventlogRepositoryTest.php
+++ b/tests/SP/Repositories/EventlogRepositoryTest.php
@@ -27,14 +27,15 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\EventlogRepositoryInterface;
use SP\Infrastructure\Security\Repositories\EventlogRepository;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/ItemPresetRepositoryTest.php b/tests/SP/Repositories/ItemPresetRepositoryTest.php
index 44f02132..cb950a04 100644
--- a/tests/SP/Repositories/ItemPresetRepositoryTest.php
+++ b/tests/SP/Repositories/ItemPresetRepositoryTest.php
@@ -27,13 +27,15 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Models\ItemPreset;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\ItemPreset\Ports\ItemPresetRepositoryInterface;
use SP\Infrastructure\ItemPreset\Repositories\ItemPresetRepository;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -44,7 +46,7 @@ use function SP\Tests\setupContext;
class ItemPresetRepositoryTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\ItemPreset\Ports\ItemPresetRepositoryInterface
+ * @var ItemPresetRepositoryInterface
*/
private static $repository;
diff --git a/tests/SP/Repositories/NotificationRepositoryTest.php b/tests/SP/Repositories/NotificationRepositoryTest.php
index 0cb045f0..ad903c4a 100644
--- a/tests/SP/Repositories/NotificationRepositoryTest.php
+++ b/tests/SP/Repositories/NotificationRepositoryTest.php
@@ -27,14 +27,15 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Core\Messages\NotificationMessage;
use SP\DataModel\ItemSearchData;
use SP\DataModel\NotificationData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Notification\Ports\NotificationRepositoryInterface;
use SP\Infrastructure\Notification\Repositories\NotificationRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/PluginDataRepositoryTest.php b/tests/SP/Repositories/PluginDataRepositoryTest.php
index d1945bb8..f00edab4 100644
--- a/tests/SP/Repositories/PluginDataRepositoryTest.php
+++ b/tests/SP/Repositories/PluginDataRepositoryTest.php
@@ -28,14 +28,15 @@ use Defuse\Crypto\Exception\CryptoException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginDataRepositoryInterface;
use SP\Infrastructure\Plugin\Repositories\PluginDataModel;
use SP\Infrastructure\Plugin\Repositories\PluginDataRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -86,7 +87,7 @@ class PluginDataRepositoryTest extends DatabaseTestCase
$this->assertEquals(1, $result->getNumRows());
- /** @var \SP\Infrastructure\Plugin\Repositories\PluginDataModel $itemData */
+ /** @var PluginDataModel $itemData */
$itemData = $result->getData();
$this->assertEquals($data->getData(), $itemData->getData());
@@ -177,7 +178,7 @@ class PluginDataRepositoryTest extends DatabaseTestCase
public function testGetById()
{
$result = self::$repository->getById('Authenticator');
- /** @var \SP\Infrastructure\Plugin\Repositories\PluginDataModel[] $data */
+ /** @var PluginDataModel[] $data */
$data = $result->getDataAsArray();
$this->assertEquals(2, $result->getNumRows());
@@ -250,7 +251,7 @@ class PluginDataRepositoryTest extends DatabaseTestCase
$this->assertEquals(1, $result->getNumRows());
- /** @var \SP\Infrastructure\Plugin\Repositories\PluginDataModel $itemData */
+ /** @var PluginDataModel $itemData */
$itemData = $result->getData();
$this->assertEquals($data->getName(), $itemData->getName());
@@ -288,7 +289,7 @@ class PluginDataRepositoryTest extends DatabaseTestCase
public function testGetByIdBatch()
{
$result = self::$repository->getByIdBatch(['Authenticator', 'XML Exporter', 'Test']);
- /** @var \SP\Infrastructure\Plugin\Repositories\PluginDataModel[] $data */
+ /** @var PluginDataModel[] $data */
$data = $result->getDataAsArray();
$this->assertEquals(3, $result->getNumRows());
diff --git a/tests/SP/Repositories/PluginRepositoryTest.php b/tests/SP/Repositories/PluginRepositoryTest.php
index 250e0b07..5907b030 100644
--- a/tests/SP/Repositories/PluginRepositoryTest.php
+++ b/tests/SP/Repositories/PluginRepositoryTest.php
@@ -27,15 +27,16 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginRepositoryInterface;
use SP\Infrastructure\Plugin\Repositories\PluginModel;
use SP\Infrastructure\Plugin\Repositories\PluginRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -46,7 +47,7 @@ use function SP\Tests\setupContext;
class PluginRepositoryTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Plugin\Ports\PluginRepositoryInterface
+ * @var PluginRepositoryInterface
*/
private static $repository;
diff --git a/tests/SP/Repositories/PublicLinkRepositoryTest.php b/tests/SP/Repositories/PublicLinkRepositoryTest.php
index 3fae6103..17d73164 100644
--- a/tests/SP/Repositories/PublicLinkRepositoryTest.php
+++ b/tests/SP/Repositories/PublicLinkRepositoryTest.php
@@ -28,17 +28,18 @@ use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
use SP\DataModel\PublicLinkListData;
use SP\Domain\Account\Ports\PublicLinkRepositoryInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Account\Repositories\PublicLinkRepository;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Tests\DatabaseTestCase;
use SP\Util\PasswordUtil;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/TagRepositoryTest.php b/tests/SP/Repositories/TagRepositoryTest.php
index a5551742..1bd334ed 100644
--- a/tests/SP/Repositories/TagRepositoryTest.php
+++ b/tests/SP/Repositories/TagRepositoryTest.php
@@ -27,17 +27,18 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TagData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Tag\Ports\TagRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Tag\Repositories\TagRepository;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/TrackRepositoryTest.php b/tests/SP/Repositories/TrackRepositoryTest.php
index 741cde3b..ed00c3cf 100644
--- a/tests/SP/Repositories/TrackRepositoryTest.php
+++ b/tests/SP/Repositories/TrackRepositoryTest.php
@@ -27,14 +27,15 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\TrackData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Security\Ports\TrackRepositoryInterface;
use SP\Infrastructure\Security\Repositories\TrackRepository;
use SP\Infrastructure\Security\Repositories\TrackRequest;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/UserGroupRepositoryTest.php b/tests/SP/Repositories/UserGroupRepositoryTest.php
index fe773f85..6d66f076 100644
--- a/tests/SP/Repositories/UserGroupRepositoryTest.php
+++ b/tests/SP/Repositories/UserGroupRepositoryTest.php
@@ -27,15 +27,16 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserGroupData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserGroupRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\User\Repositories\UserGroupRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/UserPassRecoverRepositoryTest.php b/tests/SP/Repositories/UserPassRecoverRepositoryTest.php
index b18179de..6c2530ca 100644
--- a/tests/SP/Repositories/UserPassRecoverRepositoryTest.php
+++ b/tests/SP/Repositories/UserPassRecoverRepositoryTest.php
@@ -28,13 +28,14 @@ use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserPassRecoverRepositoryInterface;
use SP\Infrastructure\User\Repositories\UserPassRecoverRepository;
use SP\Tests\DatabaseTestCase;
use SP\Util\PasswordUtil;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/UserProfileRepositoryTest.php b/tests/SP/Repositories/UserProfileRepositoryTest.php
index 52c7938c..3cd1052a 100644
--- a/tests/SP/Repositories/UserProfileRepositoryTest.php
+++ b/tests/SP/Repositories/UserProfileRepositoryTest.php
@@ -27,17 +27,18 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\ProfileData;
use SP\DataModel\UserProfileData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserProfileRepositoryInterface;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\User\Repositories\UserProfileRepository;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/UserRepositoryTest.php b/tests/SP/Repositories/UserRepositoryTest.php
index 2685d942..3b1a6ed8 100644
--- a/tests/SP/Repositories/UserRepositoryTest.php
+++ b/tests/SP/Repositories/UserRepositoryTest.php
@@ -30,18 +30,19 @@ use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserRepositoryInterface;
use SP\Domain\User\Services\UpdatePassRequest;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\User\Repositories\UserRepository;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Repositories/UserToUserGroupRepositoryTest.php b/tests/SP/Repositories/UserToUserGroupRepositoryTest.php
index 2153625e..0cc0deef 100644
--- a/tests/SP/Repositories/UserToUserGroupRepositoryTest.php
+++ b/tests/SP/Repositories/UserToUserGroupRepositoryTest.php
@@ -27,12 +27,13 @@ namespace SP\Tests\Repositories;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\UserToUserGroupData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserToUserGroupRepositoryInterface;
use SP\Infrastructure\User\Repositories\UserToUserGroupRepository;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/Api/ApiServiceTest.php b/tests/SP/Services/Api/ApiServiceTest.php
index ba144ea5..68c6030e 100644
--- a/tests/SP/Services/Api/ApiServiceTest.php
+++ b/tests/SP/Services/Api/ApiServiceTest.php
@@ -28,12 +28,12 @@ use Closure;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Api\Ports\ApiServiceInterface;
use SP\Domain\Api\Services\ApiRequest;
use SP\Domain\Api\Services\ApiService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Tests\DatabaseTestCase;
use function SP\Tests\getResource;
diff --git a/tests/SP/Services/AuthToken/AuthTokenServiceTest.php b/tests/SP/Services/AuthToken/AuthTokenServiceTest.php
index a200a9ef..ad4585a3 100644
--- a/tests/SP/Services/AuthToken/AuthTokenServiceTest.php
+++ b/tests/SP/Services/AuthToken/AuthTokenServiceTest.php
@@ -32,15 +32,15 @@ use Exception;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Hash;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AuthTokenData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Auth\Services\AuthTokenService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
diff --git a/tests/SP/Services/Category/CategoryServiceTest.php b/tests/SP/Services/Category/CategoryServiceTest.php
index d492ba3b..13def569 100644
--- a/tests/SP/Services/Category/CategoryServiceTest.php
+++ b/tests/SP/Services/Category/CategoryServiceTest.php
@@ -27,17 +27,19 @@ namespace SP\Tests\Services\Category;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CategoryData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Category\Ports\CategoryServiceInterface;
use SP\Domain\Category\Services\CategoryService;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -48,7 +50,7 @@ use function SP\Tests\setupContext;
class CategoryServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Category\Ports\CategoryServiceInterface
+ * @var CategoryServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/Client/ClientServiceTest.php b/tests/SP/Services/Client/ClientServiceTest.php
index 03846344..620f1c29 100644
--- a/tests/SP/Services/Client/ClientServiceTest.php
+++ b/tests/SP/Services/Client/ClientServiceTest.php
@@ -28,15 +28,15 @@ use Closure;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ClientData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Client\Ports\ClientServiceInterface;
use SP\Domain\Client\Services\ClientService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/tests/SP/Services/Config/ConfigServiceTest.php b/tests/SP/Services/Config/ConfigServiceTest.php
index c8d1745e..6fea5006 100644
--- a/tests/SP/Services/Config/ConfigServiceTest.php
+++ b/tests/SP/Services/Config/ConfigServiceTest.php
@@ -27,15 +27,16 @@ namespace SP\Tests\Services\Config;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ConfigData;
use SP\DataModel\Dto\ConfigRequest;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigServiceInterface;
use SP\Domain\Config\Services\ConfigService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -114,7 +115,7 @@ class ConfigServiceTest extends DatabaseTestCase
* @throws NoSuchItemException
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testSave()
{
@@ -128,7 +129,7 @@ class ConfigServiceTest extends DatabaseTestCase
* @throws NoSuchItemException
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreate()
{
diff --git a/tests/SP/Services/Crypt/MasterPassServiceTest.php b/tests/SP/Services/Crypt/MasterPassServiceTest.php
index 0054ea91..46d4f590 100644
--- a/tests/SP/Services/Crypt/MasterPassServiceTest.php
+++ b/tests/SP/Services/Crypt/MasterPassServiceTest.php
@@ -30,15 +30,20 @@ use DI\NotFoundException;
use Exception;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Account\Ports\AccountServiceInterface;
use SP\Domain\Account\Services\AccountService;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Crypt\Ports\MasterPassServiceInterface;
use SP\Domain\Crypt\Services\MasterPassService;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
+use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use SP\Tests\Services\Account\AccountCryptServiceTest;
+
use function SP\Tests\setupContext;
/**
@@ -49,15 +54,15 @@ use function SP\Tests\setupContext;
class MasterPassServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\CustomField\Ports\CustomFieldServiceInterface
+ * @var CustomFieldServiceInterface
*/
private static $customFieldService;
/**
- * @var \SP\Domain\Account\Ports\AccountServiceInterface
+ * @var AccountServiceInterface
*/
private static $accountService;
/**
- * @var \SP\Domain\Crypt\Ports\MasterPassServiceInterface
+ * @var MasterPassServiceInterface
*/
private static $service;
@@ -177,7 +182,7 @@ class MasterPassServiceTest extends DatabaseTestCase
/**
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCheckUserUpdateMPass()
{
@@ -187,7 +192,7 @@ class MasterPassServiceTest extends DatabaseTestCase
/**
* @throws NoSuchItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCheckMasterPassword()
{
diff --git a/tests/SP/Services/CustomField/CustomFieldCryptServiceTest.php b/tests/SP/Services/CustomField/CustomFieldCryptServiceTest.php
index 8f0abd16..3dcd510a 100644
--- a/tests/SP/Services/CustomField/CustomFieldCryptServiceTest.php
+++ b/tests/SP/Services/CustomField/CustomFieldCryptServiceTest.php
@@ -29,14 +29,17 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Crypt\Services\UpdateMasterPassRequest;
use SP\Domain\CustomField\Ports\CustomFieldCryptServiceInterface;
+use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldCryptService;
use SP\Domain\CustomField\Services\CustomFieldService;
use SP\Tests\DatabaseTestCase;
use SP\Tests\Services\Account\AccountCryptServiceTest;
+
use function SP\Tests\setupContext;
/**
@@ -47,11 +50,11 @@ use function SP\Tests\setupContext;
class CustomFieldCryptServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\CustomField\Ports\CustomFieldServiceInterface
+ * @var CustomFieldServiceInterface
*/
private static $customFieldService;
/**
- * @var \SP\Domain\CustomField\Ports\CustomFieldCryptServiceInterface
+ * @var CustomFieldCryptServiceInterface
*/
private static $service;
@@ -74,7 +77,7 @@ class CustomFieldCryptServiceTest extends DatabaseTestCase
/**
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws CryptoException
*/
public function testUpdateMasterPassword()
diff --git a/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php b/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php
index 680edd99..8ef914e8 100644
--- a/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php
+++ b/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php
@@ -27,12 +27,12 @@ namespace SP\Tests\Services\CustomField;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\CustomFieldDefinitionData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\CustomField\Services\CustomFieldDefService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
diff --git a/tests/SP/Services/CustomField/CustomFieldServiceTest.php b/tests/SP/Services/CustomField/CustomFieldServiceTest.php
index ed942283..16c01e0c 100644
--- a/tests/SP/Services/CustomField/CustomFieldServiceTest.php
+++ b/tests/SP/Services/CustomField/CustomFieldServiceTest.php
@@ -29,12 +29,12 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\CustomFieldData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Acl\AclActionsInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\CustomField\Ports\CustomFieldServiceInterface;
use SP\Domain\CustomField\Services\CustomFieldService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
diff --git a/tests/SP/Services/Eventlog/EventlogServiceTest.php b/tests/SP/Services/Eventlog/EventlogServiceTest.php
index 6b81dde4..f5b123dd 100644
--- a/tests/SP/Services/Eventlog/EventlogServiceTest.php
+++ b/tests/SP/Services/Eventlog/EventlogServiceTest.php
@@ -27,15 +27,16 @@ namespace SP\Tests\Services\Eventlog;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\EventlogData;
use SP\DataModel\ItemSearchData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Security\Ports\EventlogServiceInterface;
use SP\Domain\Security\Services\EventlogService;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -46,7 +47,7 @@ use function SP\Tests\setupContext;
class EventlogServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Security\Ports\EventlogServiceInterface
+ * @var EventlogServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/Import/CsvImportTest.php b/tests/SP/Services/Import/CsvImportTest.php
index a55c0ea2..94b1e499 100644
--- a/tests/SP/Services/Import/CsvImportTest.php
+++ b/tests/SP/Services/Import/CsvImportTest.php
@@ -30,11 +30,11 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Services\AccountService;
use SP\Domain\Category\Services\CategoryService;
use SP\Domain\Client\Services\ClientService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Import\Services\CsvImport;
use SP\Domain\Import\Services\FileImport;
use SP\Domain\Import\Services\ImportException;
@@ -42,6 +42,7 @@ use SP\Domain\Import\Services\ImportParams;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\File\FileException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/Import/KeepassImportTest.php b/tests/SP/Services/Import/KeepassImportTest.php
index 5a6f9e98..3e67085c 100644
--- a/tests/SP/Services/Import/KeepassImportTest.php
+++ b/tests/SP/Services/Import/KeepassImportTest.php
@@ -30,14 +30,14 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AccountSearchVData;
use SP\Domain\Account\Search\AccountSearchFilter;
use SP\Domain\Account\Services\AccountService;
use SP\Domain\Category\Services\CategoryService;
use SP\Domain\Client\Services\ClientService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Import\Services\FileImport;
use SP\Domain\Import\Services\ImportException;
use SP\Domain\Import\Services\ImportParams;
@@ -46,6 +46,7 @@ use SP\Domain\Import\Services\XmlFileImport;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\File\FileException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/Import/SyspassImportTest.php b/tests/SP/Services/Import/SyspassImportTest.php
index 4723c3f1..f515ec72 100644
--- a/tests/SP/Services/Import/SyspassImportTest.php
+++ b/tests/SP/Services/Import/SyspassImportTest.php
@@ -30,11 +30,11 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Account\Services\AccountService;
use SP\Domain\Category\Services\CategoryService;
use SP\Domain\Client\Services\ClientService;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Import\Services\FileImport;
use SP\Domain\Import\Services\ImportException;
use SP\Domain\Import\Services\ImportParams;
@@ -43,6 +43,7 @@ use SP\Domain\Import\Services\XmlFileImport;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\File\FileException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/Import/XmlImportTest.php b/tests/SP/Services/Import/XmlImportTest.php
index 1a6933fa..06bb301d 100644
--- a/tests/SP/Services/Import/XmlImportTest.php
+++ b/tests/SP/Services/Import/XmlImportTest.php
@@ -26,7 +26,7 @@ namespace SP\Tests\Services\Import;
use DI\Container;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Import\Services\FileImport;
use SP\Domain\Import\Services\ImportException;
use SP\Domain\Import\Services\ImportParams;
@@ -34,6 +34,7 @@ use SP\Domain\Import\Services\XmlFileImport;
use SP\Domain\Import\Services\XmlImport;
use SP\Infrastructure\File\FileException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/ItemPreset/ItemPresetServiceTest.php b/tests/SP/Services/ItemPreset/ItemPresetServiceTest.php
index b59f475c..9a1201ca 100644
--- a/tests/SP/Services/ItemPreset/ItemPresetServiceTest.php
+++ b/tests/SP/Services/ItemPreset/ItemPresetServiceTest.php
@@ -27,17 +27,18 @@ namespace SP\Tests\Services\ItemPreset;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\ItemPreset\AccountPermission;
use SP\DataModel\ItemSearchData;
use SP\Domain\Account\Models\ItemPreset;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\ItemPreset\Services\ItemPresetRequest;
use SP\Domain\ItemPreset\Services\ItemPresetService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
diff --git a/tests/SP/Services/Notification/NotificationServiceTest.php b/tests/SP/Services/Notification/NotificationServiceTest.php
index c268be3b..c9adb5c1 100644
--- a/tests/SP/Services/Notification/NotificationServiceTest.php
+++ b/tests/SP/Services/Notification/NotificationServiceTest.php
@@ -27,13 +27,13 @@ namespace SP\Tests\Services\Notification;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
use SP\Core\Messages\NotificationMessage;
use SP\DataModel\ItemSearchData;
use SP\DataModel\NotificationData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Notification\Ports\NotificationServiceInterface;
use SP\Domain\Notification\Services\NotificationService;
use SP\Domain\User\Services\UserLoginResponse;
diff --git a/tests/SP/Services/Plugin/PluginDataServiceTest.php b/tests/SP/Services/Plugin/PluginDataServiceTest.php
index 5b8820f9..b2e7207e 100644
--- a/tests/SP/Services/Plugin/PluginDataServiceTest.php
+++ b/tests/SP/Services/Plugin/PluginDataServiceTest.php
@@ -28,14 +28,17 @@ use Defuse\Crypto\Exception\CryptoException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
+use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginDataServiceInterface;
use SP\Domain\Plugin\Services\PluginDataService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
+use SP\Infrastructure\Plugin\Repositories\PluginDataModel;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -71,11 +74,11 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdate()
{
- $data = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $data = new PluginDataModel();
$data->setItemId(1);
$data->setName('Authenticator');
$data->setData('data_updated');
@@ -86,7 +89,7 @@ class PluginDataServiceTest extends DatabaseTestCase
$this->assertEquals('data_updated', $itemData->getData());
- $data = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $data = new PluginDataModel();
$data->setItemId(0);
$data->setName('Authenticator');
$data->setData('data_updated');
@@ -99,11 +102,11 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUnkown()
{
- $data = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $data = new PluginDataModel();
$data->setItemId(2);
$data->setName('Test');
$data->setData('data');
@@ -163,11 +166,11 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreate()
{
- $data = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $data = new PluginDataModel();
$data->setItemId(4);
$data->setName('Authenticator');
$data->setData('data');
@@ -189,13 +192,13 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreateUnknown()
{
$this->expectException(ConstraintException::class);
- $data = new \SP\Infrastructure\Plugin\Repositories\PluginDataModel();
+ $data = new PluginDataModel();
$data->setItemId(4);
$data->setName('Test');
$data->setData('data');
@@ -209,13 +212,13 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testGetByItemId()
{
$data = self::$service->getByItemId('Authenticator', 1);
- $this->assertInstanceOf(\SP\Infrastructure\Plugin\Repositories\PluginDataModel::class, $data);
+ $this->assertInstanceOf(PluginDataModel::class, $data);
$this->assertEquals(1, $data->getItemId());
$this->assertEquals('Authenticator', $data->getName());
$this->assertEquals('data_item1', $data->getData());
@@ -227,7 +230,7 @@ class PluginDataServiceTest extends DatabaseTestCase
* @throws CryptoException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testGetByItemIdUnkown()
{
@@ -246,12 +249,12 @@ class PluginDataServiceTest extends DatabaseTestCase
$result = self::$service->getById('Authenticator');
$this->assertCount(2, $result);
- $this->assertInstanceOf(\SP\Infrastructure\Plugin\Repositories\PluginDataModel::class, $result[0]);
+ $this->assertInstanceOf(PluginDataModel::class, $result[0]);
$this->assertEquals(1, $result[0]->getItemId());
$this->assertEquals('Authenticator', $result[0]->getName());
$this->assertEquals('data_item1', $result[0]->getData());
- $this->assertInstanceOf(\SP\Infrastructure\Plugin\Repositories\PluginDataModel::class, $result[1]);
+ $this->assertInstanceOf(PluginDataModel::class, $result[1]);
$this->assertEquals(2, $result[1]->getItemId());
$this->assertEquals('Authenticator', $result[1]->getName());
$this->assertEquals('plugin_data', $result[1]->getData());
diff --git a/tests/SP/Services/Plugin/PluginOperationTest.php b/tests/SP/Services/Plugin/PluginOperationTest.php
index bc7f6177..e6ccc2ed 100644
--- a/tests/SP/Services/Plugin/PluginOperationTest.php
+++ b/tests/SP/Services/Plugin/PluginOperationTest.php
@@ -29,15 +29,16 @@ use Defuse\Crypto\Exception\CryptoException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\NoSuchPropertyException;
-use SP\Core\Exceptions\QueryException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\NoSuchPropertyException;
+use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\Plugin\Services\PluginDataService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Plugin\PluginOperation;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -75,7 +76,7 @@ class PluginOperationTest extends DatabaseTestCase
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdate()
{
@@ -101,7 +102,7 @@ class PluginOperationTest extends DatabaseTestCase
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUnknown()
{
@@ -174,7 +175,7 @@ class PluginOperationTest extends DatabaseTestCase
* @throws ConstraintException
* @throws NoSuchPropertyException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testGetUnknown()
{
diff --git a/tests/SP/Services/Plugin/PluginServiceTest.php b/tests/SP/Services/Plugin/PluginServiceTest.php
index 76b40a6e..7db51968 100644
--- a/tests/SP/Services/Plugin/PluginServiceTest.php
+++ b/tests/SP/Services/Plugin/PluginServiceTest.php
@@ -27,17 +27,18 @@ namespace SP\Tests\Services\Plugin;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
use SP\Domain\Plugin\Services\PluginService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Plugin\Repositories\PluginModel;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -48,7 +49,7 @@ use function SP\Tests\setupContext;
class PluginServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Plugin\Ports\PluginServiceInterface
+ * @var PluginServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/PublicLink/PublicLinkServiceTest.php b/tests/SP/Services/PublicLink/PublicLinkServiceTest.php
index 99d41e31..2128283c 100644
--- a/tests/SP/Services/PublicLink/PublicLinkServiceTest.php
+++ b/tests/SP/Services/PublicLink/PublicLinkServiceTest.php
@@ -30,9 +30,6 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Vault;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\AccountExtData;
use SP\DataModel\ItemSearchData;
use SP\DataModel\PublicLinkData;
@@ -42,6 +39,9 @@ use SP\Domain\Account\Services\PublicLinkService;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
use SP\Domain\Core\Crypt\VaultInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
diff --git a/tests/SP/Services/Tag/TagServiceTest.php b/tests/SP/Services/Tag/TagServiceTest.php
index da0944c4..2787ca0b 100644
--- a/tests/SP/Services/Tag/TagServiceTest.php
+++ b/tests/SP/Services/Tag/TagServiceTest.php
@@ -27,17 +27,19 @@ namespace SP\Tests\Services\Tag;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\TagData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Tag\Ports\TagServiceInterface;
use SP\Domain\Tag\Services\TagService;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -48,7 +50,7 @@ use function SP\Tests\setupContext;
class TagServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Tag\Ports\TagServiceInterface
+ * @var TagServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/Track/TrackServiceTest.php b/tests/SP/Services/Track/TrackServiceTest.php
index 0e6b356e..97a83836 100644
--- a/tests/SP/Services/Track/TrackServiceTest.php
+++ b/tests/SP/Services/Track/TrackServiceTest.php
@@ -28,15 +28,17 @@ use DI\DependencyException;
use DI\NotFoundException;
use Exception;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\InvalidArgumentException;
-use SP\Core\Exceptions\QueryException;
use SP\DataModel\TrackData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\InvalidArgumentException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Security\Ports\TrackServiceInterface;
use SP\Domain\Security\Services\TrackService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Infrastructure\Security\Repositories\TrackRequest;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -47,7 +49,7 @@ use function SP\Tests\setupContext;
class TrackServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\Security\Ports\TrackServiceInterface
+ * @var TrackServiceInterface
*/
private static $service;
@@ -87,7 +89,7 @@ class TrackServiceTest extends DatabaseTestCase
* @throws ConstraintException
* @throws InvalidArgumentException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testAdd()
{
diff --git a/tests/SP/Services/User/UserPassServiceTest.php b/tests/SP/Services/User/UserPassServiceTest.php
index 6dff3267..c55a183a 100644
--- a/tests/SP/Services/User/UserPassServiceTest.php
+++ b/tests/SP/Services/User/UserPassServiceTest.php
@@ -30,15 +30,17 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Crypt;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserLoginData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\Services\UserPassServiceInterface;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Domain\User\Services\UserPassService;
use SP\Domain\User\Services\UserService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -48,8 +50,8 @@ use function SP\Tests\setupContext;
*/
class UserPassServiceTest extends DatabaseTestCase
{
- const CURRENT_MASTERPASS = '12345678900';
- const NEW_MASTERPASS = '00123456789';
+ public const CURRENT_MASTERPASS = '12345678900';
+ public const NEW_MASTERPASS = '00123456789';
/**
* @var Closure
@@ -57,7 +59,7 @@ class UserPassServiceTest extends DatabaseTestCase
private static $getUserLoginResponse;
/**
- * @var \SP\Domain\Services\UserPassServiceInterface
+ * @var UserPassServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/User/UserServiceTest.php b/tests/SP/Services/User/UserServiceTest.php
index 0fb97256..e984c3ed 100644
--- a/tests/SP/Services/User/UserServiceTest.php
+++ b/tests/SP/Services/User/UserServiceTest.php
@@ -29,20 +29,21 @@ use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
use SP\Core\Crypt\Hash;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserData;
use SP\DataModel\UserPreferencesData;
use SP\Domain\Common\Services\ServiceException;
use SP\Domain\Config\Ports\ConfigDataInterface;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Services\UserLoginRequest;
use SP\Domain\User\Services\UserService;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -55,7 +56,7 @@ class UserServiceTest extends DatabaseTestCase
private const CURRENT_MASTERPASS = '12345678900';
/**
- * @var \SP\Domain\Config\Ports\ConfigDataInterface
+ * @var ConfigDataInterface
*/
private static $configData;
@@ -158,7 +159,7 @@ class UserServiceTest extends DatabaseTestCase
* @throws QueryException
* @throws SPException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdate()
{
@@ -199,7 +200,7 @@ class UserServiceTest extends DatabaseTestCase
* @throws QueryException
* @throws SPException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateDuplicatedLogin()
{
@@ -227,7 +228,7 @@ class UserServiceTest extends DatabaseTestCase
* @throws QueryException
* @throws SPException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateDuplicatedEmail()
{
@@ -255,7 +256,7 @@ class UserServiceTest extends DatabaseTestCase
* @throws QueryException
* @throws SPException
* @throws DuplicatedItemException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateUnknown()
{
@@ -298,7 +299,7 @@ class UserServiceTest extends DatabaseTestCase
/**
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
* @throws SPException
*/
public function testUpdatePass()
diff --git a/tests/SP/Services/UserGroup/UserGroupServiceTest.php b/tests/SP/Services/UserGroup/UserGroupServiceTest.php
index a8d2aa72..b09fe8b0 100644
--- a/tests/SP/Services/UserGroup/UserGroupServiceTest.php
+++ b/tests/SP/Services/UserGroup/UserGroupServiceTest.php
@@ -27,15 +27,18 @@ namespace SP\Tests\Services\UserGroup;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserGroupData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\User\Ports\UserGroupServiceInterface;
+use SP\Domain\User\Services\UserGroupService;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -47,7 +50,7 @@ class UserGroupServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\User\Ports\UserGroupServiceInterface
+ * @var UserGroupServiceInterface
*/
private static $service;
@@ -64,7 +67,7 @@ class UserGroupServiceTest extends DatabaseTestCase
self::$loadFixtures = true;
// Inicializar el servicio
- self::$service = $dic->get(\SP\Domain\User\Services\UserGroupService::class);
+ self::$service = $dic->get(UserGroupService::class);
}
/**
@@ -131,7 +134,7 @@ class UserGroupServiceTest extends DatabaseTestCase
/**
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDeleteByIdBatchUsed()
{
@@ -144,7 +147,7 @@ class UserGroupServiceTest extends DatabaseTestCase
/**
* @throws ConstraintException
* @throws QueryException
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testDeleteByIdBatchUnknown()
{
@@ -172,7 +175,7 @@ class UserGroupServiceTest extends DatabaseTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testUpdateDuplicated()
{
@@ -220,7 +223,7 @@ class UserGroupServiceTest extends DatabaseTestCase
}
/**
- * @throws \SP\Domain\Common\Services\ServiceException
+ * @throws ServiceException
*/
public function testCreateDuplicated()
{
diff --git a/tests/SP/Services/UserGroup/UserToUserGroupServiceTest.php b/tests/SP/Services/UserGroup/UserToUserGroupServiceTest.php
index 9a688361..4da5993f 100644
--- a/tests/SP/Services/UserGroup/UserToUserGroupServiceTest.php
+++ b/tests/SP/Services/UserGroup/UserToUserGroupServiceTest.php
@@ -27,14 +27,15 @@ namespace SP\Tests\Services\UserGroup;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\UserToUserGroupData;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserToUserGroupServiceInterface;
use SP\Domain\User\Services\UserToUserGroupService;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
+
use function SP\Tests\setupContext;
/**
@@ -46,7 +47,7 @@ class UserToUserGroupServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\User\Ports\UserToUserGroupServiceInterface
+ * @var UserToUserGroupServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/UserPassRecover/UserPassRecoverServiceTest.php b/tests/SP/Services/UserPassRecover/UserPassRecoverServiceTest.php
index 81de8d0d..49f27888 100644
--- a/tests/SP/Services/UserPassRecover/UserPassRecoverServiceTest.php
+++ b/tests/SP/Services/UserPassRecover/UserPassRecoverServiceTest.php
@@ -28,13 +28,15 @@ use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
+use SP\Domain\User\Ports\UserPassRecoverServiceInterface;
use SP\Domain\User\Services\UserPassRecoverService;
use SP\Tests\DatabaseTestCase;
use SP\Util\PasswordUtil;
+
use function SP\Tests\setupContext;
/**
@@ -45,7 +47,7 @@ use function SP\Tests\setupContext;
class UserPassRecoverServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\User\Ports\UserPassRecoverServiceInterface
+ * @var UserPassRecoverServiceInterface
*/
private static $service;
diff --git a/tests/SP/Services/UserProfile/UserProfileServiceTest.php b/tests/SP/Services/UserProfile/UserProfileServiceTest.php
index 997cb8d3..34f51512 100644
--- a/tests/SP/Services/UserProfile/UserProfileServiceTest.php
+++ b/tests/SP/Services/UserProfile/UserProfileServiceTest.php
@@ -27,18 +27,20 @@ namespace SP\Tests\Services\UserProfile;
use DI\DependencyException;
use DI\NotFoundException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\ConstraintException;
-use SP\Core\Exceptions\QueryException;
-use SP\Core\Exceptions\SPException;
use SP\DataModel\ItemSearchData;
use SP\DataModel\ProfileData;
use SP\DataModel\UserProfileData;
use SP\Domain\Common\Services\ServiceException;
+use SP\Domain\Core\Exceptions\ConstraintException;
+use SP\Domain\Core\Exceptions\QueryException;
+use SP\Domain\Core\Exceptions\SPException;
use SP\Domain\User\Ports\UserProfileServiceInterface;
+use SP\Domain\User\Services\UserProfileService;
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
use SP\Tests\DatabaseTestCase;
use stdClass;
+
use function SP\Tests\setupContext;
/**
@@ -49,7 +51,7 @@ use function SP\Tests\setupContext;
class UserProfileServiceTest extends DatabaseTestCase
{
/**
- * @var \SP\Domain\User\Ports\UserProfileServiceInterface
+ * @var UserProfileServiceInterface
*/
private static $service;
@@ -66,7 +68,7 @@ class UserProfileServiceTest extends DatabaseTestCase
self::$loadFixtures = true;
// Inicializar el servicio
- self::$service = $dic->get(\SP\Domain\User\Services\UserProfileService::class);
+ self::$service = $dic->get(UserProfileService::class);
}
/**
diff --git a/tests/SP/Storage/ArchiveHandlerTest.php b/tests/SP/Storage/ArchiveHandlerTest.php
index b283157c..c174dc03 100644
--- a/tests/SP/Storage/ArchiveHandlerTest.php
+++ b/tests/SP/Storage/ArchiveHandlerTest.php
@@ -26,8 +26,8 @@ namespace SP\Tests\Storage;
use PHPUnit\Framework\TestCase;
use RuntimeException;
-use SP\Core\Exceptions\CheckException;
use SP\Core\PhpExtensionChecker;
+use SP\Domain\Core\Exceptions\CheckException;
use SP\Infrastructure\File\ArchiveHandler;
use SP\Infrastructure\File\FileException;
use UnexpectedValueException;
@@ -39,7 +39,7 @@ use UnexpectedValueException;
*/
class ArchiveHandlerTest extends TestCase
{
- const ARCHIVE = TMP_PATH . DIRECTORY_SEPARATOR . 'test_archive';
+ public const ARCHIVE = TMP_PATH . DIRECTORY_SEPARATOR . 'test_archive';
/**
* @throws CheckException
diff --git a/tests/SP/bootstrap.php b/tests/SP/bootstrap.php
index 6d051e78..3bd40487 100644
--- a/tests/SP/bootstrap.php
+++ b/tests/SP/bootstrap.php
@@ -29,9 +29,9 @@ use DI\ContainerBuilder;
use Exception;
use RuntimeException;
use SP\Core\Context\ContextException;
-use SP\Core\Exceptions\FileNotFoundException;
use SP\DataModel\ProfileData;
use SP\Domain\Core\Context\ContextInterface;
+use SP\Domain\Core\Exceptions\FileNotFoundException;
use SP\Domain\User\Services\UserLoginResponse;
use SP\Infrastructure\Database\DatabaseConnectionData;
use SP\Infrastructure\Database\DbStorageInterface;