diff --git a/app/modules/api/Controllers/Account/CreateController.php b/app/modules/api/Controllers/Account/CreateController.php index c9c1acd5..f28f3d0b 100644 --- a/app/modules/api/Controllers/Account/CreateController.php +++ b/app/modules/api/Controllers/Account/CreateController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Account\Dtos\AccountRequest; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CreateController @@ -74,8 +75,8 @@ final class CreateController extends AccountBase } /** - * @return \SP\Domain\Account\Dtos\AccountRequest - * @throws \SP\Domain\Common\Services\ServiceException + * @return AccountRequest + * @throws ServiceException */ private function buildAccountRequest(): AccountRequest { diff --git a/app/modules/api/Controllers/Account/DeleteController.php b/app/modules/api/Controllers/Account/DeleteController.php index c1a23f72..44618cc4 100644 --- a/app/modules/api/Controllers/Account/DeleteController.php +++ b/app/modules/api/Controllers/Account/DeleteController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class DeleteController diff --git a/app/modules/api/Controllers/Account/EditController.php b/app/modules/api/Controllers/Account/EditController.php index 8933f544..bdd3a200 100644 --- a/app/modules/api/Controllers/Account/EditController.php +++ b/app/modules/api/Controllers/Account/EditController.php @@ -25,11 +25,12 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Account\Dtos\AccountRequest; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class EditController @@ -73,8 +74,8 @@ final class EditController extends AccountBase } /** - * @return \SP\Domain\Account\Dtos\AccountRequest - * @throws \SP\Domain\Common\Services\ServiceException + * @return AccountRequest + * @throws ServiceException */ private function buildAccountRequest(): AccountRequest { diff --git a/app/modules/api/Controllers/Account/EditPassController.php b/app/modules/api/Controllers/Account/EditPassController.php index d8a3183d..04c865e5 100644 --- a/app/modules/api/Controllers/Account/EditPassController.php +++ b/app/modules/api/Controllers/Account/EditPassController.php @@ -25,11 +25,12 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Account\Dtos\AccountRequest; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class EditPassController @@ -75,8 +76,8 @@ final class EditPassController extends AccountBase } /** - * @return \SP\Domain\Account\Dtos\AccountRequest - * @throws \SP\Domain\Common\Services\ServiceException + * @return AccountRequest + * @throws ServiceException */ private function buildAccountRequest(): AccountRequest { diff --git a/app/modules/api/Controllers/Account/SearchController.php b/app/modules/api/Controllers/Account/SearchController.php index d5b5a338..9a467877 100644 --- a/app/modules/api/Controllers/Account/SearchController.php +++ b/app/modules/api/Controllers/Account/SearchController.php @@ -27,13 +27,14 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; use Klein\Klein; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Domain\Account\Ports\AccountSearchServiceInterface; use SP\Domain\Account\Search\AccountSearchConstants; use SP\Domain\Account\Search\AccountSearchFilter; use SP\Domain\Api\Ports\ApiServiceInterface; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Modules\Api\Controllers\ControllerBase; /** @@ -78,8 +79,8 @@ final class SearchController extends ControllerBase } /** - * @return \SP\Domain\Account\Search\AccountSearchFilter - * @throws \SP\Domain\Common\Services\ServiceException + * @return AccountSearchFilter + * @throws ServiceException */ private function buildAccountSearchFilter(): AccountSearchFilter { diff --git a/app/modules/api/Controllers/Account/ViewController.php b/app/modules/api/Controllers/Account/ViewController.php index 9602a626..6f7ec23e 100644 --- a/app/modules/api/Controllers/Account/ViewController.php +++ b/app/modules/api/Controllers/Account/ViewController.php @@ -27,11 +27,11 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; use League\Fractal\Resource\Item; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Account\Dtos\AccountEnrichedDto; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\Util; /** diff --git a/app/modules/api/Controllers/Account/ViewPassController.php b/app/modules/api/Controllers/Account/ViewPassController.php index f074da8c..b1a48128 100644 --- a/app/modules/api/Controllers/Account/ViewPassController.php +++ b/app/modules/api/Controllers/Account/ViewPassController.php @@ -26,11 +26,11 @@ namespace SP\Modules\Api\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Crypt\Crypt; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class ViewController diff --git a/app/modules/api/Controllers/Category/CreateController.php b/app/modules/api/Controllers/Category/CreateController.php index 1f80b6e7..5fe1062b 100644 --- a/app/modules/api/Controllers/Category/CreateController.php +++ b/app/modules/api/Controllers/Category/CreateController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\CategoryData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CreateController @@ -71,8 +72,8 @@ final class CreateController extends CategoryBase } /** - * @return \SP\DataModel\CategoryData - * @throws \SP\Domain\Common\Services\ServiceException + * @return CategoryData + * @throws ServiceException */ private function buildCategoryData(): CategoryData { diff --git a/app/modules/api/Controllers/Category/DeleteController.php b/app/modules/api/Controllers/Category/DeleteController.php index 71c5f454..02abdd17 100644 --- a/app/modules/api/Controllers/Category/DeleteController.php +++ b/app/modules/api/Controllers/Category/DeleteController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class DeleteController diff --git a/app/modules/api/Controllers/Category/EditController.php b/app/modules/api/Controllers/Category/EditController.php index bdd469e7..1b44703a 100644 --- a/app/modules/api/Controllers/Category/EditController.php +++ b/app/modules/api/Controllers/Category/EditController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\CategoryData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; final class EditController extends CategoryBase { @@ -68,8 +69,8 @@ final class EditController extends CategoryBase } /** - * @return \SP\DataModel\CategoryData - * @throws \SP\Domain\Common\Services\ServiceException + * @return CategoryData + * @throws ServiceException */ private function buildCategoryData(): CategoryData { diff --git a/app/modules/api/Controllers/Category/SearchController.php b/app/modules/api/Controllers/Category/SearchController.php index 5763732b..5290ae55 100644 --- a/app/modules/api/Controllers/Category/SearchController.php +++ b/app/modules/api/Controllers/Category/SearchController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Api\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\DataModel\ItemSearchData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class SearchController @@ -61,8 +62,8 @@ final class SearchController extends CategoryBase } /** - * @return \SP\DataModel\ItemSearchData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ItemSearchData + * @throws ServiceException */ private function buildSearchData(): ItemSearchData { diff --git a/app/modules/api/Controllers/Category/ViewController.php b/app/modules/api/Controllers/Category/ViewController.php index 4c9579af..48429e2d 100644 --- a/app/modules/api/Controllers/Category/ViewController.php +++ b/app/modules/api/Controllers/Category/ViewController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Category; use Exception; use League\Fractal\Resource\Item; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\Util; diff --git a/app/modules/api/Controllers/Client/CreateController.php b/app/modules/api/Controllers/Client/CreateController.php index 87b226ec..a139cd0a 100644 --- a/app/modules/api/Controllers/Client/CreateController.php +++ b/app/modules/api/Controllers/Client/CreateController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\ClientData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CreateController @@ -71,8 +72,8 @@ final class CreateController extends ClientBase } /** - * @return \SP\DataModel\ClientData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ClientData + * @throws ServiceException */ private function buildClientData(): ClientData { diff --git a/app/modules/api/Controllers/Client/DeleteController.php b/app/modules/api/Controllers/Client/DeleteController.php index 05c6028e..cd23d6b9 100644 --- a/app/modules/api/Controllers/Client/DeleteController.php +++ b/app/modules/api/Controllers/Client/DeleteController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class DeleteController diff --git a/app/modules/api/Controllers/Client/EditController.php b/app/modules/api/Controllers/Client/EditController.php index 7ac7ba0a..21321d55 100644 --- a/app/modules/api/Controllers/Client/EditController.php +++ b/app/modules/api/Controllers/Client/EditController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\ClientData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class EditController @@ -69,8 +70,8 @@ final class EditController extends ClientBase } /** - * @return \SP\DataModel\ClientData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ClientData + * @throws ServiceException */ private function buildClientData(): ClientData { diff --git a/app/modules/api/Controllers/Client/SearchController.php b/app/modules/api/Controllers/Client/SearchController.php index 6565e4f7..b6014ca0 100644 --- a/app/modules/api/Controllers/Client/SearchController.php +++ b/app/modules/api/Controllers/Client/SearchController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Api\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\DataModel\ItemSearchData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class SearchController @@ -61,8 +62,8 @@ final class SearchController extends ClientBase } /** - * @return \SP\DataModel\ItemSearchData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ItemSearchData + * @throws ServiceException */ private function buildSearchData(): ItemSearchData { diff --git a/app/modules/api/Controllers/Client/ViewController.php b/app/modules/api/Controllers/Client/ViewController.php index 1e32dbb6..a779ab90 100644 --- a/app/modules/api/Controllers/Client/ViewController.php +++ b/app/modules/api/Controllers/Client/ViewController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Client; use Exception; use League\Fractal\Resource\Item; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\Util; /** diff --git a/app/modules/api/Controllers/Config/BackupController.php b/app/modules/api/Controllers/Config/BackupController.php index f80d297f..9f97dbfc 100644 --- a/app/modules/api/Controllers/Config/BackupController.php +++ b/app/modules/api/Controllers/Config/BackupController.php @@ -27,12 +27,13 @@ namespace SP\Modules\Api\Controllers\Config; use Exception; use Klein\Klein; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Export\Ports\FileBackupServiceInterface; use SP\Domain\Export\Services\BackupFiles; use SP\Modules\Api\Controllers\ControllerBase; @@ -48,7 +49,7 @@ final class BackupController extends ControllerBase private FileBackupServiceInterface $fileBackupService; /** - * @throws \SP\Core\Exceptions\InvalidClassException + * @throws InvalidClassException */ public function __construct( Application $application, diff --git a/app/modules/api/Controllers/Config/ExportController.php b/app/modules/api/Controllers/Config/ExportController.php index 198837a0..1b283f46 100644 --- a/app/modules/api/Controllers/Config/ExportController.php +++ b/app/modules/api/Controllers/Config/ExportController.php @@ -28,12 +28,13 @@ namespace SP\Modules\Api\Controllers\Config; use Exception; use Klein\Klein; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Export\Ports\XmlExportServiceInterface; use SP\Modules\Api\Controllers\ControllerBase; use SP\Modules\Api\Controllers\Help\ConfigHelp; @@ -46,7 +47,7 @@ final class ExportController extends ControllerBase private XmlExportServiceInterface $xmlExportService; /** - * @throws \SP\Core\Exceptions\InvalidClassException + * @throws InvalidClassException */ public function __construct( Application $application, diff --git a/app/modules/api/Controllers/ControllerBase.php b/app/modules/api/Controllers/ControllerBase.php index 80c871d5..c60c1e4a 100644 --- a/app/modules/api/Controllers/ControllerBase.php +++ b/app/modules/api/Controllers/ControllerBase.php @@ -30,13 +30,14 @@ use League\Fractal\Manager; use SP\Core\Acl\Acl; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; -use SP\Core\Context\ContextInterface; 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\Http\Json; /** @@ -86,7 +87,7 @@ abstract class ControllerBase /** * @throws SPException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ final protected function setupApi(int $actionId): void { diff --git a/app/modules/api/Controllers/Tag/CreateController.php b/app/modules/api/Controllers/Tag/CreateController.php index b1121374..45d37eac 100644 --- a/app/modules/api/Controllers/Tag/CreateController.php +++ b/app/modules/api/Controllers/Tag/CreateController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\TagData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CreateController @@ -71,8 +72,8 @@ final class CreateController extends TagBase } /** - * @return \SP\DataModel\TagData - * @throws \SP\Domain\Common\Services\ServiceException + * @return TagData + * @throws ServiceException */ private function buildTagData(): TagData { diff --git a/app/modules/api/Controllers/Tag/DeleteController.php b/app/modules/api/Controllers/Tag/DeleteController.php index b217cf09..922a44ca 100644 --- a/app/modules/api/Controllers/Tag/DeleteController.php +++ b/app/modules/api/Controllers/Tag/DeleteController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class DeleteController diff --git a/app/modules/api/Controllers/Tag/EditController.php b/app/modules/api/Controllers/Tag/EditController.php index db1a6aed..4854498a 100644 --- a/app/modules/api/Controllers/Tag/EditController.php +++ b/app/modules/api/Controllers/Tag/EditController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\TagData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class EditController @@ -69,8 +70,8 @@ final class EditController extends TagBase } /** - * @return \SP\DataModel\TagData - * @throws \SP\Domain\Common\Services\ServiceException + * @return TagData + * @throws ServiceException */ private function buildTagData(): TagData { diff --git a/app/modules/api/Controllers/Tag/SearchController.php b/app/modules/api/Controllers/Tag/SearchController.php index ab5b5798..c3ee2f2e 100644 --- a/app/modules/api/Controllers/Tag/SearchController.php +++ b/app/modules/api/Controllers/Tag/SearchController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Api\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\DataModel\ItemSearchData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class SearchController @@ -60,8 +61,8 @@ final class SearchController extends TagBase } /** - * @return \SP\DataModel\ItemSearchData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ItemSearchData + * @throws ServiceException */ private function buildSearchData(): ItemSearchData { diff --git a/app/modules/api/Controllers/Tag/ViewController.php b/app/modules/api/Controllers/Tag/ViewController.php index 045d0e56..c1fd0cba 100644 --- a/app/modules/api/Controllers/Tag/ViewController.php +++ b/app/modules/api/Controllers/Tag/ViewController.php @@ -25,10 +25,10 @@ namespace SP\Modules\Api\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class ViewController diff --git a/app/modules/api/Controllers/UserGroup/CreateController.php b/app/modules/api/Controllers/UserGroup/CreateController.php index 6b138281..95ff1fbc 100644 --- a/app/modules/api/Controllers/UserGroup/CreateController.php +++ b/app/modules/api/Controllers/UserGroup/CreateController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\UserGroupData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CreateController @@ -70,8 +71,8 @@ final class CreateController extends UserGroupBase } /** - * @return \SP\DataModel\UserGroupData - * @throws \SP\Domain\Common\Services\ServiceException + * @return UserGroupData + * @throws ServiceException */ private function buildUserGroupData(): UserGroupData { diff --git a/app/modules/api/Controllers/UserGroup/DeleteController.php b/app/modules/api/Controllers/UserGroup/DeleteController.php index cc3356e2..5c1ae00a 100644 --- a/app/modules/api/Controllers/UserGroup/DeleteController.php +++ b/app/modules/api/Controllers/UserGroup/DeleteController.php @@ -26,10 +26,10 @@ namespace SP\Modules\Api\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class DeleteController diff --git a/app/modules/api/Controllers/UserGroup/EditController.php b/app/modules/api/Controllers/UserGroup/EditController.php index 8445d4a7..d3c63ced 100644 --- a/app/modules/api/Controllers/UserGroup/EditController.php +++ b/app/modules/api/Controllers/UserGroup/EditController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Api\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\UserGroupData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class EditController @@ -72,8 +73,8 @@ final class EditController extends UserGroupBase } /** - * @return \SP\DataModel\UserGroupData - * @throws \SP\Domain\Common\Services\ServiceException + * @return UserGroupData + * @throws ServiceException */ private function buildUserGroupData(): UserGroupData { diff --git a/app/modules/api/Controllers/UserGroup/SearchController.php b/app/modules/api/Controllers/UserGroup/SearchController.php index a20ed57c..24955831 100644 --- a/app/modules/api/Controllers/UserGroup/SearchController.php +++ b/app/modules/api/Controllers/UserGroup/SearchController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Api\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\DataModel\ItemSearchData; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class SearchController @@ -59,8 +60,8 @@ final class SearchController extends UserGroupBase } /** - * @return \SP\DataModel\ItemSearchData - * @throws \SP\Domain\Common\Services\ServiceException + * @return ItemSearchData + * @throws ServiceException */ private function buildSearchData(): ItemSearchData { diff --git a/app/modules/api/Controllers/UserGroup/ViewController.php b/app/modules/api/Controllers/UserGroup/ViewController.php index 4e61609d..95b9c49a 100644 --- a/app/modules/api/Controllers/UserGroup/ViewController.php +++ b/app/modules/api/Controllers/UserGroup/ViewController.php @@ -25,10 +25,10 @@ namespace SP\Modules\Api\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Api\Services\ApiResponse; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class ViewController diff --git a/app/modules/web/Controllers/AccessManager/IndexController.php b/app/modules/web/Controllers/AccessManager/IndexController.php index a83c0095..34fcc3f7 100644 --- a/app/modules/web/Controllers/AccessManager/IndexController.php +++ b/app/modules/web/Controllers/AccessManager/IndexController.php @@ -25,7 +25,6 @@ namespace SP\Modules\Web\Controllers\AccessManager; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Exceptions\ConstraintException; @@ -33,6 +32,7 @@ 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\User\Ports\UserGroupServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; diff --git a/app/modules/web/Controllers/Account/CopyController.php b/app/modules/web/Controllers/Account/CopyController.php index 43bb0326..aa2b37e7 100644 --- a/app/modules/web/Controllers/Account/CopyController.php +++ b/app/modules/web/Controllers/Account/CopyController.php @@ -25,8 +25,8 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/Account/CreateController.php b/app/modules/web/Controllers/Account/CreateController.php index 111dd846..2809e047 100644 --- a/app/modules/web/Controllers/Account/CreateController.php +++ b/app/modules/web/Controllers/Account/CreateController.php @@ -25,8 +25,8 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/Account/DeleteController.php b/app/modules/web/Controllers/Account/DeleteController.php index 55c4e4e1..6159c92f 100644 --- a/app/modules/web/Controllers/Account/DeleteController.php +++ b/app/modules/web/Controllers/Account/DeleteController.php @@ -25,11 +25,11 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\UI\ThemeIcons; use SP\Domain\Account\Ports\AccountServiceInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Modules\Web\Controllers\Helpers\Account\AccountHelper; use SP\Mvc\Controller\WebControllerHelper; use SP\Util\ErrorUtil; diff --git a/app/modules/web/Controllers/Account/EditController.php b/app/modules/web/Controllers/Account/EditController.php index ee310899..6ef37436 100644 --- a/app/modules/web/Controllers/Account/EditController.php +++ b/app/modules/web/Controllers/Account/EditController.php @@ -25,8 +25,8 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/Account/EditPassController.php b/app/modules/web/Controllers/Account/EditPassController.php index b14b7eab..a4e905ba 100644 --- a/app/modules/web/Controllers/Account/EditPassController.php +++ b/app/modules/web/Controllers/Account/EditPassController.php @@ -27,8 +27,8 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/Account/RequestAccessController.php b/app/modules/web/Controllers/Account/RequestAccessController.php index 52a7e2b1..6f41c72e 100644 --- a/app/modules/web/Controllers/Account/RequestAccessController.php +++ b/app/modules/web/Controllers/Account/RequestAccessController.php @@ -25,10 +25,10 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Domain\Account\Ports\AccountServiceInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Modules\Web\Controllers\ControllerBase; use SP\Modules\Web\Controllers\Helpers\Account\AccountRequestHelper; use SP\Mvc\Controller\WebControllerHelper; @@ -43,10 +43,10 @@ final class RequestAccessController extends ControllerBase private AccountServiceInterface $accountService; public function __construct( - Application $application, - WebControllerHelper $webControllerHelper, - \SP\Domain\Account\Ports\AccountServiceInterface $accountService, - AccountRequestHelper $accountRequestHelper + Application $application, + WebControllerHelper $webControllerHelper, + AccountServiceInterface $accountService, + AccountRequestHelper $accountRequestHelper ) { parent::__construct($application, $webControllerHelper); diff --git a/app/modules/web/Controllers/Account/SaveCopyController.php b/app/modules/web/Controllers/Account/SaveCopyController.php index d9a1c641..6379c231 100644 --- a/app/modules/web/Controllers/Account/SaveCopyController.php +++ b/app/modules/web/Controllers/Account/SaveCopyController.php @@ -25,11 +25,12 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -39,7 +40,7 @@ final class SaveCopyController extends AccountSaveBase { /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCopyAction(): ?bool { diff --git a/app/modules/web/Controllers/Account/SaveCreateController.php b/app/modules/web/Controllers/Account/SaveCreateController.php index 60ae4012..8ba3b0e9 100644 --- a/app/modules/web/Controllers/Account/SaveCreateController.php +++ b/app/modules/web/Controllers/Account/SaveCreateController.php @@ -25,11 +25,12 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -39,7 +40,7 @@ final class SaveCreateController extends AccountSaveBase { /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): ?bool { diff --git a/app/modules/web/Controllers/Account/SaveDeleteController.php b/app/modules/web/Controllers/Account/SaveDeleteController.php index 788fbbcc..4deec635 100644 --- a/app/modules/web/Controllers/Account/SaveDeleteController.php +++ b/app/modules/web/Controllers/Account/SaveDeleteController.php @@ -26,10 +26,12 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -41,15 +43,16 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SaveDeleteController extends AccountControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\Account\Ports\AccountServiceInterface $accountService; + private AccountServiceInterface $accountService; private CustomFieldServiceInterface $customFieldService; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\Account\Ports\AccountServiceInterface $accountService, + AccountServiceInterface $accountService, CustomFieldServiceInterface $customFieldService ) { parent::__construct( @@ -67,7 +70,7 @@ final class SaveDeleteController extends AccountControllerBase * @param int $id Account's ID * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveDeleteAction(int $id): bool { diff --git a/app/modules/web/Controllers/Account/SaveEditController.php b/app/modules/web/Controllers/Account/SaveEditController.php index fb86dacc..59bc5463 100644 --- a/app/modules/web/Controllers/Account/SaveEditController.php +++ b/app/modules/web/Controllers/Account/SaveEditController.php @@ -26,11 +26,12 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -44,7 +45,7 @@ final class SaveEditController extends AccountSaveBase * @param int $id Account's ID * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): ?bool { diff --git a/app/modules/web/Controllers/Account/SaveEditPassController.php b/app/modules/web/Controllers/Account/SaveEditPassController.php index 21361b77..3641e3d2 100644 --- a/app/modules/web/Controllers/Account/SaveEditPassController.php +++ b/app/modules/web/Controllers/Account/SaveEditPassController.php @@ -26,12 +26,15 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Modules\Web\Forms\AccountForm; @@ -44,14 +47,14 @@ final class SaveEditPassController extends AccountControllerBase { use JsonTrait; - private \SP\Domain\Account\Ports\AccountServiceInterface $accountService; + private AccountServiceInterface $accountService; private AccountForm $accountForm; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\Account\Ports\AccountServiceInterface $accountService, - \SP\Domain\Account\Ports\AccountPresetServiceInterface $accountPresetService + AccountServiceInterface $accountService, + AccountPresetServiceInterface $accountPresetService ) { parent::__construct( $application, @@ -68,7 +71,7 @@ final class SaveEditPassController extends AccountControllerBase * @param int $id Account's ID * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditPassAction(int $id): bool { diff --git a/app/modules/web/Controllers/Account/SaveEditRestoreController.php b/app/modules/web/Controllers/Account/SaveEditRestoreController.php index 9544d95e..ec90eddf 100644 --- a/app/modules/web/Controllers/Account/SaveEditRestoreController.php +++ b/app/modules/web/Controllers/Account/SaveEditRestoreController.php @@ -26,12 +26,13 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Account\Ports\AccountServiceInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\WebControllerHelper; @@ -43,7 +44,7 @@ final class SaveEditRestoreController extends AccountControllerBase { use JsonTrait; - private \SP\Domain\Account\Ports\AccountServiceInterface $accountService; + private AccountServiceInterface $accountService; public function __construct( Application $application, @@ -65,7 +66,7 @@ final class SaveEditRestoreController extends AccountControllerBase * @param int $id Account's ID * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditRestoreAction(int $historyId, int $id): bool { diff --git a/app/modules/web/Controllers/Account/SaveRequestController.php b/app/modules/web/Controllers/Account/SaveRequestController.php index c1e05f3a..e4471801 100644 --- a/app/modules/web/Controllers/Account/SaveRequestController.php +++ b/app/modules/web/Controllers/Account/SaveRequestController.php @@ -26,14 +26,15 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\User\Ports\UserServiceInterface; use SP\Http\JsonResponse; use SP\Http\Uri; @@ -46,16 +47,17 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SaveRequestController extends AccountControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountServiceInterface $accountService; private UserServiceInterface $userService; public function __construct( - Application $application, - WebControllerHelper $webControllerHelper, - \SP\Domain\Account\Ports\AccountServiceInterface $accountService, - UserServiceInterface $userService + Application $application, + WebControllerHelper $webControllerHelper, + AccountServiceInterface $accountService, + UserServiceInterface $userService ) { parent::__construct( $application, @@ -72,7 +74,7 @@ final class SaveRequestController extends AccountControllerBase * @param int $id Account's ID * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveRequestAction(int $id): bool { diff --git a/app/modules/web/Controllers/Account/ViewController.php b/app/modules/web/Controllers/Account/ViewController.php index 82ccbd61..8b9167a0 100644 --- a/app/modules/web/Controllers/Account/ViewController.php +++ b/app/modules/web/Controllers/Account/ViewController.php @@ -26,8 +26,8 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/Account/ViewHistoryController.php b/app/modules/web/Controllers/Account/ViewHistoryController.php index da1736c9..9be23dab 100644 --- a/app/modules/web/Controllers/Account/ViewHistoryController.php +++ b/app/modules/web/Controllers/Account/ViewHistoryController.php @@ -25,9 +25,10 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; +use SP\Domain\Account\Ports\AccountHistoryServiceInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Modules\Web\Controllers\Helpers\Account\AccountHistoryHelper; use SP\Mvc\Controller\WebControllerHelper; use SP\Util\ErrorUtil; @@ -37,13 +38,13 @@ use SP\Util\ErrorUtil; */ final class ViewHistoryController extends AccountControllerBase { - private \SP\Domain\Account\Ports\AccountHistoryServiceInterface $accountHistoryService; + private AccountHistoryServiceInterface $accountHistoryService; private AccountHistoryHelper $accountHistoryHelper; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\Account\Ports\AccountHistoryServiceInterface $accountHistoryService, + AccountHistoryServiceInterface $accountHistoryService, AccountHistoryHelper $accountHistoryHelper ) { parent::__construct( diff --git a/app/modules/web/Controllers/Account/ViewLinkController.php b/app/modules/web/Controllers/Account/ViewLinkController.php index ec97dc50..b451be7d 100644 --- a/app/modules/web/Controllers/Account/ViewLinkController.php +++ b/app/modules/web/Controllers/Account/ViewLinkController.php @@ -27,11 +27,9 @@ namespace SP\Modules\Web\Controllers\Account; use Exception; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Core\UI\ThemeIcons; @@ -39,6 +37,8 @@ use SP\DataModel\AccountExtData; 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\Crypt\VaultInterface; use SP\Http\Uri; use SP\Mvc\Controller\WebControllerHelper; use SP\Util\ErrorUtil; diff --git a/app/modules/web/Controllers/AccountFile/ListController.php b/app/modules/web/Controllers/AccountFile/ListController.php index f2304e94..997b8600 100644 --- a/app/modules/web/Controllers/AccountFile/ListController.php +++ b/app/modules/web/Controllers/AccountFile/ListController.php @@ -26,8 +26,8 @@ namespace SP\Modules\Web\Controllers\AccountFile; use Exception; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Util\ErrorUtil; /** diff --git a/app/modules/web/Controllers/AccountFile/SearchController.php b/app/modules/web/Controllers/AccountFile/SearchController.php index 8af76c2e..0fb1d416 100644 --- a/app/modules/web/Controllers/AccountFile/SearchController.php +++ b/app/modules/web/Controllers/AccountFile/SearchController.php @@ -24,9 +24,12 @@ namespace SP\Modules\Web\Controllers\AccountFile; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -42,7 +45,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountFileServiceInterface $accountFileService; private FileGrid $fileGrid; @@ -65,9 +69,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -88,9 +92,9 @@ final class SearchController 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/AccountHistoryManager/SearchController.php b/app/modules/web/Controllers/AccountHistoryManager/SearchController.php index 8ed63454..cb3ae3ad 100644 --- a/app/modules/web/Controllers/AccountHistoryManager/SearchController.php +++ b/app/modules/web/Controllers/AccountHistoryManager/SearchController.php @@ -24,11 +24,12 @@ namespace SP\Modules\Web\Controllers\AccountHistoryManager; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -45,7 +46,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountHistoryServiceInterface $accountHistoryService; private AccountHistoryGrid $accountHistoryGrid; @@ -67,9 +69,9 @@ final class SearchController extends ControllerBase /** * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/AccountManager/BulkEditController.php b/app/modules/web/Controllers/AccountManager/BulkEditController.php index 1fa256e1..863f1b81 100644 --- a/app/modules/web/Controllers/AccountManager/BulkEditController.php +++ b/app/modules/web/Controllers/AccountManager/BulkEditController.php @@ -25,8 +25,8 @@ namespace SP\Modules\Web\Controllers\AccountManager; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Domain\Account\Ports\AccountHistoryServiceInterface; @@ -34,6 +34,7 @@ use SP\Domain\Account\Ports\AccountSearchServiceInterface; 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\Tag\Ports\TagServiceInterface; use SP\Domain\User\Ports\UserGroupServiceInterface; @@ -53,7 +54,8 @@ use SP\Mvc\View\Components\SelectItemAdapter; */ final class BulkEditController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountServiceInterface $accountService; private AccountSearchServiceInterface $accountSearchService; @@ -90,7 +92,7 @@ final class BulkEditController extends ControllerBase * bulkEditAction * * @return bool - * @throws \JsonException + * @throws JsonException */ public function bulkEditAction(): bool { diff --git a/app/modules/web/Controllers/AccountManager/DeleteController.php b/app/modules/web/Controllers/AccountManager/DeleteController.php index b5d26622..fe910336 100644 --- a/app/modules/web/Controllers/AccountManager/DeleteController.php +++ b/app/modules/web/Controllers/AccountManager/DeleteController.php @@ -25,11 +25,12 @@ namespace SP\Modules\Web\Controllers\AccountManager; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -44,7 +45,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class DeleteController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountServiceInterface $accountService; private CustomFieldServiceInterface $customFieldService; @@ -69,7 +71,7 @@ final class DeleteController extends ControllerBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php b/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php index 77d6b0b3..bcc72e13 100644 --- a/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php +++ b/app/modules/web/Controllers/AccountManager/SaveBulkEditController.php @@ -25,14 +25,15 @@ namespace SP\Modules\Web\Controllers\AccountManager; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,6 +41,7 @@ use SP\Modules\Web\Forms\AccountForm; use SP\Mvc\Controller\ItemTrait; use SP\Mvc\Controller\WebControllerHelper; use SP\Util\Util; + use function SP\processException; /** @@ -49,7 +51,8 @@ use function SP\processException; */ final class SaveBulkEditController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountServiceInterface $accountService; private AccountHistoryServiceInterface $accountHistoryService; @@ -75,7 +78,7 @@ final class SaveBulkEditController extends ControllerBase * saveBulkEditAction * * @return bool - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function saveBulkEditAction(): bool { diff --git a/app/modules/web/Controllers/AccountManager/SearchController.php b/app/modules/web/Controllers/AccountManager/SearchController.php index 83ff99ac..951c240a 100644 --- a/app/modules/web/Controllers/AccountManager/SearchController.php +++ b/app/modules/web/Controllers/AccountManager/SearchController.php @@ -24,11 +24,16 @@ namespace SP\Modules\Web\Controllers\AccountManager; -use SP\Core\Acl\AclActionsInterface; 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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -45,15 +50,16 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AccountServiceInterface $accountService; private AccountSearchServiceInterface $accountSearchService; private AccountGrid $accountGrid; /** - * @throws \SP\Core\Exceptions\SessionTimeout - * @throws \SP\Domain\Auth\Services\AuthException + * @throws SessionTimeout + * @throws AuthException */ public function __construct( Application $application, @@ -71,9 +77,9 @@ final class SearchController extends ControllerBase /** * @return bool - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException + * @throws ConstraintException + * @throws QueryException + * @throws SPException */ public function searchAction(): bool { @@ -94,10 +100,10 @@ final class SearchController extends ControllerBase /** * getSearchGrid * - * @return \SP\Html\DataGrid\DataGridInterface - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException + * @return DataGridInterface + * @throws ConstraintException + * @throws QueryException + * @throws SPException */ protected function getSearchGrid(): DataGridInterface { diff --git a/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php b/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php index a64a89a6..ab5bd4b2 100644 --- a/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php +++ b/app/modules/web/Controllers/AuthToken/AuthTokenViewBase.php @@ -26,7 +26,6 @@ namespace SP\Modules\Web\Controllers\AuthToken; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; @@ -34,6 +33,8 @@ 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; use SP\Modules\Web\Controllers\ControllerBase; @@ -47,7 +48,8 @@ use SP\Mvc\View\Components\SelectItemAdapter; */ abstract class AuthTokenViewBase extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AuthTokenServiceInterface $authTokenService; private CustomFieldServiceInterface $customFieldService; @@ -75,7 +77,7 @@ abstract class AuthTokenViewBase extends ControllerBase * @throws ConstraintException * @throws QueryException * @throws SPException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ protected function setViewData(?int $authTokenId = null): void { diff --git a/app/modules/web/Controllers/AuthToken/CreateController.php b/app/modules/web/Controllers/AuthToken/CreateController.php index a3883520..45e0f390 100644 --- a/app/modules/web/Controllers/AuthToken/CreateController.php +++ b/app/modules/web/Controllers/AuthToken/CreateController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -38,7 +39,7 @@ final class CreateController extends AuthTokenViewBase { /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/AuthToken/DeleteController.php b/app/modules/web/Controllers/AuthToken/DeleteController.php index 4556ef5e..62a2a15a 100644 --- a/app/modules/web/Controllers/AuthToken/DeleteController.php +++ b/app/modules/web/Controllers/AuthToken/DeleteController.php @@ -25,9 +25,10 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -43,7 +44,7 @@ final class DeleteController extends AuthTokenSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/AuthToken/EditController.php b/app/modules/web/Controllers/AuthToken/EditController.php index a13b7ca9..0731c4bf 100644 --- a/app/modules/web/Controllers/AuthToken/EditController.php +++ b/app/modules/web/Controllers/AuthToken/EditController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -42,7 +43,7 @@ final class EditController extends AuthTokenViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/AuthToken/SaveCreateController.php b/app/modules/web/Controllers/AuthToken/SaveCreateController.php index 34b1bb66..83ecff9d 100644 --- a/app/modules/web/Controllers/AuthToken/SaveCreateController.php +++ b/app/modules/web/Controllers/AuthToken/SaveCreateController.php @@ -25,9 +25,10 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -39,7 +40,7 @@ final class SaveCreateController extends AuthTokenSaveBase { /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/AuthToken/SaveEditController.php b/app/modules/web/Controllers/AuthToken/SaveEditController.php index 93cd7fba..c8cb813b 100644 --- a/app/modules/web/Controllers/AuthToken/SaveEditController.php +++ b/app/modules/web/Controllers/AuthToken/SaveEditController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; /** @@ -44,7 +45,7 @@ final class SaveEditController extends AuthTokenSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/AuthToken/SearchController.php b/app/modules/web/Controllers/AuthToken/SearchController.php index de620eb8..f6ac1bef 100644 --- a/app/modules/web/Controllers/AuthToken/SearchController.php +++ b/app/modules/web/Controllers/AuthToken/SearchController.php @@ -24,12 +24,13 @@ namespace SP\Modules\Web\Controllers\AuthToken; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -45,7 +46,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private AuthTokenServiceInterface $authTokenService; private AuthTokenGrid $authTokenGrid; @@ -71,7 +73,7 @@ final class SearchController extends ControllerBase * @throws ConstraintException * @throws QueryException * @throws SPException - * @throws \JsonException + * @throws JsonException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/AuthToken/ViewController.php b/app/modules/web/Controllers/AuthToken/ViewController.php index 7d1a47a8..55b1984d 100644 --- a/app/modules/web/Controllers/AuthToken/ViewController.php +++ b/app/modules/web/Controllers/AuthToken/ViewController.php @@ -25,9 +25,10 @@ namespace SP\Modules\Web\Controllers\AuthToken; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -43,7 +44,7 @@ final class ViewController extends AuthTokenViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Bootstrap/GetEnvironmentController.php b/app/modules/web/Controllers/Bootstrap/GetEnvironmentController.php index 64c2341b..ecbc693b 100644 --- a/app/modules/web/Controllers/Bootstrap/GetEnvironmentController.php +++ b/app/modules/web/Controllers/Bootstrap/GetEnvironmentController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\Bootstrap; use Exception; +use JsonException; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; use SP\Core\Crypt\CryptPKI; -use SP\Core\Crypt\CryptPKIInterface; +use SP\Domain\Core\Crypt\CryptPKIInterface; use SP\Domain\Import\Services\ImportService; use SP\Infrastructure\File\FileException; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -68,7 +69,7 @@ final class GetEnvironmentController extends SimpleControllerBase * Returns environment data * * @return bool - * @throws \JsonException + * @throws JsonException */ public function getEnvironmentAction(): bool { diff --git a/app/modules/web/Controllers/Category/CategoryViewBase.php b/app/modules/web/Controllers/Category/CategoryViewBase.php index 1de780f3..f73c9ec4 100644 --- a/app/modules/web/Controllers/Category/CategoryViewBase.php +++ b/app/modules/web/Controllers/Category/CategoryViewBase.php @@ -25,7 +25,6 @@ namespace SP\Modules\Web\Controllers\Category; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; @@ -33,6 +32,7 @@ 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; @@ -50,9 +50,9 @@ abstract class CategoryViewBase extends ControllerBase private CustomFieldServiceInterface $customFieldService; public function __construct( - Application $application, - WebControllerHelper $webControllerHelper, - \SP\Domain\Category\Ports\CategoryServiceInterface $categoryService, + Application $application, + WebControllerHelper $webControllerHelper, + CategoryServiceInterface $categoryService, CustomFieldServiceInterface $customFieldService ) { parent::__construct($application, $webControllerHelper); diff --git a/app/modules/web/Controllers/Category/CreateController.php b/app/modules/web/Controllers/Category/CreateController.php index 2efe0de5..e4681c6d 100644 --- a/app/modules/web/Controllers/Category/CreateController.php +++ b/app/modules/web/Controllers/Category/CreateController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -39,7 +40,7 @@ final class CreateController extends CategoryViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/Category/DeleteController.php b/app/modules/web/Controllers/Category/DeleteController.php index 0f9f549c..18b5e5a0 100644 --- a/app/modules/web/Controllers/Category/DeleteController.php +++ b/app/modules/web/Controllers/Category/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -42,7 +43,7 @@ final class DeleteController extends CategorySaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/Category/EditController.php b/app/modules/web/Controllers/Category/EditController.php index b1e1bbe1..528bd6f5 100644 --- a/app/modules/web/Controllers/Category/EditController.php +++ b/app/modules/web/Controllers/Category/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends CategoryViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/Category/SaveCreateAction.php b/app/modules/web/Controllers/Category/SaveCreateAction.php index 72e6c8cb..604bc0c1 100644 --- a/app/modules/web/Controllers/Category/SaveCreateAction.php +++ b/app/modules/web/Controllers/Category/SaveCreateAction.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; /** @@ -38,7 +39,7 @@ final class SaveCreateAction extends CategorySaveBase { /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/Category/SaveEditController.php b/app/modules/web/Controllers/Category/SaveEditController.php index 1bf2e41e..f18b3fcb 100644 --- a/app/modules/web/Controllers/Category/SaveEditController.php +++ b/app/modules/web/Controllers/Category/SaveEditController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; /** @@ -42,7 +43,7 @@ final class SaveEditController extends CategorySaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/Category/SearchController.php b/app/modules/web/Controllers/Category/SearchController.php index 17cbe745..ae0e3f7f 100644 --- a/app/modules/web/Controllers/Category/SearchController.php +++ b/app/modules/web/Controllers/Category/SearchController.php @@ -25,12 +25,13 @@ namespace SP\Modules\Web\Controllers\Category; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -44,7 +45,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private CategoryServiceInterface $categoryService; private CategoryGrid $categoryGrid; @@ -70,7 +72,7 @@ final class SearchController extends ControllerBase * @throws ConstraintException * @throws QueryException * @throws SPException - * @throws \JsonException + * @throws JsonException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/Category/ViewController.php b/app/modules/web/Controllers/Category/ViewController.php index cf2809fb..2bbe0cb4 100644 --- a/app/modules/web/Controllers/Category/ViewController.php +++ b/app/modules/web/Controllers/Category/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\Category; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -43,7 +44,7 @@ final class ViewController extends CategoryViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Client/ClientViewBase.php b/app/modules/web/Controllers/Client/ClientViewBase.php index f8ca7738..82d53d73 100644 --- a/app/modules/web/Controllers/Client/ClientViewBase.php +++ b/app/modules/web/Controllers/Client/ClientViewBase.php @@ -26,13 +26,14 @@ namespace SP\Modules\Web\Controllers\Client; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; @@ -46,8 +47,8 @@ abstract class ClientViewBase extends ControllerBase { use ItemTrait; - private \SP\Domain\Client\Ports\ClientServiceInterface $clientService; - private CustomFieldServiceInterface $customFieldService; + private ClientServiceInterface $clientService; + private CustomFieldServiceInterface $customFieldService; public function __construct( Application $application, @@ -72,7 +73,7 @@ abstract class ClientViewBase extends ControllerBase * @throws NoSuchItemException * @throws QueryException * @throws SPException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ protected function setViewData(?int $clientId = null): void { diff --git a/app/modules/web/Controllers/Client/CreateController.php b/app/modules/web/Controllers/Client/CreateController.php index 09b56b8a..30c11643 100644 --- a/app/modules/web/Controllers/Client/CreateController.php +++ b/app/modules/web/Controllers/Client/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends ClientViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/Client/DeleteController.php b/app/modules/web/Controllers/Client/DeleteController.php index 0c58de57..106dcbba 100644 --- a/app/modules/web/Controllers/Client/DeleteController.php +++ b/app/modules/web/Controllers/Client/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends ClientSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends ClientSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/Client/EditController.php b/app/modules/web/Controllers/Client/EditController.php index 6c6570a1..6123fa6b 100644 --- a/app/modules/web/Controllers/Client/EditController.php +++ b/app/modules/web/Controllers/Client/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends ClientViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/Client/SaveCreateController.php b/app/modules/web/Controllers/Client/SaveCreateController.php index a54ca2b5..636ce7cf 100644 --- a/app/modules/web/Controllers/Client/SaveCreateController.php +++ b/app/modules/web/Controllers/Client/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,11 +40,12 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveCreateController extends ClientSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/Client/SaveEditController.php b/app/modules/web/Controllers/Client/SaveEditController.php index 5f84301b..86430272 100644 --- a/app/modules/web/Controllers/Client/SaveEditController.php +++ b/app/modules/web/Controllers/Client/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,7 +40,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveEditController extends ClientSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Saves edit action @@ -47,7 +49,7 @@ final class SaveEditController extends ClientSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/Client/SearchController.php b/app/modules/web/Controllers/Client/SearchController.php index 84ea1a3b..5432eaf5 100644 --- a/app/modules/web/Controllers/Client/SearchController.php +++ b/app/modules/web/Controllers/Client/SearchController.php @@ -25,11 +25,13 @@ namespace SP\Modules\Web\Controllers\Client; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -43,15 +45,16 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\Client\Ports\ClientServiceInterface $clientService; + private ClientServiceInterface $clientService; private ClientGrid $clientGrid; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\Client\Ports\ClientServiceInterface $clientService, + ClientServiceInterface $clientService, ClientGrid $clientGrid ) { parent::__construct($application, $webControllerHelper); @@ -69,7 +72,7 @@ final class SearchController extends ControllerBase * @throws ConstraintException * @throws QueryException * @throws SPException - * @throws \JsonException + * @throws JsonException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/Client/ViewController.php b/app/modules/web/Controllers/Client/ViewController.php index 21268478..a3b4ece5 100644 --- a/app/modules/web/Controllers/Client/ViewController.php +++ b/app/modules/web/Controllers/Client/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\Client; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends ClientViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/ConfigAccount/SaveController.php b/app/modules/web/Controllers/ConfigAccount/SaveController.php index da7b2b47..d664e233 100644 --- a/app/modules/web/Controllers/ConfigAccount/SaveController.php +++ b/app/modules/web/Controllers/ConfigAccount/SaveController.php @@ -24,12 +24,14 @@ namespace SP\Modules\Web\Controllers\ConfigAccount; -use SP\Core\Acl\AclActionsInterface; +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\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\ConfigTrait; @@ -46,7 +48,7 @@ final class SaveController extends SimpleControllerBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveAction(): bool { @@ -74,7 +76,7 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData + * @param ConfigDataInterface $configData * * @return void */ @@ -91,11 +93,11 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData - * @param \SP\Core\Events\EventMessage $eventMessage + * @param ConfigDataInterface $configData + * @param EventMessage $eventMessage * * @return void - * @throws \SP\Core\Exceptions\ValidationException + * @throws ValidationException */ private function handleFilesConfig(ConfigDataInterface $configData, EventMessage $eventMessage): void { @@ -123,8 +125,8 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData - * @param \SP\Core\Events\EventMessage $eventMessage + * @param ConfigDataInterface $configData + * @param EventMessage $eventMessage * * @return void */ @@ -150,8 +152,8 @@ final class SaveController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php b/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php index 4237a674..78326411 100644 --- a/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php +++ b/app/modules/web/Controllers/ConfigBackup/DownloadBackupAppController.php @@ -26,11 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigBackup; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Export\Services\BackupFiles; use SP\Infrastructure\File\FileHandler; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -98,8 +100,8 @@ final class DownloadBackupAppController extends SimpleControllerBase /** * initialize * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php b/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php index 5ab37fe7..13b02d57 100644 --- a/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php +++ b/app/modules/web/Controllers/ConfigBackup/DownloadBackupDbController.php @@ -25,12 +25,13 @@ namespace SP\Modules\Web\Controllers\ConfigBackup; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Export\Services\BackupFiles; use SP\Infrastructure\File\FileHandler; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -100,8 +101,8 @@ final class DownloadBackupDbController extends SimpleControllerBase /** * initialize * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php b/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php index ddd070c5..dc3bb1dd 100644 --- a/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php +++ b/app/modules/web/Controllers/ConfigBackup/DownloadExportController.php @@ -26,12 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigBackup; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Export\Services\XmlExportService; use SP\Infrastructure\File\FileHandler; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -98,8 +99,8 @@ final class DownloadExportController extends SimpleControllerBase /** * initialize * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigBackup/FileBackupController.php b/app/modules/web/Controllers/ConfigBackup/FileBackupController.php index 30ffe08f..d34005a4 100644 --- a/app/modules/web/Controllers/ConfigBackup/FileBackupController.php +++ b/app/modules/web/Controllers/ConfigBackup/FileBackupController.php @@ -26,12 +26,14 @@ namespace SP\Modules\Web\Controllers\ConfigBackup; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Export\Ports\FileBackupServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -59,7 +61,7 @@ final class FileBackupController extends SimpleControllerBase /** * @return bool - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function fileBackupAction(): bool { @@ -95,8 +97,8 @@ final class FileBackupController extends SimpleControllerBase /** * initialize * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigBackup/XmlExportController.php b/app/modules/web/Controllers/ConfigBackup/XmlExportController.php index 32c830cf..b33e1f46 100644 --- a/app/modules/web/Controllers/ConfigBackup/XmlExportController.php +++ b/app/modules/web/Controllers/ConfigBackup/XmlExportController.php @@ -25,12 +25,14 @@ namespace SP\Modules\Web\Controllers\ConfigBackup; use Exception; -use SP\Core\Acl\AclActionsInterface; 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\Export\Ports\XmlExportServiceInterface; use SP\Domain\Export\Ports\XmlVerifyServiceInterface; use SP\Http\JsonResponse; @@ -62,7 +64,7 @@ final class XmlExportController extends SimpleControllerBase /** * @return bool - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function xmlExportAction(): bool { @@ -131,8 +133,8 @@ final class XmlExportController extends SimpleControllerBase /** * initialize * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigEncryption/RefreshController.php b/app/modules/web/Controllers/ConfigEncryption/RefreshController.php index da4b4d34..6b459956 100644 --- a/app/modules/web/Controllers/ConfigEncryption/RefreshController.php +++ b/app/modules/web/Controllers/ConfigEncryption/RefreshController.php @@ -26,13 +26,15 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Crypt\Ports\MasterPassServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -62,7 +64,7 @@ final class RefreshController extends SimpleControllerBase * Refresh master password hash * * @return bool - * @throws \JsonException + * @throws JsonException */ public function refreshAction(): bool { @@ -93,8 +95,8 @@ final class RefreshController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigEncryption/SaveController.php b/app/modules/web/Controllers/ConfigEncryption/SaveController.php index f5600b2e..d4d64179 100644 --- a/app/modules/web/Controllers/ConfigEncryption/SaveController.php +++ b/app/modules/web/Controllers/ConfigEncryption/SaveController.php @@ -26,12 +26,15 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Crypt\Ports\MasterPassServiceInterface; use SP\Domain\Crypt\Services\MasterPassService; use SP\Domain\Crypt\Services\UpdateMasterPassRequest; @@ -39,6 +42,8 @@ use SP\Domain\Task\Ports\TaskInterface; use SP\Domain\Task\Services\Task; use SP\Domain\Task\Services\TaskFactory; use SP\Http\JsonResponse; +use SP\Infrastructure\Common\Repositories\NoSuchItemException; +use SP\Infrastructure\File\FileException; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\SimpleControllerHelper; @@ -67,9 +72,9 @@ final class SaveController extends SimpleControllerBase /** * @return bool - * @throws \JsonException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws JsonException + * @throws NoSuchItemException + * @throws ServiceException */ public function saveAction(): bool { @@ -190,7 +195,7 @@ final class SaveController extends SimpleControllerBase } /** - * @throws \SP\Infrastructure\File\FileException + * @throws FileException */ private function getTask(): ?TaskInterface { @@ -203,8 +208,8 @@ final class SaveController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php b/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php index e4a19213..8d5556f2 100644 --- a/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php +++ b/app/modules/web/Controllers/ConfigEncryption/SaveTempController.php @@ -25,10 +25,12 @@ namespace SP\Modules\Web\Controllers\ConfigEncryption; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Crypt\Ports\TemporaryMasterPassServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -60,7 +62,7 @@ final class SaveTempController extends SimpleControllerBase * Create a temporary master pass * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveTempAction(): bool { @@ -112,8 +114,8 @@ final class SaveTempController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php b/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php index 5f994bb0..83b76933 100644 --- a/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php +++ b/app/modules/web/Controllers/ConfigGeneral/DownloadConfigBackup.php @@ -25,14 +25,16 @@ namespace SP\Modules\Web\Controllers\ConfigGeneral; use Exception; +use JsonException; use RuntimeException; -use SP\Core\Acl\AclActionsInterface; 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\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\SimpleControllerHelper; @@ -102,8 +104,8 @@ final class DownloadConfigBackup extends SimpleControllerBase } /** - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php b/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php index 0ffa6266..1d8f19c8 100644 --- a/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php +++ b/app/modules/web/Controllers/ConfigGeneral/DownloadLogController.php @@ -26,11 +26,13 @@ namespace SP\Modules\Web\Controllers\ConfigGeneral; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Infrastructure\File\FileHandler; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -85,8 +87,8 @@ final class DownloadLogController extends SimpleControllerBase } /** - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigGeneral/SaveController.php b/app/modules/web/Controllers/ConfigGeneral/SaveController.php index b33cba47..bf62b855 100644 --- a/app/modules/web/Controllers/ConfigGeneral/SaveController.php +++ b/app/modules/web/Controllers/ConfigGeneral/SaveController.php @@ -24,14 +24,16 @@ namespace SP\Modules\Web\Controllers\ConfigGeneral; -use SP\Core\Acl\AclActionsInterface; +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\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\ConfigTrait; use SP\Util\Util; @@ -46,7 +48,7 @@ final class SaveController extends SimpleControllerBase use ConfigTrait; /** - * @throws \JsonException + * @throws JsonException */ public function saveAction(): bool { @@ -76,7 +78,7 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData + * @param ConfigDataInterface $configData * * @return void */ @@ -106,11 +108,11 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData - * @param \SP\Core\Events\EventMessage $eventMessage + * @param ConfigDataInterface $configData + * @param EventMessage $eventMessage * * @return void - * @throws \SP\Core\Exceptions\ValidationException + * @throws ValidationException */ private function handleEventsConfig(ConfigDataInterface $configData, EventMessage $eventMessage): void { @@ -151,11 +153,11 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData - * @param \SP\Core\Events\EventMessage $eventMessage + * @param ConfigDataInterface $configData + * @param EventMessage $eventMessage * * @return void - * @throws \SP\Core\Exceptions\ValidationException + * @throws ValidationException */ private function handleProxyConfig(ConfigDataInterface $configData, EventMessage $eventMessage): void { @@ -190,8 +192,8 @@ final class SaveController extends SimpleControllerBase } /** - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData - * @param \SP\Core\Events\EventMessage $eventMessage + * @param ConfigDataInterface $configData + * @param EventMessage $eventMessage * * @return void */ @@ -222,8 +224,8 @@ final class SaveController extends SimpleControllerBase } /** - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigImport/ImportController.php b/app/modules/web/Controllers/ConfigImport/ImportController.php index d4224df0..5d0eea4a 100644 --- a/app/modules/web/Controllers/ConfigImport/ImportController.php +++ b/app/modules/web/Controllers/ConfigImport/ImportController.php @@ -25,12 +25,14 @@ namespace SP\Modules\Web\Controllers\ConfigImport; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Import\Ports\ImportServiceInterface; use SP\Domain\Import\Services\FileImport; use SP\Domain\Import\Services\ImportParams; @@ -61,7 +63,7 @@ final class ImportController extends SimpleControllerBase } /** - * @throws \JsonException + * @throws JsonException */ public function importAction(): bool { @@ -110,7 +112,7 @@ final class ImportController extends SimpleControllerBase } /** - * @return \SP\Domain\Import\Services\ImportParams + * @return ImportParams */ private function getImportParams(): ImportParams { @@ -130,8 +132,8 @@ final class ImportController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigLdap/CheckController.php b/app/modules/web/Controllers/ConfigLdap/CheckController.php index 821330c6..83d661a0 100644 --- a/app/modules/web/Controllers/ConfigLdap/CheckController.php +++ b/app/modules/web/Controllers/ConfigLdap/CheckController.php @@ -27,7 +27,6 @@ namespace SP\Modules\Web\Controllers\ConfigLdap; use Exception; use JsonException; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Acl\UnauthorizedPageException; use SP\Core\Application; use SP\Core\Events\Event; @@ -35,6 +34,7 @@ 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\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 e199115e..f5110c81 100644 --- a/app/modules/web/Controllers/ConfigLdap/CheckImportController.php +++ b/app/modules/web/Controllers/ConfigLdap/CheckImportController.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\ConfigLdap; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Acl\UnauthorizedPageException; use SP\Core\Application; use SP\Core\Events\Event; @@ -34,6 +34,7 @@ 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\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -63,7 +64,7 @@ final class CheckImportController extends SimpleControllerBase /** * @return bool - * @throws \JsonException + * @throws JsonException * @throws SPException */ public function checkImportAction(): bool diff --git a/app/modules/web/Controllers/ConfigLdap/ImportController.php b/app/modules/web/Controllers/ConfigLdap/ImportController.php index 4f7b1770..0d92394d 100644 --- a/app/modules/web/Controllers/ConfigLdap/ImportController.php +++ b/app/modules/web/Controllers/ConfigLdap/ImportController.php @@ -26,17 +26,19 @@ namespace SP\Modules\Web\Controllers\ConfigLdap; use Exception; +use JsonException; use Klein\Klein; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\UI\ThemeInterface; use SP\Domain\Import\Ports\LdapImportServiceInterface; use SP\Domain\Import\Services\LdapImportParams; @@ -50,7 +52,8 @@ use SP\Modules\Web\Controllers\Traits\JsonTrait; */ final class ImportController extends SimpleControllerBase { - use JsonTrait, ConfigLdapTrait; + use ConfigLdapTrait; + use JsonTrait; private LdapImportServiceInterface $ldapImportService; @@ -72,7 +75,7 @@ final class ImportController extends SimpleControllerBase * importAction * * @return bool - * @throws \JsonException + * @throws JsonException */ public function importAction(): bool { @@ -129,7 +132,7 @@ final class ImportController extends SimpleControllerBase /** * @return array - * @throws \SP\Core\Exceptions\ValidationException + * @throws ValidationException */ private function getImportParams(): array { @@ -158,8 +161,8 @@ final class ImportController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigLdap/SaveController.php b/app/modules/web/Controllers/ConfigLdap/SaveController.php index c845e986..245ece68 100644 --- a/app/modules/web/Controllers/ConfigLdap/SaveController.php +++ b/app/modules/web/Controllers/ConfigLdap/SaveController.php @@ -25,13 +25,15 @@ namespace SP\Modules\Web\Controllers\ConfigLdap; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\ConfigTrait; @@ -43,11 +45,12 @@ use SP\Modules\Web\Controllers\Traits\ConfigTrait; */ final class SaveController extends SimpleControllerBase { - use ConfigTrait, ConfigLdapTrait; + use ConfigLdapTrait; + use ConfigTrait; /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveAction(): bool { @@ -117,8 +120,8 @@ final class SaveController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigMail/CheckController.php b/app/modules/web/Controllers/ConfigMail/CheckController.php index 89de2bfb..453c1f90 100644 --- a/app/modules/web/Controllers/ConfigMail/CheckController.php +++ b/app/modules/web/Controllers/ConfigMail/CheckController.php @@ -26,14 +26,16 @@ namespace SP\Modules\Web\Controllers\ConfigMail; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Notification\Ports\MailServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; @@ -62,7 +64,7 @@ final class CheckController extends SimpleControllerBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function checkAction(): bool { @@ -103,7 +105,7 @@ final class CheckController extends SimpleControllerBase } /** - * @return \SP\Providers\Mail\MailParams + * @return MailParams */ private function handleMailConfig(): MailParams { @@ -125,8 +127,8 @@ final class CheckController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigMail/SaveController.php b/app/modules/web/Controllers/ConfigMail/SaveController.php index 1da0c874..b461f86a 100644 --- a/app/modules/web/Controllers/ConfigMail/SaveController.php +++ b/app/modules/web/Controllers/ConfigMail/SaveController.php @@ -24,11 +24,13 @@ namespace SP\Modules\Web\Controllers\ConfigMail; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\ConfigTrait; @@ -44,7 +46,7 @@ final class SaveController extends SimpleControllerBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveAction(): bool { @@ -113,8 +115,8 @@ final class SaveController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ConfigManager/IndexController.php b/app/modules/web/Controllers/ConfigManager/IndexController.php index ca2ad2b7..cd4ef6fd 100644 --- a/app/modules/web/Controllers/ConfigManager/IndexController.php +++ b/app/modules/web/Controllers/ConfigManager/IndexController.php @@ -29,7 +29,6 @@ use DI\NotFoundException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Crypt\CryptSessionHandler; use SP\Core\Events\Event; @@ -41,6 +40,7 @@ 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\File\MimeType; use SP\Domain\Core\File\MimeTypesInterface; diff --git a/app/modules/web/Controllers/ConfigWiki/SaveController.php b/app/modules/web/Controllers/ConfigWiki/SaveController.php index a5f2f1e1..7b7fdb7c 100644 --- a/app/modules/web/Controllers/ConfigWiki/SaveController.php +++ b/app/modules/web/Controllers/ConfigWiki/SaveController.php @@ -24,10 +24,12 @@ namespace SP\Modules\Web\Controllers\ConfigWiki; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\SimpleControllerBase; use SP\Modules\Web\Controllers\Traits\ConfigTrait; @@ -43,7 +45,7 @@ final class SaveController extends SimpleControllerBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveAction(): bool { @@ -87,8 +89,8 @@ final class SaveController extends SimpleControllerBase /** * @return void - * @throws \JsonException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws JsonException + * @throws SessionTimeout */ protected function initialize(): void { diff --git a/app/modules/web/Controllers/ControllerBase.php b/app/modules/web/Controllers/ControllerBase.php index 0102051c..a81a9100 100644 --- a/app/modules/web/Controllers/ControllerBase.php +++ b/app/modules/web/Controllers/ControllerBase.php @@ -30,7 +30,6 @@ use Exception; use SP\Core\Acl\Acl; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; -use SP\Core\Context\SessionContextInterface; use SP\Core\Crypt\Hash; use SP\Core\Events\EventDispatcher; use SP\Core\Exceptions\FileNotFoundException; @@ -41,6 +40,7 @@ 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\UI\ThemeInterface; use SP\Domain\User\Services\UserLoginResponse; use SP\Http\RequestInterface; diff --git a/app/modules/web/Controllers/CustomField/CreateController.php b/app/modules/web/Controllers/CustomField/CreateController.php index e2e26e6f..4d7bf7fa 100644 --- a/app/modules/web/Controllers/CustomField/CreateController.php +++ b/app/modules/web/Controllers/CustomField/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends CustomFieldViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php b/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php index 60dc2f30..f329bf38 100644 --- a/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php +++ b/app/modules/web/Controllers/CustomField/CustomFieldViewBase.php @@ -26,11 +26,12 @@ namespace SP\Modules\Web\Controllers\CustomField; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldDefServiceInterface; use SP\Domain\CustomField\Ports\CustomFieldTypeServiceInterface; use SP\Domain\CustomField\Services\CustomFieldDefService; use SP\Infrastructure\Common\Repositories\NoSuchItemException; @@ -40,13 +41,13 @@ use SP\Mvc\View\Components\SelectItemAdapter; abstract class CustomFieldViewBase extends ControllerBase { - private \SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface $customFieldDefService; + private CustomFieldDefServiceInterface $customFieldDefService; private CustomFieldTypeServiceInterface $customFieldTypeService; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface $customFieldDefService, + CustomFieldDefServiceInterface $customFieldDefService, CustomFieldTypeServiceInterface $customFieldTypeService ) { parent::__construct($application, $webControllerHelper); diff --git a/app/modules/web/Controllers/CustomField/DeleteController.php b/app/modules/web/Controllers/CustomField/DeleteController.php index 85c46e00..b89f36bb 100644 --- a/app/modules/web/Controllers/CustomField/DeleteController.php +++ b/app/modules/web/Controllers/CustomField/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends CustomFieldSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends CustomFieldSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/CustomField/EditController.php b/app/modules/web/Controllers/CustomField/EditController.php index 9f43ac0b..8e3065b8 100644 --- a/app/modules/web/Controllers/CustomField/EditController.php +++ b/app/modules/web/Controllers/CustomField/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends CustomFieldViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/CustomField/SaveCreateController.php b/app/modules/web/Controllers/CustomField/SaveCreateController.php index 563879d0..77dd94ed 100644 --- a/app/modules/web/Controllers/CustomField/SaveCreateController.php +++ b/app/modules/web/Controllers/CustomField/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -42,7 +43,7 @@ final class SaveCreateController extends CustomFieldSaveBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/CustomField/SaveEditController.php b/app/modules/web/Controllers/CustomField/SaveEditController.php index 48fce5a3..9c64d2f0 100644 --- a/app/modules/web/Controllers/CustomField/SaveEditController.php +++ b/app/modules/web/Controllers/CustomField/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -46,7 +47,7 @@ final class SaveEditController extends CustomFieldSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/CustomField/SearchController.php b/app/modules/web/Controllers/CustomField/SearchController.php index 057e44d2..179c644e 100644 --- a/app/modules/web/Controllers/CustomField/SearchController.php +++ b/app/modules/web/Controllers/CustomField/SearchController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\CustomField; -use SP\Core\Acl\AclActionsInterface; +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\CustomField\Ports\CustomFieldDefServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -43,16 +44,17 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private CustomFieldDefServiceInterface $customFieldDefService; private CustomFieldGrid $customFieldGrid; public function __construct( - Application $application, - WebControllerHelper $webControllerHelper, - \SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface $customFieldDefService, - CustomFieldGrid $customFieldGrid + Application $application, + WebControllerHelper $webControllerHelper, + CustomFieldDefServiceInterface $customFieldDefService, + CustomFieldGrid $customFieldGrid ) { parent::__construct($application, $webControllerHelper); @@ -66,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/CustomField/ViewController.php b/app/modules/web/Controllers/CustomField/ViewController.php index 76a88fc4..6864bf0e 100644 --- a/app/modules/web/Controllers/CustomField/ViewController.php +++ b/app/modules/web/Controllers/CustomField/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\CustomField; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends CustomFieldViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Eventlog/IndexController.php b/app/modules/web/Controllers/Eventlog/IndexController.php index 4b696408..6ba557d8 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Core\Exceptions\SPException; +use SP\Domain\Core\Acl\AclActionsInterface; 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 44d518ee..6abbabbe 100644 --- a/app/modules/web/Controllers/Eventlog/SearchController.php +++ b/app/modules/web/Controllers/Eventlog/SearchController.php @@ -25,8 +25,11 @@ namespace SP\Modules\Web\Controllers\Eventlog; -use SP\Core\Acl\AclActionsInterface; +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\Security\Ports\EventlogServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -41,7 +44,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private EventlogGrid $eventlogGrid; private EventlogServiceInterface $eventlogService; @@ -64,9 +68,9 @@ final class SearchController extends ControllerBase * searchAction * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -86,9 +90,9 @@ final class SearchController 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/Helpers/Account/AccountActionsHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountActionsHelper.php index 2e2c0460..d395f40c 100644 --- a/app/modules/web/Controllers/Helpers/Account/AccountActionsHelper.php +++ b/app/modules/web/Controllers/Helpers/Account/AccountActionsHelper.php @@ -25,11 +25,11 @@ namespace SP\Modules\Web\Controllers\Helpers\Account; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\UI\ThemeIcons; use SP\Domain\Account\Services\AccountAcl; use SP\Domain\Account\Services\AccountSearchItem; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionType; use SP\Http\RequestInterface; diff --git a/app/modules/web/Controllers/Helpers/Account/AccountHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountHelper.php index 699611f7..bff4b750 100644 --- a/app/modules/web/Controllers/Helpers/Account/AccountHelper.php +++ b/app/modules/web/Controllers/Helpers/Account/AccountHelper.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\Helpers\Account; use SP\Core\Acl\AccountPermissionException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +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; @@ -45,6 +46,8 @@ use SP\Domain\Account\Services\AccountAcl; 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\AclActionsInterface; use SP\Domain\Crypt\Ports\MasterPassServiceInterface; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\ItemPreset\Ports\ItemPresetInterface; @@ -52,6 +55,7 @@ use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface; use SP\Domain\Tag\Ports\TagServiceInterface; use SP\Domain\User\Ports\UserGroupServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; +use SP\Domain\User\Services\UpdatedMasterPassException; use SP\Http\RequestInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Mvc\Controller\ItemTrait; @@ -124,17 +128,17 @@ final class AccountHelper extends AccountHelperBase /** * Sets account's view variables * - * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountDetailsResponse + * @param AccountEnrichedDto $accountDetailsResponse * @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 setViewForAccount( AccountEnrichedDto $accountDetailsResponse, @@ -287,7 +291,7 @@ final class AccountHelper extends AccountHelperBase /** * Comprobar si el usuario dispone de acceso al módulo * - * @param \SP\Domain\Account\Dtos\AccountEnrichedDto $accountDetailsResponse + * @param AccountEnrichedDto $accountDetailsResponse * * @return AccountAcl * @throws AccountPermissionException @@ -311,10 +315,10 @@ final class AccountHelper extends AccountHelperBase /** * Sets account's view common data * - * @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 setViewCommon(): void { @@ -379,14 +383,14 @@ final class AccountHelper extends AccountHelperBase * @param int $actionId * * @return void - * @throws \SP\Core\Acl\UnauthorizedPageException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\NoSuchPropertyException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Domain\User\Services\UpdatedMasterPassException + * @throws UnauthorizedPageException + * @throws ConstraintException + * @throws NoSuchPropertyException + * @throws QueryException + * @throws SPException + * @throws NoSuchItemException + * @throws ServiceException + * @throws UpdatedMasterPassException */ public function setViewForBlank(int $actionId): void { diff --git a/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php index 3e237362..a1b9c404 100644 --- a/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php +++ b/app/modules/web/Controllers/Helpers/Account/AccountPasswordHelper.php @@ -24,14 +24,21 @@ namespace SP\Modules\Web\Controllers\Helpers\Account; +use Defuse\Crypto\Exception\BadFormatException; +use Defuse\Crypto\Exception\CryptoException; +use Defuse\Crypto\Exception\EnvironmentIsBrokenException; +use Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Crypt\Ports\MasterPassServiceInterface; use SP\Http\RequestInterface; +use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\Helpers\HelperBase; use SP\Modules\Web\Controllers\Helpers\HelperException; use SP\Mvc\View\TemplateInterface; @@ -70,14 +77,14 @@ final class AccountPasswordHelper extends HelperBase * @param bool $useImage * * @return array - * @throws \Defuse\Crypto\Exception\BadFormatException - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException - * @throws \SP\Core\Exceptions\FileNotFoundException - * @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 FileNotFoundException + * @throws HelperException + * @throws NoSuchItemException + * @throws ServiceException */ public function getPasswordView( AccountPassData $accountData, @@ -131,13 +138,13 @@ final class AccountPasswordHelper extends HelperBase * @param AccountPassData $accountData * * @return string - * @throws \Defuse\Crypto\Exception\BadFormatException - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException - * @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 HelperException + * @throws NoSuchItemException + * @throws ServiceException */ public function getPasswordClear(AccountPassData $accountData): string { diff --git a/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php b/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php index c98e1807..4c8755e7 100644 --- a/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php +++ b/app/modules/web/Controllers/Helpers/Account/AccountSearchHelper.php @@ -27,7 +27,6 @@ namespace SP\Modules\Web\Controllers\Helpers\Account; use DI\DependencyException; use DI\NotFoundException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; @@ -40,6 +39,7 @@ use SP\Domain\Account\Search\AccountSearchFilter; 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\Tag\Ports\TagServiceInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; diff --git a/app/modules/web/Controllers/Helpers/Grid/AccountGrid.php b/app/modules/web/Controllers/Helpers/Grid/AccountGrid.php index ea132759..ebfad9aa 100644 --- a/app/modules/web/Controllers/Helpers/Grid/AccountGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/AccountGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionHelp; use SP\Html\DataGrid\Action\DataGridActionSearch; diff --git a/app/modules/web/Controllers/Helpers/Grid/AccountHistoryGrid.php b/app/modules/web/Controllers/Helpers/Grid/AccountHistoryGrid.php index 962a67e2..e3729359 100644 --- a/app/modules/web/Controllers/Helpers/Grid/AccountHistoryGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/AccountHistoryGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/AuthTokenGrid.php b/app/modules/web/Controllers/Helpers/Grid/AuthTokenGrid.php index 683706ec..5cf7ce42 100644 --- a/app/modules/web/Controllers/Helpers/Grid/AuthTokenGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/AuthTokenGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/CategoryGrid.php b/app/modules/web/Controllers/Helpers/Grid/CategoryGrid.php index 23ca092e..dedb93ce 100644 --- a/app/modules/web/Controllers/Helpers/Grid/CategoryGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/CategoryGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/ClientGrid.php b/app/modules/web/Controllers/Helpers/Grid/ClientGrid.php index e9c0c371..e9578656 100644 --- a/app/modules/web/Controllers/Helpers/Grid/ClientGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/ClientGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/CustomFieldGrid.php b/app/modules/web/Controllers/Helpers/Grid/CustomFieldGrid.php index c5be6e51..b9e0ca35 100644 --- a/app/modules/web/Controllers/Helpers/Grid/CustomFieldGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/CustomFieldGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Services\CustomFieldDefService; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; diff --git a/app/modules/web/Controllers/Helpers/Grid/EventlogGrid.php b/app/modules/web/Controllers/Helpers/Grid/EventlogGrid.php index d18ec8e1..6b1aa59f 100644 --- a/app/modules/web/Controllers/Helpers/Grid/EventlogGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/EventlogGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/FileGrid.php b/app/modules/web/Controllers/Helpers/Grid/FileGrid.php index a73bde4c..c8c83f86 100644 --- a/app/modules/web/Controllers/Helpers/Grid/FileGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/FileGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php b/app/modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php index 7e6f1052..378e7df8 100644 --- a/app/modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\ItemPreset\Ports\ItemPresetInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; diff --git a/app/modules/web/Controllers/Helpers/Grid/NotificationGrid.php b/app/modules/web/Controllers/Helpers/Grid/NotificationGrid.php index b5acc25f..39271d53 100644 --- a/app/modules/web/Controllers/Helpers/Grid/NotificationGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/NotificationGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionInterface; use SP\Html\DataGrid\Action\DataGridActionSearch; diff --git a/app/modules/web/Controllers/Helpers/Grid/PluginGrid.php b/app/modules/web/Controllers/Helpers/Grid/PluginGrid.php index 3401860a..16640e09 100644 --- a/app/modules/web/Controllers/Helpers/Grid/PluginGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/PluginGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/PublicLinkGrid.php b/app/modules/web/Controllers/Helpers/Grid/PublicLinkGrid.php index b5772517..c86b75b4 100644 --- a/app/modules/web/Controllers/Helpers/Grid/PublicLinkGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/PublicLinkGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/TagGrid.php b/app/modules/web/Controllers/Helpers/Grid/TagGrid.php index 7d2ec3a1..5b0d0c92 100644 --- a/app/modules/web/Controllers/Helpers/Grid/TagGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/TagGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/TrackGrid.php b/app/modules/web/Controllers/Helpers/Grid/TrackGrid.php index 3cd21409..ee122ab5 100644 --- a/app/modules/web/Controllers/Helpers/Grid/TrackGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/TrackGrid.php @@ -25,7 +25,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/UserGrid.php b/app/modules/web/Controllers/Helpers/Grid/UserGrid.php index 48fe2bbd..b769301f 100644 --- a/app/modules/web/Controllers/Helpers/Grid/UserGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/UserGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/UserGroupGrid.php b/app/modules/web/Controllers/Helpers/Grid/UserGroupGrid.php index a52e7ef4..30040a4b 100644 --- a/app/modules/web/Controllers/Helpers/Grid/UserGroupGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/UserGroupGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/Grid/UserProfileGrid.php b/app/modules/web/Controllers/Helpers/Grid/UserProfileGrid.php index 025b56ed..8eb70f4b 100644 --- a/app/modules/web/Controllers/Helpers/Grid/UserProfileGrid.php +++ b/app/modules/web/Controllers/Helpers/Grid/UserProfileGrid.php @@ -26,7 +26,7 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Html\DataGrid\Action\DataGridAction; use SP\Html\DataGrid\Action\DataGridActionSearch; use SP\Html\DataGrid\Action\DataGridActionType; diff --git a/app/modules/web/Controllers/Helpers/HelperBase.php b/app/modules/web/Controllers/Helpers/HelperBase.php index c6601c4e..aba50127 100644 --- a/app/modules/web/Controllers/Helpers/HelperBase.php +++ b/app/modules/web/Controllers/Helpers/HelperBase.php @@ -25,10 +25,10 @@ namespace SP\Modules\Web\Controllers\Helpers; use SP\Core\Application; -use SP\Core\Context\ContextInterface; use SP\Core\Events\EventDispatcher; use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Services\ConfigFileService; +use SP\Domain\Core\Context\ContextInterface; use SP\Http\Request; use SP\Http\RequestInterface; use SP\Mvc\View\TemplateInterface; @@ -50,9 +50,9 @@ abstract class HelperBase /** * Constructor * - * @param \SP\Core\Application $application - * @param \SP\Mvc\View\TemplateInterface $template - * @param \SP\Http\RequestInterface $request + * @param Application $application + * @param TemplateInterface $template + * @param RequestInterface $request */ public function __construct( Application $application, diff --git a/app/modules/web/Controllers/Helpers/LayoutHelper.php b/app/modules/web/Controllers/Helpers/LayoutHelper.php index 3256358e..8072735a 100644 --- a/app/modules/web/Controllers/Helpers/LayoutHelper.php +++ b/app/modules/web/Controllers/Helpers/LayoutHelper.php @@ -25,13 +25,13 @@ namespace SP\Modules\Web\Controllers\Helpers; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; -use SP\Core\Crypt\CryptPKIInterface; 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\UI\ThemeInterface; use SP\Domain\Install\Services\InstallerService; use SP\Html\DataGrid\Action\DataGridAction; diff --git a/app/modules/web/Controllers/ItemManager/IndexController.php b/app/modules/web/Controllers/ItemManager/IndexController.php index 503f90ff..986cd199 100644 --- a/app/modules/web/Controllers/ItemManager/IndexController.php +++ b/app/modules/web/Controllers/ItemManager/IndexController.php @@ -25,7 +25,6 @@ namespace SP\Modules\Web\Controllers\ItemManager; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Exceptions\ConstraintException; @@ -36,6 +35,7 @@ use SP\Domain\Account\Ports\AccountHistoryServiceInterface; 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\CustomField\Ports\CustomFieldDefServiceInterface; use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface; use SP\Domain\Tag\Ports\TagServiceInterface; @@ -135,8 +135,8 @@ final class IndexController extends ControllerBase /** * Returns a tabbed grid with items * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ protected function getGridTabs(): void { @@ -191,9 +191,9 @@ final class IndexController extends ControllerBase /** * Returns categories' data tab * - * @return \SP\Html\DataGrid\DataGridTab - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @return DataGridTab + * @throws ConstraintException + * @throws QueryException */ protected function getCategoriesList(): DataGridTab { @@ -204,8 +204,8 @@ final class IndexController extends ControllerBase * Returns tags' data tab * * @return DataGridTab - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ protected function getTagsList(): DataGridTab { @@ -253,8 +253,8 @@ final class IndexController extends ControllerBase * Returns accounts' data tab * * @return DataGridTab - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ protected function getAccountsList(): DataGridTab { @@ -265,8 +265,8 @@ final class IndexController extends ControllerBase * Returns accounts' history data tab * * @return DataGridTab - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ protected function getAccountsHistoryList(): DataGridTab { @@ -278,8 +278,8 @@ final class IndexController extends ControllerBase * Returns API tokens data tab * * @return DataGridTab - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ protected function getItemPresetList(): DataGridTab { diff --git a/app/modules/web/Controllers/ItemPreset/CreateController.php b/app/modules/web/Controllers/ItemPreset/CreateController.php index 302e7911..04e32fad 100644 --- a/app/modules/web/Controllers/ItemPreset/CreateController.php +++ b/app/modules/web/Controllers/ItemPreset/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Util\Filter; @@ -43,7 +44,7 @@ final class CreateController extends ItemPresetViewBase * @param mixed ...$args * * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(...$args): bool { diff --git a/app/modules/web/Controllers/ItemPreset/DeleteController.php b/app/modules/web/Controllers/ItemPreset/DeleteController.php index 64873196..cc0d0ce7 100644 --- a/app/modules/web/Controllers/ItemPreset/DeleteController.php +++ b/app/modules/web/Controllers/ItemPreset/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends ItemPresetSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends ItemPresetSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/ItemPreset/EditController.php b/app/modules/web/Controllers/ItemPreset/EditController.php index b69f63aa..8f508a35 100644 --- a/app/modules/web/Controllers/ItemPreset/EditController.php +++ b/app/modules/web/Controllers/ItemPreset/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends ItemPresetViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php b/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php index c4063b49..32f5b4f3 100644 --- a/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php +++ b/app/modules/web/Controllers/ItemPreset/ItemPresetViewBase.php @@ -26,14 +26,15 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\ItemPreset\Ports\ItemPresetInterface; +use SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; use SP\Modules\Web\Controllers\Helpers\ItemPresetHelper; @@ -44,13 +45,13 @@ use SP\Mvc\Controller\WebControllerHelper; */ abstract class ItemPresetViewBase extends ControllerBase { - private \SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface $itemPresetService; + private ItemPresetServiceInterface $itemPresetService; private ItemPresetHelper $itemPresetHelper; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface $itemPresetService, + ItemPresetServiceInterface $itemPresetService, ItemPresetHelper $itemPresetHelper ) { parent::__construct($application, $webControllerHelper); @@ -94,7 +95,7 @@ abstract class ItemPresetViewBase extends ControllerBase case ItemPresetInterface::ITEM_TYPE_ACCOUNT_PRIVATE: $this->itemPresetHelper->makeAccountPrivateView($itemPresetData); break; - case \SP\Domain\ItemPreset\Ports\ItemPresetInterface::ITEM_TYPE_SESSION_TIMEOUT: + case ItemPresetInterface::ITEM_TYPE_SESSION_TIMEOUT: $this->itemPresetHelper->makeSessionTimeoutView($itemPresetData); break; case ItemPresetInterface::ITEM_TYPE_ACCOUNT_PASSWORD: diff --git a/app/modules/web/Controllers/ItemPreset/SaveCreateController.php b/app/modules/web/Controllers/ItemPreset/SaveCreateController.php index 0ad60082..ec7e6a42 100644 --- a/app/modules/web/Controllers/ItemPreset/SaveCreateController.php +++ b/app/modules/web/Controllers/ItemPreset/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -42,7 +43,7 @@ final class SaveCreateController extends ItemPresetSaveBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/ItemPreset/SaveEditController.php b/app/modules/web/Controllers/ItemPreset/SaveEditController.php index 4b89c331..b11c6f7c 100644 --- a/app/modules/web/Controllers/ItemPreset/SaveEditController.php +++ b/app/modules/web/Controllers/ItemPreset/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -46,7 +47,7 @@ final class SaveEditController extends ItemPresetSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/ItemPreset/SearchController.php b/app/modules/web/Controllers/ItemPreset/SearchController.php index 4f58f98b..e5f99d52 100644 --- a/app/modules/web/Controllers/ItemPreset/SearchController.php +++ b/app/modules/web/Controllers/ItemPreset/SearchController.php @@ -25,8 +25,12 @@ namespace SP\Modules\Web\Controllers\ItemPreset; -use SP\Core\Acl\AclActionsInterface; +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\ItemPreset\Ports\ItemPresetServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -40,15 +44,16 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface $itemPresetService; + private ItemPresetServiceInterface $itemPresetService; private ItemPresetGrid $itemPresetGrid; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\ItemPreset\Ports\ItemPresetServiceInterface $itemPresetService, + ItemPresetServiceInterface $itemPresetService, ItemPresetGrid $itemPresetGrid ) { parent::__construct($application, $webControllerHelper); @@ -64,9 +69,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -87,9 +92,9 @@ final class SearchController 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/ItemPreset/ViewController.php b/app/modules/web/Controllers/ItemPreset/ViewController.php index 8f2c631a..b2fcca1b 100644 --- a/app/modules/web/Controllers/ItemPreset/ViewController.php +++ b/app/modules/web/Controllers/ItemPreset/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\ItemPreset; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class ViewController extends ItemPresetViewBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * View action @@ -46,7 +48,7 @@ final class ViewController extends ItemPresetViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Notification/CheckController.php b/app/modules/web/Controllers/Notification/CheckController.php index 9db53a3d..4a1b1207 100644 --- a/app/modules/web/Controllers/Notification/CheckController.php +++ b/app/modules/web/Controllers/Notification/CheckController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -42,7 +43,7 @@ final class CheckController extends NotificationSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function checkAction(int $id): bool { diff --git a/app/modules/web/Controllers/Notification/CreateController.php b/app/modules/web/Controllers/Notification/CreateController.php index 6ceff377..89b2bed6 100644 --- a/app/modules/web/Controllers/Notification/CreateController.php +++ b/app/modules/web/Controllers/Notification/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends NotificationViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/Notification/EditController.php b/app/modules/web/Controllers/Notification/EditController.php index 3af09757..4cb4cc21 100644 --- a/app/modules/web/Controllers/Notification/EditController.php +++ b/app/modules/web/Controllers/Notification/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends NotificationViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/Notification/IndexController.php b/app/modules/web/Controllers/Notification/IndexController.php index be4f0dfb..d1882751 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Core\Exceptions\SPException; +use SP\Domain\Core\Acl\AclActionsInterface; 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 dc7e728e..fc019f48 100644 --- a/app/modules/web/Controllers/Notification/NotificationViewBase.php +++ b/app/modules/web/Controllers/Notification/NotificationViewBase.php @@ -26,11 +26,11 @@ namespace SP\Modules\Web\Controllers\Notification; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Notification\Ports\NotificationServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; @@ -47,10 +47,10 @@ abstract class NotificationViewBase extends ControllerBase private UserServiceInterface $userService; public function __construct( - Application $application, - WebControllerHelper $webControllerHelper, - \SP\Domain\Notification\Ports\NotificationServiceInterface $notificationService, - UserServiceInterface $userService + Application $application, + WebControllerHelper $webControllerHelper, + NotificationServiceInterface $notificationService, + UserServiceInterface $userService ) { parent::__construct($application, $webControllerHelper); diff --git a/app/modules/web/Controllers/Notification/SaveCreateController.php b/app/modules/web/Controllers/Notification/SaveCreateController.php index 9756a7c5..b3aa4a8a 100644 --- a/app/modules/web/Controllers/Notification/SaveCreateController.php +++ b/app/modules/web/Controllers/Notification/SaveCreateController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -38,7 +39,7 @@ final class SaveCreateController extends NotificationSaveBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/Notification/SaveEditController.php b/app/modules/web/Controllers/Notification/SaveEditController.php index d0deb364..9cc48f7d 100644 --- a/app/modules/web/Controllers/Notification/SaveEditController.php +++ b/app/modules/web/Controllers/Notification/SaveEditController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class SaveEditController extends NotificationSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/Notification/SearchController.php b/app/modules/web/Controllers/Notification/SearchController.php index ba01a627..5f652fef 100644 --- a/app/modules/web/Controllers/Notification/SearchController.php +++ b/app/modules/web/Controllers/Notification/SearchController.php @@ -25,8 +25,11 @@ namespace SP\Modules\Web\Controllers\Notification; -use SP\Core\Acl\AclActionsInterface; +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\Notification\Ports\NotificationServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -41,7 +44,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private NotificationServiceInterface $notificationService; private NotificationGrid $notificationGrid; @@ -62,9 +66,9 @@ final class SearchController extends ControllerBase /** * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -84,9 +88,9 @@ final class SearchController 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/Notification/ViewController.php b/app/modules/web/Controllers/Notification/ViewController.php index f82b2c0f..63312568 100644 --- a/app/modules/web/Controllers/Notification/ViewController.php +++ b/app/modules/web/Controllers/Notification/ViewController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Notification; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class ViewController extends NotificationViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Plugin/DeleteController.php b/app/modules/web/Controllers/Plugin/DeleteController.php index 926ba68d..f4961c59 100644 --- a/app/modules/web/Controllers/Plugin/DeleteController.php +++ b/app/modules/web/Controllers/Plugin/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Plugin; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Application; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\Plugin\Ports\PluginServiceInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -41,9 +42,10 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class DeleteController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\Plugin\Ports\PluginServiceInterface $pluginService; + private PluginServiceInterface $pluginService; public function __construct( Application $application, @@ -63,7 +65,7 @@ final class DeleteController extends ControllerBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/Plugin/IndexController.php b/app/modules/web/Controllers/Plugin/IndexController.php index c54f7556..c0950933 100644 --- a/app/modules/web/Controllers/Plugin/IndexController.php +++ b/app/modules/web/Controllers/Plugin/IndexController.php @@ -24,7 +24,9 @@ namespace SP\Modules\Web\Controllers\Plugin; -use SP\Core\Acl\AclActionsInterface; +use SP\Core\Exceptions\ConstraintException; +use SP\Core\Exceptions\QueryException; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class IndexController @@ -36,8 +38,8 @@ final class IndexController extends PluginSearchBase /** * indexAction * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function indexAction(): void { diff --git a/app/modules/web/Controllers/Plugin/SearchController.php b/app/modules/web/Controllers/Plugin/SearchController.php index 51a4c458..0ca947fa 100644 --- a/app/modules/web/Controllers/Plugin/SearchController.php +++ b/app/modules/web/Controllers/Plugin/SearchController.php @@ -25,7 +25,10 @@ namespace SP\Modules\Web\Controllers\Plugin; -use SP\Core\Acl\AclActionsInterface; +use JsonException; +use SP\Core\Exceptions\ConstraintException; +use SP\Core\Exceptions\QueryException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** @@ -37,9 +40,9 @@ final class SearchController extends PluginSearchBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { diff --git a/app/modules/web/Controllers/Plugin/ViewController.php b/app/modules/web/Controllers/Plugin/ViewController.php index f204618d..92a19858 100644 --- a/app/modules/web/Controllers/Plugin/ViewController.php +++ b/app/modules/web/Controllers/Plugin/ViewController.php @@ -26,12 +26,16 @@ namespace SP\Modules\Web\Controllers\Plugin; use Exception; +use JsonException; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Plugin\Ports\PluginServiceInterface; use SP\Http\JsonResponse; +use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Plugin\Repositories\PluginModel; use SP\Modules\Web\Controllers\ControllerBase; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -68,7 +72,7 @@ final class ViewController extends ControllerBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { @@ -102,9 +106,9 @@ final class ViewController extends ControllerBase * * @param int|null $pluginId * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @throws ConstraintException + * @throws QueryException + * @throws NoSuchItemException */ protected function setViewData(?int $pluginId = null): void { diff --git a/app/modules/web/Controllers/PublicLink/CreateController.php b/app/modules/web/Controllers/PublicLink/CreateController.php index 63ceaaa7..a2a211b1 100644 --- a/app/modules/web/Controllers/PublicLink/CreateController.php +++ b/app/modules/web/Controllers/PublicLink/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends PublicLinkViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/PublicLink/DeleteController.php b/app/modules/web/Controllers/PublicLink/DeleteController.php index 71644c35..07f77233 100644 --- a/app/modules/web/Controllers/PublicLink/DeleteController.php +++ b/app/modules/web/Controllers/PublicLink/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends PublicLinkSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends PublicLinkSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/PublicLink/EditController.php b/app/modules/web/Controllers/PublicLink/EditController.php index 58f1e68e..22644386 100644 --- a/app/modules/web/Controllers/PublicLink/EditController.php +++ b/app/modules/web/Controllers/PublicLink/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends PublicLinkViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/PublicLink/PublicLinkController.php b/app/modules/web/Controllers/PublicLink/PublicLinkController.php index 37434ba4..dc667e47 100644 --- a/app/modules/web/Controllers/PublicLink/PublicLinkController.php +++ b/app/modules/web/Controllers/PublicLink/PublicLinkController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class PublicLinkController extends PublicLinkViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php b/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php index 8cc913ba..a3010e46 100644 --- a/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php +++ b/app/modules/web/Controllers/PublicLink/PublicLinkViewBase.php @@ -26,13 +26,16 @@ namespace SP\Modules\Web\Controllers\PublicLink; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; use SP\Mvc\Controller\WebControllerHelper; use SP\Mvc\View\Components\SelectItemAdapter; @@ -64,9 +67,9 @@ abstract class PublicLinkViewBase extends ControllerBase * * @param int|null $publicLinkId * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @throws ConstraintException + * @throws QueryException + * @throws NoSuchItemException */ protected function setViewData(?int $publicLinkId = null): void { diff --git a/app/modules/web/Controllers/PublicLink/RefreshController.php b/app/modules/web/Controllers/PublicLink/RefreshController.php index 392ba6f8..cce1de09 100644 --- a/app/modules/web/Controllers/PublicLink/RefreshController.php +++ b/app/modules/web/Controllers/PublicLink/RefreshController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class RefreshController extends PublicLinkSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function refreshAction(int $id): bool { diff --git a/app/modules/web/Controllers/PublicLink/SaveCreate.php b/app/modules/web/Controllers/PublicLink/SaveCreate.php index 3035bd4e..8bafb077 100644 --- a/app/modules/web/Controllers/PublicLink/SaveCreate.php +++ b/app/modules/web/Controllers/PublicLink/SaveCreate.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -41,7 +42,7 @@ final class SaveCreate extends PublicLinkSaveBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/PublicLink/SaveCreateFromAccountController.php b/app/modules/web/Controllers/PublicLink/SaveCreateFromAccountController.php index a34ef87d..99c43567 100644 --- a/app/modules/web/Controllers/PublicLink/SaveCreateFromAccountController.php +++ b/app/modules/web/Controllers/PublicLink/SaveCreateFromAccountController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\PublicLink; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\DataModel\PublicLinkData; use SP\Domain\Account\Services\PublicLinkService; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Util\PasswordUtil; @@ -47,7 +48,7 @@ final class SaveCreateFromAccountController extends PublicLinkSaveBase * @param int $notify * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateFromAccountAction(int $accountId, int $notify): bool { diff --git a/app/modules/web/Controllers/PublicLink/SearchController.php b/app/modules/web/Controllers/PublicLink/SearchController.php index 57cb1533..3779aff7 100644 --- a/app/modules/web/Controllers/PublicLink/SearchController.php +++ b/app/modules/web/Controllers/PublicLink/SearchController.php @@ -25,9 +25,12 @@ namespace SP\Modules\Web\Controllers\PublicLink; -use SP\Core\Acl\AclActionsInterface; +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\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -41,7 +44,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private PublicLinkServiceInterface $publicLinkService; private PublicLinkGrid $publicLinkGrid; @@ -64,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -87,9 +91,9 @@ final class SearchController 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/SecurityManager/IndexController.php b/app/modules/web/Controllers/SecurityManager/IndexController.php index 20ff3a11..d6cf1428 100644 --- a/app/modules/web/Controllers/SecurityManager/IndexController.php +++ b/app/modules/web/Controllers/SecurityManager/IndexController.php @@ -25,12 +25,12 @@ namespace SP\Modules\Web\Controllers\SecurityManager; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\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 15762dd3..bcef797c 100644 --- a/app/modules/web/Controllers/SimpleControllerBase.php +++ b/app/modules/web/Controllers/SimpleControllerBase.php @@ -27,13 +27,13 @@ namespace SP\Modules\Web\Controllers; use SP\Core\Acl\Acl; use SP\Core\Acl\UnauthorizedPageException; use SP\Core\Application; -use SP\Core\Context\ContextInterface; 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\Context\ContextInterface; use SP\Domain\Core\UI\ThemeInterface; use SP\Http\Request; use SP\Modules\Web\Controllers\Traits\WebControllerTrait; @@ -58,7 +58,7 @@ abstract class SimpleControllerBase protected ConfigDataInterface $configData; /** - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SessionTimeout */ public function __construct( Application $application, @@ -84,8 +84,8 @@ abstract class SimpleControllerBase /** * Comprobaciones * - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Core\Exceptions\SessionTimeout + * @throws SPException + * @throws SessionTimeout */ protected function checks(): void { diff --git a/app/modules/web/Controllers/Tag/CreateController.php b/app/modules/web/Controllers/Tag/CreateController.php index b40ef8c7..beb7db7f 100644 --- a/app/modules/web/Controllers/Tag/CreateController.php +++ b/app/modules/web/Controllers/Tag/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends TagViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/Tag/DeleteController.php b/app/modules/web/Controllers/Tag/DeleteController.php index 37db0988..70a694fe 100644 --- a/app/modules/web/Controllers/Tag/DeleteController.php +++ b/app/modules/web/Controllers/Tag/DeleteController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -37,7 +38,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends TagSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -45,7 +47,7 @@ final class DeleteController extends TagSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/Tag/EditController.php b/app/modules/web/Controllers/Tag/EditController.php index cbc8bba9..8b4f3750 100644 --- a/app/modules/web/Controllers/Tag/EditController.php +++ b/app/modules/web/Controllers/Tag/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends TagViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/Tag/SaveCreateController.php b/app/modules/web/Controllers/Tag/SaveCreateController.php index c02042cf..f000d924 100644 --- a/app/modules/web/Controllers/Tag/SaveCreateController.php +++ b/app/modules/web/Controllers/Tag/SaveCreateController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -41,7 +42,7 @@ final class SaveCreateController extends TagSaveBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/Tag/SaveEditController.php b/app/modules/web/Controllers/Tag/SaveEditController.php index 76e1f02b..c2d7046d 100644 --- a/app/modules/web/Controllers/Tag/SaveEditController.php +++ b/app/modules/web/Controllers/Tag/SaveEditController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Exceptions\ValidationException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class SaveEditController extends TagSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/Tag/SearchController.php b/app/modules/web/Controllers/Tag/SearchController.php index 5adaf54e..732b7a25 100644 --- a/app/modules/web/Controllers/Tag/SearchController.php +++ b/app/modules/web/Controllers/Tag/SearchController.php @@ -25,8 +25,11 @@ namespace SP\Modules\Web\Controllers\Tag; -use SP\Core\Acl\AclActionsInterface; +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\Tag\Ports\TagServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -41,10 +44,11 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\Tag\Ports\TagServiceInterface $tagService; - private TagGrid $tagGrid; + private TagServiceInterface $tagService; + private TagGrid $tagGrid; public function __construct( Application $application, @@ -64,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -87,9 +91,9 @@ final class SearchController 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/Tag/TagViewBase.php b/app/modules/web/Controllers/Tag/TagViewBase.php index fc3c53b9..75a91437 100644 --- a/app/modules/web/Controllers/Tag/TagViewBase.php +++ b/app/modules/web/Controllers/Tag/TagViewBase.php @@ -26,11 +26,11 @@ namespace SP\Modules\Web\Controllers\Tag; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\Tag\Ports\TagServiceInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; @@ -41,7 +41,7 @@ use SP\Mvc\Controller\WebControllerHelper; */ abstract class TagViewBase extends ControllerBase { - private \SP\Domain\Tag\Ports\TagServiceInterface $tagService; + private TagServiceInterface $tagService; public function __construct( Application $application, diff --git a/app/modules/web/Controllers/Tag/ViewController.php b/app/modules/web/Controllers/Tag/ViewController.php index e772248b..77d541f6 100644 --- a/app/modules/web/Controllers/Tag/ViewController.php +++ b/app/modules/web/Controllers/Tag/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\Tag; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends TagViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/Track/ClearController.php b/app/modules/web/Controllers/Track/ClearController.php index c954bf1d..613d7e44 100644 --- a/app/modules/web/Controllers/Track/ClearController.php +++ b/app/modules/web/Controllers/Track/ClearController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\Track; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class ClearController extends TrackBase * Clears tracks * * @return bool - * @throws \JsonException + * @throws JsonException */ public function clearAction(): bool { diff --git a/app/modules/web/Controllers/Track/SearchController.php b/app/modules/web/Controllers/Track/SearchController.php index 362f7096..6f5b8502 100644 --- a/app/modules/web/Controllers/Track/SearchController.php +++ b/app/modules/web/Controllers/Track/SearchController.php @@ -25,10 +25,13 @@ namespace SP\Modules\Web\Controllers\Track; -use SP\Core\Acl\AclActionsInterface; +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\Security\Ports\TrackServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Modules\Web\Controllers\ControllerBase; @@ -42,7 +45,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private TrackServiceInterface $trackService; private TrackGrid $trackGrid; @@ -65,10 +69,10 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Acl\UnauthorizedActionException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws UnauthorizedActionException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -86,9 +90,9 @@ final class SearchController 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/Track/UnlockController.php b/app/modules/web/Controllers/Track/UnlockController.php index 57ecbf3b..586fdd15 100644 --- a/app/modules/web/Controllers/Track/UnlockController.php +++ b/app/modules/web/Controllers/Track/UnlockController.php @@ -25,10 +25,11 @@ namespace SP\Modules\Web\Controllers\Track; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -47,7 +48,7 @@ final class UnlockController extends TrackBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function unlockAction(int $id): ?bool { diff --git a/app/modules/web/Controllers/Upgrade/IndexController.php b/app/modules/web/Controllers/Upgrade/IndexController.php index c75f83fc..60ea4774 100644 --- a/app/modules/web/Controllers/Upgrade/IndexController.php +++ b/app/modules/web/Controllers/Upgrade/IndexController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\Upgrade; use SP\Core\Acl\Actions; -use SP\Core\Acl\ActionsInterface; use SP\Core\Application; +use SP\Domain\Core\Acl\ActionsInterface; +use SP\Infrastructure\File\FileException; use SP\Modules\Web\Controllers\ControllerBase; use SP\Mvc\Controller\WebControllerHelper; @@ -48,7 +49,7 @@ final class IndexController extends ControllerBase /** * indexAction * - * @throws \SP\Infrastructure\File\FileException + * @throws FileException */ public function indexAction(): void { diff --git a/app/modules/web/Controllers/User/CreateController.php b/app/modules/web/Controllers/User/CreateController.php index abc8f229..fb57a375 100644 --- a/app/modules/web/Controllers/User/CreateController.php +++ b/app/modules/web/Controllers/User/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends UserViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/User/DeleteController.php b/app/modules/web/Controllers/User/DeleteController.php index f17d0d55..42168c0c 100644 --- a/app/modules/web/Controllers/User/DeleteController.php +++ b/app/modules/web/Controllers/User/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends UserSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends UserSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/User/EditController.php b/app/modules/web/Controllers/User/EditController.php index 91f55d80..5cf19368 100644 --- a/app/modules/web/Controllers/User/EditController.php +++ b/app/modules/web/Controllers/User/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends UserViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/User/EditPassController.php b/app/modules/web/Controllers/User/EditPassController.php index da866fcb..5e841f0a 100644 --- a/app/modules/web/Controllers/User/EditPassController.php +++ b/app/modules/web/Controllers/User/EditPassController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\DataModel\UserData; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class EditPassController extends UserViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editPassAction(int $id): bool { diff --git a/app/modules/web/Controllers/User/SaveCreateController.php b/app/modules/web/Controllers/User/SaveCreateController.php index e8bfc8cb..41a65b6f 100644 --- a/app/modules/web/Controllers/User/SaveCreateController.php +++ b/app/modules/web/Controllers/User/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,11 +40,12 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveCreateController extends UserSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction() { diff --git a/app/modules/web/Controllers/User/SaveEditController.php b/app/modules/web/Controllers/User/SaveEditController.php index ac1bbc07..0c7e8141 100644 --- a/app/modules/web/Controllers/User/SaveEditController.php +++ b/app/modules/web/Controllers/User/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,7 +40,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveEditController extends UserSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Saves edit action @@ -47,7 +49,7 @@ final class SaveEditController extends UserSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/User/SaveEditPassController.php b/app/modules/web/Controllers/User/SaveEditPassController.php index 1281e683..cd7427e9 100644 --- a/app/modules/web/Controllers/User/SaveEditPassController.php +++ b/app/modules/web/Controllers/User/SaveEditPassController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -46,7 +47,7 @@ final class SaveEditPassController extends UserSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditPassAction(int $id): bool { diff --git a/app/modules/web/Controllers/User/SearchController.php b/app/modules/web/Controllers/User/SearchController.php index 3e7d91dd..9e06aae3 100644 --- a/app/modules/web/Controllers/User/SearchController.php +++ b/app/modules/web/Controllers/User/SearchController.php @@ -25,8 +25,12 @@ namespace SP\Modules\Web\Controllers\User; -use SP\Core\Acl\AclActionsInterface; +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\User\Ports\UserServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\ControllerBase; @@ -40,15 +44,16 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; - private \SP\Domain\User\Ports\UserServiceInterface $userService; + private UserServiceInterface $userService; private UserGrid $userGrid; public function __construct( Application $application, WebControllerHelper $webControllerHelper, - \SP\Domain\User\Ports\UserServiceInterface $userService, + UserServiceInterface $userService, UserGrid $userGrid ) { parent::__construct($application, $webControllerHelper); @@ -63,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -86,9 +91,9 @@ final class SearchController 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/User/UserViewBase.php b/app/modules/web/Controllers/User/UserViewBase.php index 028afa4c..ab14ad1d 100644 --- a/app/modules/web/Controllers/User/UserViewBase.php +++ b/app/modules/web/Controllers/User/UserViewBase.php @@ -26,10 +26,15 @@ namespace SP\Modules\Web\Controllers\User; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldServiceInterface; +use SP\Domain\User\Ports\UserGroupServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; use SP\Modules\Web\Controllers\ControllerBase; @@ -45,7 +50,7 @@ abstract class UserViewBase extends ControllerBase use ItemTrait; protected UserServiceInterface $userService; - private \SP\Domain\User\Ports\UserGroupServiceInterface $userGroupService; + private UserGroupServiceInterface $userGroupService; private UserProfileServiceInterface $userProfileService; private CustomFieldServiceInterface $customFieldService; @@ -53,7 +58,7 @@ abstract class UserViewBase extends ControllerBase Application $application, WebControllerHelper $webControllerHelper, UserServiceInterface $userService, - \SP\Domain\User\Ports\UserGroupServiceInterface $userGroupService, + UserGroupServiceInterface $userGroupService, UserProfileServiceInterface $userProfileService, CustomFieldServiceInterface $customFieldService ) { @@ -72,10 +77,10 @@ abstract class UserViewBase extends ControllerBase * * @param int|null $userId * - * @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 setViewData(?int $userId = null): void { diff --git a/app/modules/web/Controllers/User/ViewController.php b/app/modules/web/Controllers/User/ViewController.php index 5830a997..e8da3aa2 100644 --- a/app/modules/web/Controllers/User/ViewController.php +++ b/app/modules/web/Controllers/User/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\User; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends UserViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserGroup/CreateController.php b/app/modules/web/Controllers/UserGroup/CreateController.php index ca739796..6e7fedf7 100644 --- a/app/modules/web/Controllers/UserGroup/CreateController.php +++ b/app/modules/web/Controllers/UserGroup/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends UserGroupViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/UserGroup/DeleteController.php b/app/modules/web/Controllers/UserGroup/DeleteController.php index 251a665a..b05dbb86 100644 --- a/app/modules/web/Controllers/UserGroup/DeleteController.php +++ b/app/modules/web/Controllers/UserGroup/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends UserGroupSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends UserGroupSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/UserGroup/EditController.php b/app/modules/web/Controllers/UserGroup/EditController.php index 99be8ebd..53bebad4 100644 --- a/app/modules/web/Controllers/UserGroup/EditController.php +++ b/app/modules/web/Controllers/UserGroup/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends UserGroupViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserGroup/SaveCreateController.php b/app/modules/web/Controllers/UserGroup/SaveCreateController.php index 8485cd1e..cda11af4 100644 --- a/app/modules/web/Controllers/UserGroup/SaveCreateController.php +++ b/app/modules/web/Controllers/UserGroup/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,11 +40,12 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveCreateController extends UserGroupSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/UserGroup/SaveEditController.php b/app/modules/web/Controllers/UserGroup/SaveEditController.php index 022416c5..e6a450b2 100644 --- a/app/modules/web/Controllers/UserGroup/SaveEditController.php +++ b/app/modules/web/Controllers/UserGroup/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,7 +40,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveEditController extends UserGroupSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Saves edit action @@ -47,7 +49,7 @@ final class SaveEditController extends UserGroupSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserGroup/SearchController.php b/app/modules/web/Controllers/UserGroup/SearchController.php index e48b2c78..7a89ff19 100644 --- a/app/modules/web/Controllers/UserGroup/SearchController.php +++ b/app/modules/web/Controllers/UserGroup/SearchController.php @@ -25,8 +25,11 @@ namespace SP\Modules\Web\Controllers\UserGroup; -use SP\Core\Acl\AclActionsInterface; +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\User\Ports\UserGroupServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -41,7 +44,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private UserGroupServiceInterface $userGroupService; private UserGroupGrid $userGroupGrid; @@ -64,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -87,9 +91,9 @@ final class SearchController 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/UserGroup/UserGroupViewBase.php b/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php index 4fee6f82..22085f69 100644 --- a/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php +++ b/app/modules/web/Controllers/UserGroup/UserGroupViewBase.php @@ -26,12 +26,17 @@ namespace SP\Modules\Web\Controllers\UserGroup; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\User\Ports\UserGroupServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; +use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; use SP\Mvc\Controller\ItemTrait; use SP\Mvc\Controller\WebControllerHelper; @@ -69,11 +74,11 @@ abstract class UserGroupViewBase extends ControllerBase * * @param int|null $userGroupId * - * @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 setViewData(?int $userGroupId = null): void { diff --git a/app/modules/web/Controllers/UserGroup/ViewController.php b/app/modules/web/Controllers/UserGroup/ViewController.php index cad5618f..83add1e9 100644 --- a/app/modules/web/Controllers/UserGroup/ViewController.php +++ b/app/modules/web/Controllers/UserGroup/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\UserGroup; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends UserGroupViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserProfile/CreateController.php b/app/modules/web/Controllers/UserProfile/CreateController.php index 1d38bfb9..d0f79274 100644 --- a/app/modules/web/Controllers/UserProfile/CreateController.php +++ b/app/modules/web/Controllers/UserProfile/CreateController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -40,7 +41,7 @@ final class CreateController extends UserProfileViewBase /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function createAction(): bool { diff --git a/app/modules/web/Controllers/UserProfile/DeleteController.php b/app/modules/web/Controllers/UserProfile/DeleteController.php index e09c845b..d74f228a 100644 --- a/app/modules/web/Controllers/UserProfile/DeleteController.php +++ b/app/modules/web/Controllers/UserProfile/DeleteController.php @@ -26,9 +26,10 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -38,7 +39,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class DeleteController extends UserProfileSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Delete action @@ -46,7 +48,7 @@ final class DeleteController extends UserProfileSaveBase * @param int|null $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function deleteAction(?int $id = null): bool { diff --git a/app/modules/web/Controllers/UserProfile/EditController.php b/app/modules/web/Controllers/UserProfile/EditController.php index b4921e5b..47a04f76 100644 --- a/app/modules/web/Controllers/UserProfile/EditController.php +++ b/app/modules/web/Controllers/UserProfile/EditController.php @@ -26,8 +26,9 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -44,7 +45,7 @@ final class EditController extends UserProfileViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function editAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserProfile/SaveCreateController.php b/app/modules/web/Controllers/UserProfile/SaveCreateController.php index f92983c5..1d0cca57 100644 --- a/app/modules/web/Controllers/UserProfile/SaveCreateController.php +++ b/app/modules/web/Controllers/UserProfile/SaveCreateController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,11 +40,12 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveCreateController extends UserProfileSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveCreateAction(): bool { diff --git a/app/modules/web/Controllers/UserProfile/SaveEditController.php b/app/modules/web/Controllers/UserProfile/SaveEditController.php index b5eee66e..8606af44 100644 --- a/app/modules/web/Controllers/UserProfile/SaveEditController.php +++ b/app/modules/web/Controllers/UserProfile/SaveEditController.php @@ -26,10 +26,11 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +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\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; use SP\Mvc\Controller\ItemTrait; @@ -39,7 +40,8 @@ use SP\Mvc\Controller\ItemTrait; */ final class SaveEditController extends UserProfileSaveBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; /** * Saves edit action @@ -47,7 +49,7 @@ final class SaveEditController extends UserProfileSaveBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function saveEditAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserProfile/SearchController.php b/app/modules/web/Controllers/UserProfile/SearchController.php index 3d04aef7..453c39e3 100644 --- a/app/modules/web/Controllers/UserProfile/SearchController.php +++ b/app/modules/web/Controllers/UserProfile/SearchController.php @@ -25,8 +25,11 @@ namespace SP\Modules\Web\Controllers\UserProfile; -use SP\Core\Acl\AclActionsInterface; +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\User\Ports\UserProfileServiceInterface; use SP\Html\DataGrid\DataGridInterface; use SP\Http\JsonResponse; @@ -41,7 +44,8 @@ use SP\Mvc\Controller\WebControllerHelper; */ final class SearchController extends ControllerBase { - use JsonTrait, ItemTrait; + use ItemTrait; + use JsonTrait; private UserProfileServiceInterface $userProfileService; private UserProfileGrid $userProfileGrid; @@ -64,9 +68,9 @@ final class SearchController extends ControllerBase * Search action * * @return bool - * @throws \JsonException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws JsonException + * @throws ConstraintException + * @throws QueryException */ public function searchAction(): bool { @@ -87,9 +91,9 @@ final class SearchController 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/UserProfile/UserProfileViewBase.php b/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php index d560f035..3c120a34 100644 --- a/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php +++ b/app/modules/web/Controllers/UserProfile/UserProfileViewBase.php @@ -26,12 +26,17 @@ namespace SP\Modules\Web\Controllers\UserProfile; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; +use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Modules\Web\Controllers\ControllerBase; use SP\Mvc\Controller\ItemTrait; use SP\Mvc\Controller\WebControllerHelper; @@ -65,11 +70,11 @@ abstract class UserProfileViewBase extends ControllerBase * * @param int|null $profileId * - * @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 setViewData(?int $profileId = null): void { diff --git a/app/modules/web/Controllers/UserProfile/ViewController.php b/app/modules/web/Controllers/UserProfile/ViewController.php index a8a730b0..2dd876f6 100644 --- a/app/modules/web/Controllers/UserProfile/ViewController.php +++ b/app/modules/web/Controllers/UserProfile/ViewController.php @@ -25,8 +25,9 @@ namespace SP\Modules\Web\Controllers\UserProfile; use Exception; -use SP\Core\Acl\AclActionsInterface; +use JsonException; use SP\Core\Events\Event; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -45,7 +46,7 @@ final class ViewController extends UserProfileViewBase * @param int $id * * @return bool - * @throws \JsonException + * @throws JsonException */ public function viewAction(int $id): bool { diff --git a/app/modules/web/Controllers/UserSettingsManager/IndexController.php b/app/modules/web/Controllers/UserSettingsManager/IndexController.php index 8b055655..a0402cf6 100644 --- a/app/modules/web/Controllers/UserSettingsManager/IndexController.php +++ b/app/modules/web/Controllers/UserSettingsManager/IndexController.php @@ -25,12 +25,12 @@ namespace SP\Modules\Web\Controllers\UserSettingsManager; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Language; use SP\DataModel\UserPreferencesData; +use SP\Domain\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Modules\Web\Controllers\ControllerBase; use SP\Modules\Web\Controllers\Helpers\TabsHelper; use SP\Mvc\Controller\ExtensibleTabControllerInterface; @@ -139,7 +139,7 @@ final class IndexController extends ControllerBase implements ExtensibleTabContr } /** - * @return EventDispatcherInterface + * @return \SP\Domain\Core\Events\EventDispatcherInterface */ public function getEventDispatcher(): EventDispatcherInterface { diff --git a/app/modules/web/Forms/AccountForm.php b/app/modules/web/Forms/AccountForm.php index 05945827..ac2c2596 100644 --- a/app/modules/web/Forms/AccountForm.php +++ b/app/modules/web/Forms/AccountForm.php @@ -24,15 +24,16 @@ namespace SP\Modules\Web\Forms; -use SP\Core\Acl\AclActionsInterface; 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\Http\RequestInterface; use SP\Util\Chainable; + use function SP\__u; /** @@ -60,7 +61,7 @@ final class AccountForm extends FormBase implements FormInterface * @param int $action * @param int|null $id * - * @return \SP\Modules\Web\Forms\FormInterface + * @return FormInterface */ public function validateFor(int $action, ?int $id = null): FormInterface { @@ -110,7 +111,7 @@ final class AccountForm extends FormBase implements FormInterface /** * Analizar los datos de la petición HTTP * - * @return \SP\Domain\Account\Dtos\AccountCreateDto|\SP\Domain\Account\Dtos\AccountUpdateDto + * @return AccountCreateDto|AccountUpdateDto */ private function analyzeRequestData(): AccountCreateDto|AccountUpdateDto { diff --git a/app/modules/web/Forms/AuthTokenForm.php b/app/modules/web/Forms/AuthTokenForm.php index 51e1d992..414f9807 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\AuthTokenData; use SP\Domain\Auth\Services\AuthTokenService; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class ApiTokenForm diff --git a/app/modules/web/Forms/CategoryForm.php b/app/modules/web/Forms/CategoryForm.php index dd734ed5..dc557ebe 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\CategoryData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CategoryForm diff --git a/app/modules/web/Forms/ClientForm.php b/app/modules/web/Forms/ClientForm.php index 6debcb93..00a1d22a 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\ClientData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class ClientForm diff --git a/app/modules/web/Forms/CustomFieldDefForm.php b/app/modules/web/Forms/CustomFieldDefForm.php index 817b2cd1..781d207e 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\CustomFieldDefinitionData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class CustomFieldDefForm diff --git a/app/modules/web/Forms/FormBase.php b/app/modules/web/Forms/FormBase.php index 5f67e90e..8a65b8f7 100644 --- a/app/modules/web/Forms/FormBase.php +++ b/app/modules/web/Forms/FormBase.php @@ -25,9 +25,9 @@ namespace SP\Modules\Web\Forms; use SP\Core\Application; -use SP\Core\Context\ContextInterface; use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Services\ConfigFileService; +use SP\Domain\Core\Context\ContextInterface; use SP\Http\RequestInterface; /** @@ -44,8 +44,8 @@ abstract class FormBase /** * FormBase constructor. * - * @param \SP\Core\Application $application - * @param \SP\Http\RequestInterface $request + * @param Application $application + * @param RequestInterface $request * @param int|null $itemId */ public function __construct( diff --git a/app/modules/web/Forms/ItemsPresetForm.php b/app/modules/web/Forms/ItemsPresetForm.php index cf531e4c..3d7b832d 100644 --- a/app/modules/web/Forms/ItemsPresetForm.php +++ b/app/modules/web/Forms/ItemsPresetForm.php @@ -24,7 +24,6 @@ namespace SP\Modules\Web\Forms; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Exceptions\InvalidArgumentException; use SP\Core\Exceptions\ValidationException; use SP\DataModel\ItemPreset\AccountPermission; @@ -32,6 +31,7 @@ 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\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 7aaebcae..72b27816 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\Core\Messages\NotificationMessage; use SP\DataModel\NotificationData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class NotificationForm diff --git a/app/modules/web/Forms/PublicLinkForm.php b/app/modules/web/Forms/PublicLinkForm.php index 5e8d0b52..0c7397bc 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\PublicLinkData; use SP\Domain\Account\Services\PublicLinkService; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class PublicLinkForm diff --git a/app/modules/web/Forms/TagForm.php b/app/modules/web/Forms/TagForm.php index ed368ca7..33800c10 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\Acl\AclActionsInterface; use SP\Core\Exceptions\ValidationException; use SP\DataModel\TagData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class TagForm diff --git a/app/modules/web/Forms/UserForm.php b/app/modules/web/Forms/UserForm.php index 090d2c77..33ed9e33 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\Acl\AclActionsInterface; use SP\Core\Exceptions\SPException; use SP\Core\Exceptions\ValidationException; use SP\DataModel\UserData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class UserForm @@ -182,7 +182,7 @@ final class UserForm extends FormBase implements FormInterface } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function getItemData(): UserData { diff --git a/app/modules/web/Forms/UserGroupForm.php b/app/modules/web/Forms/UserGroupForm.php index 5a24a65a..694032b3 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\Acl\AclActionsInterface; use SP\Core\Exceptions\SPException; use SP\Core\Exceptions\ValidationException; use SP\DataModel\UserGroupData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class UserGroupForm @@ -89,7 +89,7 @@ final class UserGroupForm extends FormBase implements FormInterface } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function getItemData(): UserGroupData { diff --git a/app/modules/web/Forms/UserProfileForm.php b/app/modules/web/Forms/UserProfileForm.php index 9e93de43..0404dcc2 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\Acl\AclActionsInterface; use SP\Core\Exceptions\SPException; use SP\Core\Exceptions\ValidationException; use SP\DataModel\ProfileData; use SP\DataModel\UserProfileData; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class UserProfileForm @@ -81,7 +81,7 @@ final class UserProfileForm extends FormBase implements FormInterface } /** - * @return \SP\DataModel\ProfileData + * @return ProfileData */ private function getProfileDataFromRequest(): ProfileData { @@ -131,7 +131,7 @@ final class UserProfileForm extends FormBase implements FormInterface } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function getItemData(): UserProfileData { diff --git a/app/modules/web/Init.php b/app/modules/web/Init.php index e9f4fa31..036ecc91 100644 --- a/app/modules/web/Init.php +++ b/app/modules/web/Init.php @@ -31,12 +31,10 @@ use JsonException; use Klein\Klein; use SP\Core\Application; use SP\Core\Bootstrap\BootstrapBase; -use SP\Core\Bootstrap\UriContextInterface; use SP\Core\Context\ContextBase; use SP\Core\Context\SessionContext; use SP\Core\Crypt\CryptSessionHandler; use SP\Core\Crypt\Csrf; -use SP\Core\Crypt\CsrfInterface; use SP\Core\Crypt\Session as CryptSession; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\InitializationException; @@ -48,6 +46,8 @@ 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\LanguageInterface; use SP\Domain\Core\UI\ThemeInterface; use SP\Domain\Crypt\Ports\SecureSessionServiceInterface; diff --git a/app/modules/web/themes/material-blue/views/account/search-rows.inc b/app/modules/web/themes/material-blue/views/account/search-rows.inc index 6acb458d..cdd8ade5 100644 --- a/app/modules/web/themes/material-blue/views/account/search-rows.inc +++ b/app/modules/web/themes/material-blue/views/account/search-rows.inc @@ -33,9 +33,9 @@ * @var AccountSearchItem $accountSearchItem */ -use SP\Core\Acl\AclActionsInterface; use SP\Domain\Account\Services\AccountSearchItem; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\Core\UI\ThemeIconsInterface; use SP\Html\DataGrid\Action\DataGridActionBase; use SP\Html\DataGrid\DataGridTab; diff --git a/lib/SP/Core/Acl/Acl.php b/lib/SP/Core/Acl/Acl.php index e163cca1..95e8a186 100644 --- a/lib/SP/Core/Acl/Acl.php +++ b/lib/SP/Core/Acl/Acl.php @@ -25,11 +25,13 @@ namespace SP\Core\Acl; -use SP\Core\Context\ContextInterface; use SP\Core\Events\Event; use SP\Core\Events\EventDispatcher; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Events\EventMessage; +use SP\Domain\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\ActionsInterface; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use function SP\__; use function SP\__u; diff --git a/lib/SP/Core/Acl/Actions.php b/lib/SP/Core/Acl/Actions.php index b5e99bc5..3e30a6c0 100644 --- a/lib/SP/Core/Acl/Actions.php +++ b/lib/SP/Core/Acl/Actions.php @@ -24,8 +24,8 @@ namespace SP\Core\Acl; -use RuntimeException; use SP\DataModel\ActionData; +use SP\Domain\Core\Acl\ActionsInterface; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; use SP\Infrastructure\File\XmlFileStorageInterface; diff --git a/lib/SP/Core/Application.php b/lib/SP/Core/Application.php index 662ad539..d09dd4ac 100644 --- a/lib/SP/Core/Application.php +++ b/lib/SP/Core/Application.php @@ -24,10 +24,10 @@ namespace SP\Core; -use SP\Core\Context\ContextInterface; -use SP\Core\Context\SessionContextInterface; -use SP\Core\Events\EventDispatcherInterface; use SP\Domain\Config\Ports\ConfigInterface; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Context\SessionContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; /** * The Application helper class. It holds all the needed dependencies for the application @@ -38,8 +38,8 @@ final class Application * Module constructor. * * @param ConfigInterface $config - * @param EventDispatcherInterface $eventDispatcher - * @param SessionContextInterface|ContextInterface $context + * @param \SP\Domain\Core\Events\EventDispatcherInterface $eventDispatcher + * @param SessionContextInterface|\SP\Domain\Core\Context\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 adf09b38..e7ef4286 100644 --- a/lib/SP/Core/Bootstrap/BootstrapBase.php +++ b/lib/SP/Core/Bootstrap/BootstrapBase.php @@ -33,7 +33,6 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; use RuntimeException; -use SP\Core\Context\ContextInterface; use SP\Core\Exceptions\CheckException; use SP\Core\Exceptions\ConfigException; use SP\Core\Exceptions\InitializationException; @@ -42,6 +41,8 @@ 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\Upgrade\Services\UpgradeException; use SP\Http\RequestInterface; use SP\Plugin\PluginManager; diff --git a/lib/SP/Core/Bootstrap/UriContext.php b/lib/SP/Core/Bootstrap/UriContext.php index 8dbeb3c2..70c24227 100644 --- a/lib/SP/Core/Bootstrap/UriContext.php +++ b/lib/SP/Core/Bootstrap/UriContext.php @@ -24,6 +24,7 @@ namespace SP\Core\Bootstrap; +use SP\Domain\Core\Bootstrap\UriContextInterface; use SP\Http\RequestInterface; /** diff --git a/lib/SP/Core/Context/ContextBase.php b/lib/SP/Core/Context/ContextBase.php index f122b26b..ad41dfa7 100644 --- a/lib/SP/Core/Context/ContextBase.php +++ b/lib/SP/Core/Context/ContextBase.php @@ -24,6 +24,8 @@ namespace SP\Core\Context; +use SP\Domain\Core\Context\ContextInterface; + use function SP\__u; /** diff --git a/lib/SP/Core/Context/ContextFactory.php b/lib/SP/Core/Context/ContextFactory.php index 290dfcb0..23a70df9 100644 --- a/lib/SP/Core/Context/ContextFactory.php +++ b/lib/SP/Core/Context/ContextFactory.php @@ -24,6 +24,8 @@ namespace SP\Core\Context; +use SP\Domain\Core\Context\ContextInterface; + /** * ContextFactory */ @@ -37,4 +39,4 @@ final class ContextFactory return new StatelessContext(); } -} \ No newline at end of file +} diff --git a/lib/SP/Core/Context/SessionContext.php b/lib/SP/Core/Context/SessionContext.php index f0757c8b..ecae244c 100644 --- a/lib/SP/Core/Context/SessionContext.php +++ b/lib/SP/Core/Context/SessionContext.php @@ -24,10 +24,11 @@ namespace SP\Core\Context; -use SP\Core\Crypt\VaultInterface; use SP\DataModel\ProfileData; use SP\Domain\Account\Dtos\AccountCacheDto; use SP\Domain\Account\Search\AccountSearchFilter; +use SP\Domain\Core\Context\SessionContextInterface; +use SP\Domain\Core\Crypt\VaultInterface; use SP\Domain\User\Services\UserLoginResponse; use function SP\logger; diff --git a/lib/SP/Core/Crypt/Crypt.php b/lib/SP/Core/Crypt/Crypt.php index 59c7f5ca..e9eff5d4 100644 --- a/lib/SP/Core/Crypt/Crypt.php +++ b/lib/SP/Core/Crypt/Crypt.php @@ -30,6 +30,7 @@ use Defuse\Crypto\Key; use Defuse\Crypto\KeyProtectedByPassword; use SP\Core\Exceptions\CryptException; use SP\Core\Exceptions\SPException; +use SP\Domain\Core\Crypt\CryptInterface; /** * Class Crypt diff --git a/lib/SP/Core/Crypt/CryptPKI.php b/lib/SP/Core/Crypt/CryptPKI.php index f5d9edd5..ee6e35fc 100644 --- a/lib/SP/Core/Crypt/CryptPKI.php +++ b/lib/SP/Core/Crypt/CryptPKI.php @@ -26,8 +26,10 @@ namespace SP\Core\Crypt; use phpseclib\Crypt\RSA; use SP\Core\Exceptions\SPException; +use SP\Domain\Core\Crypt\CryptPKIInterface; use SP\Infrastructure\File\FileException; use SP\Infrastructure\File\FileHandlerInterface; + use function SP\processException; /** @@ -111,7 +113,7 @@ final class CryptPKI implements CryptPKIInterface } /** - * @throws \SP\Infrastructure\File\FileException + * @throws FileException */ private function getPrivateKey(): string { diff --git a/lib/SP/Core/Crypt/Csrf.php b/lib/SP/Core/Crypt/Csrf.php index 9829c0c3..40c753a5 100644 --- a/lib/SP/Core/Crypt/Csrf.php +++ b/lib/SP/Core/Crypt/Csrf.php @@ -24,8 +24,9 @@ namespace SP\Core\Crypt; -use SP\Core\Context\SessionContextInterface; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Context\SessionContextInterface; +use SP\Domain\Core\Crypt\CsrfInterface; use SP\Http\RequestInterface; use function SP\logger; diff --git a/lib/SP/Core/Crypt/RequestBasedPassword.php b/lib/SP/Core/Crypt/RequestBasedPassword.php index ce4c7bc2..6946b86a 100644 --- a/lib/SP/Core/Crypt/RequestBasedPassword.php +++ b/lib/SP/Core/Crypt/RequestBasedPassword.php @@ -25,6 +25,7 @@ namespace SP\Core\Crypt; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Crypt\RequestBasedPasswordInterface; use SP\Http\RequestInterface; /** diff --git a/lib/SP/Core/Crypt/Session.php b/lib/SP/Core/Crypt/Session.php index 8ee1b168..1a77aef9 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\Context\SessionContextInterface; use SP\Core\Exceptions\CryptException; +use SP\Domain\Core\Context\SessionContextInterface; use function SP\logger; diff --git a/lib/SP/Core/Crypt/UuidCookie.php b/lib/SP/Core/Crypt/UuidCookie.php index e1b0b5cf..31f8519c 100644 --- a/lib/SP/Core/Crypt/UuidCookie.php +++ b/lib/SP/Core/Crypt/UuidCookie.php @@ -24,6 +24,7 @@ namespace SP\Core\Crypt; +use SP\Domain\Core\Crypt\UuidCookieInterface; use SP\Http\RequestInterface; /** diff --git a/lib/SP/Core/Crypt/Vault.php b/lib/SP/Core/Crypt/Vault.php index 5b2ab0b8..bcdfbe68 100644 --- a/lib/SP/Core/Crypt/Vault.php +++ b/lib/SP/Core/Crypt/Vault.php @@ -26,6 +26,8 @@ namespace SP\Core\Crypt; use RuntimeException; use SP\Core\Exceptions\CryptException; +use SP\Domain\Core\Crypt\CryptInterface; +use SP\Domain\Core\Crypt\VaultInterface; /** * Class Vault diff --git a/lib/SP/Core/Definitions/CoreDefinitions.php b/lib/SP/Core/Definitions/CoreDefinitions.php index 99a4a4cd..e0051d4d 100644 --- a/lib/SP/Core/Definitions/CoreDefinitions.php +++ b/lib/SP/Core/Definitions/CoreDefinitions.php @@ -30,19 +30,13 @@ use PHPMailer\PHPMailer\PHPMailer; use Psr\Container\ContainerInterface; use SP\Core\Acl\Acl; use SP\Core\Acl\Actions; -use SP\Core\Acl\ActionsInterface; use SP\Core\Application; use SP\Core\Bootstrap\UriContext; -use SP\Core\Bootstrap\UriContextInterface; use SP\Core\Context\ContextFactory; -use SP\Core\Context\ContextInterface; use SP\Core\Crypt\Crypt; -use SP\Core\Crypt\CryptInterface; use SP\Core\Crypt\CryptPKI; -use SP\Core\Crypt\CryptPKIInterface; use SP\Core\Crypt\Csrf; use SP\Core\Crypt\RequestBasedPassword; -use SP\Core\Crypt\RequestBasedPasswordInterface; use SP\Core\Crypt\UuidCookie; use SP\Core\Exceptions\SPException; use SP\Core\Language; @@ -58,6 +52,12 @@ use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Ports\ConfigInterface; use SP\Domain\Config\Services\ConfigBackupService; use SP\Domain\Config\Services\ConfigFileService; +use SP\Domain\Core\Acl\ActionsInterface; +use SP\Domain\Core\Bootstrap\UriContextInterface; +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\File\MimeTypesInterface; use SP\Domain\Core\LanguageInterface; use SP\Domain\Core\UI\ThemeContextInterface; diff --git a/lib/SP/Core/Definitions/DomainDefinitions.php b/lib/SP/Core/Definitions/DomainDefinitions.php index 288f2d67..88aaa11a 100644 --- a/lib/SP/Core/Definitions/DomainDefinitions.php +++ b/lib/SP/Core/Definitions/DomainDefinitions.php @@ -26,15 +26,16 @@ namespace SP\Core\Definitions; use Psr\Container\ContainerInterface; use SP\Core\Application; -use SP\Core\Crypt\CryptInterface; use SP\Core\Crypt\RequestBasedPassword; use SP\Core\Crypt\UuidCookie; use SP\Domain\Account\Ports\AccountSearchDataBuilderInterface; use SP\Domain\Account\Search\AccountSearchDataBuilder; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Crypt\CryptInterface; use SP\Domain\Crypt\Ports\SecureSessionServiceInterface; use SP\Domain\Crypt\Services\SecureSessionService; use SP\Infrastructure\File\FileCache; + use function DI\autowire; use function DI\factory; diff --git a/lib/SP/Core/Events/EventDispatcherBase.php b/lib/SP/Core/Events/EventDispatcherBase.php index c9953ae6..ec839386 100644 --- a/lib/SP/Core/Events/EventDispatcherBase.php +++ b/lib/SP/Core/Events/EventDispatcherBase.php @@ -24,6 +24,8 @@ namespace SP\Core\Events; +use SP\Domain\Core\Events\EventDispatcherInterface; +use SP\Domain\Core\Events\EventReceiver; use SplObjectStorage; use function SP\logger; diff --git a/lib/SP/Core/Events/EventMessage.php b/lib/SP/Core/Events/EventMessage.php index ba9d00ed..122905f3 100644 --- a/lib/SP/Core/Events/EventMessage.php +++ b/lib/SP/Core/Events/EventMessage.php @@ -24,10 +24,10 @@ namespace SP\Core\Events; -use SP\Core\Messages\FormatterInterface; use SP\Core\Messages\HtmlFormatter; -use SP\Core\Messages\MessageInterface; use SP\Core\Messages\TextFormatter; +use SP\Domain\Core\Messages\FormatterInterface; +use SP\Domain\Core\Messages\MessageInterface; /** * Class EventMessage diff --git a/lib/SP/Core/Language.php b/lib/SP/Core/Language.php index 14059898..1887dcf9 100644 --- a/lib/SP/Core/Language.php +++ b/lib/SP/Core/Language.php @@ -24,8 +24,8 @@ namespace SP\Core; -use SP\Core\Context\ContextInterface; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Context\ContextInterface; use SP\Domain\Core\LanguageInterface; use SP\Http\RequestInterface; diff --git a/lib/SP/Core/Messages/HtmlFormatter.php b/lib/SP/Core/Messages/HtmlFormatter.php index a6ace588..e7949256 100644 --- a/lib/SP/Core/Messages/HtmlFormatter.php +++ b/lib/SP/Core/Messages/HtmlFormatter.php @@ -24,6 +24,7 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; use SP\Html\Html; use function SP\__; diff --git a/lib/SP/Core/Messages/LogMessage.php b/lib/SP/Core/Messages/LogMessage.php index f110b00a..e951a79a 100644 --- a/lib/SP/Core/Messages/LogMessage.php +++ b/lib/SP/Core/Messages/LogMessage.php @@ -24,6 +24,8 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; + /** * Class LogMessage * @@ -196,4 +198,4 @@ final class LogMessage extends MessageBase { return $this->detailsCounter; } -} \ No newline at end of file +} diff --git a/lib/SP/Core/Messages/MailMessage.php b/lib/SP/Core/Messages/MailMessage.php index 4f4669e9..68626fe8 100644 --- a/lib/SP/Core/Messages/MailMessage.php +++ b/lib/SP/Core/Messages/MailMessage.php @@ -24,6 +24,8 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; + /** * Class MailMessage * @@ -76,4 +78,4 @@ final class MailMessage extends MessageBase . $delimiter . implode($delimiter, $this->footer); } -} \ No newline at end of file +} diff --git a/lib/SP/Core/Messages/MessageBase.php b/lib/SP/Core/Messages/MessageBase.php index ec8699fd..e1822795 100644 --- a/lib/SP/Core/Messages/MessageBase.php +++ b/lib/SP/Core/Messages/MessageBase.php @@ -24,6 +24,9 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; +use SP\Domain\Core\Messages\MessageInterface; + /** * Class MessageBase * @@ -82,4 +85,4 @@ abstract class MessageBase implements MessageInterface return $this; } -} \ No newline at end of file +} diff --git a/lib/SP/Core/Messages/NotificationMessage.php b/lib/SP/Core/Messages/NotificationMessage.php index 83b7be2b..f9427cb2 100644 --- a/lib/SP/Core/Messages/NotificationMessage.php +++ b/lib/SP/Core/Messages/NotificationMessage.php @@ -24,6 +24,8 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; + /** * Class NoticeMessage * @@ -86,4 +88,4 @@ final class NotificationMessage extends MessageBase return implode($delimiter, $parts); } -} \ No newline at end of file +} diff --git a/lib/SP/Core/Messages/TaskMessage.php b/lib/SP/Core/Messages/TaskMessage.php index b660e70f..37f12dcd 100644 --- a/lib/SP/Core/Messages/TaskMessage.php +++ b/lib/SP/Core/Messages/TaskMessage.php @@ -24,7 +24,9 @@ namespace SP\Core\Messages; +use JsonException; use JsonSerializable; +use SP\Domain\Core\Messages\MessageInterface; /** * Class TaskMessage @@ -126,7 +128,7 @@ final class TaskMessage implements MessageInterface, JsonSerializable /** * Componer un mensaje en formato JSON * - * @throws \JsonException + * @throws JsonException */ public function composeJson(): bool|string { diff --git a/lib/SP/Core/Messages/TextFormatter.php b/lib/SP/Core/Messages/TextFormatter.php index 410ee15c..ba0e8a1a 100644 --- a/lib/SP/Core/Messages/TextFormatter.php +++ b/lib/SP/Core/Messages/TextFormatter.php @@ -24,6 +24,8 @@ namespace SP\Core\Messages; +use SP\Domain\Core\Messages\FormatterInterface; + /** * Class TextFormatter * @@ -66,4 +68,4 @@ final class TextFormatter implements FormatterInterface return implode($this->delimiter, $text); } -} \ No newline at end of file +} diff --git a/lib/SP/Core/ModuleBase.php b/lib/SP/Core/ModuleBase.php index b376761c..c0f70135 100644 --- a/lib/SP/Core/ModuleBase.php +++ b/lib/SP/Core/ModuleBase.php @@ -24,10 +24,10 @@ namespace SP\Core; -use SP\Core\Context\ContextInterface; -use SP\Core\Events\EventDispatcherInterface; use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Services\ConfigFileService; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; /** * Class ModuleBase diff --git a/lib/SP/Core/UI/Theme.php b/lib/SP/Core/UI/Theme.php index dccc2697..1492c206 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\Context\ContextInterface; use SP\Core\Exceptions\InvalidClassException; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Context\ContextInterface; 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 bc8cd2a3..8a2a2cf4 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\Context\ContextInterface; use SP\Core\Exceptions\InvalidClassException; +use SP\Domain\Core\Context\ContextInterface; use SP\Domain\Core\UI\ThemeContextInterface; use SP\Domain\Core\UI\ThemeIconsInterface; use SP\Html\Assets\FontIcon; @@ -53,7 +53,7 @@ final class ThemeIcons implements ThemeIconsInterface private array $icons = []; /** - * @param ContextInterface $context + * @param \SP\Domain\Core\Context\ContextInterface $context * @param FileCacheInterface $cache * @param ThemeContextInterface $themeContext * @return ThemeIconsInterface diff --git a/lib/SP/DataModel/NotificationData.php b/lib/SP/DataModel/NotificationData.php index 77d09f5c..77d3e11a 100644 --- a/lib/SP/DataModel/NotificationData.php +++ b/lib/SP/DataModel/NotificationData.php @@ -24,8 +24,8 @@ namespace SP\DataModel; -use SP\Core\Messages\MessageInterface; use SP\Domain\Common\Adapters\DataModelInterface; +use SP\Domain\Core\Messages\MessageInterface; /** * Class NoticeData diff --git a/lib/SP/Domain/Account/Adapters/AccountAdapter.php b/lib/SP/Domain/Account/Adapters/AccountAdapter.php index 5d4629b8..de7ccffa 100644 --- a/lib/SP/Domain/Account/Adapters/AccountAdapter.php +++ b/lib/SP/Domain/Account/Adapters/AccountAdapter.php @@ -25,10 +25,14 @@ namespace SP\Domain\Account\Adapters; use League\Fractal\Resource\Collection; -use SP\Core\Acl\AclActionsInterface; +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\CustomField\Adapters\CustomFieldAdapter; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Mvc\Controller\ItemTrait; @@ -54,10 +58,10 @@ final class AccountAdapter extends Adapter implements 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/Search/AccountSearchDataBuilder.php b/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php index 32d06a05..ba6a8df6 100644 --- a/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php +++ b/lib/SP/Domain/Account/Search/AccountSearchDataBuilder.php @@ -24,11 +24,11 @@ namespace SP\Domain\Account\Search; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; -use SP\DataModel\AccountSearchVData; +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\AccountDataView; use SP\Domain\Account\Models\AccountSearchView; use SP\Domain\Account\Ports\AccountAclServiceInterface; use SP\Domain\Account\Ports\AccountCacheServiceInterface; @@ -38,9 +38,11 @@ use SP\Domain\Account\Ports\AccountToTagRepositoryInterface; 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\Infrastructure\Database\QueryResult; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; + use function SP\logger; use function SP\processException; @@ -102,12 +104,12 @@ final class AccountSearchDataBuilder extends Service implements AccountSearchDat } /** - * @param \SP\Infrastructure\Database\QueryResult $queryResult + * @param QueryResult $queryResult * * @return AccountSearchItem[] - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException + * @throws ConstraintException + * @throws QueryException + * @throws SPException */ public function buildFrom(QueryResult $queryResult): array { @@ -122,10 +124,10 @@ final class AccountSearchDataBuilder extends Service implements AccountSearchDat /** * @param AccountSearchView $accountSearchView * - * @return \SP\Domain\Account\Services\AccountSearchItem - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException + * @return AccountSearchItem + * @throws ConstraintException + * @throws QueryException + * @throws SPException */ function (AccountSearchView $accountSearchView) use ($maxTextLength, $accountLinkEnabled, $favorites) { $cache = $this->accountCacheService->getCacheForAccount( diff --git a/lib/SP/Domain/Account/Services/AccountAcl.php b/lib/SP/Domain/Account/Services/AccountAcl.php index 1d15a1d5..c785467e 100644 --- a/lib/SP/Domain/Account/Services/AccountAcl.php +++ b/lib/SP/Domain/Account/Services/AccountAcl.php @@ -24,7 +24,7 @@ namespace SP\Domain\Account\Services; -use SP\Core\Acl\AclActionsInterface; +use SP\Domain\Core\Acl\AclActionsInterface; /** * Class AccountAcl diff --git a/lib/SP/Domain/Account/Services/AccountAclService.php b/lib/SP/Domain/Account/Services/AccountAclService.php index 994c975b..7c36120c 100644 --- a/lib/SP/Domain/Account/Services/AccountAclService.php +++ b/lib/SP/Domain/Account/Services/AccountAclService.php @@ -25,7 +25,6 @@ namespace SP\Domain\Account\Services; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; @@ -35,10 +34,12 @@ 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\User\Ports\UserToUserGroupServiceInterface; use SP\Domain\User\Services\UserLoginResponse; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; + use function SP\processException; /** @@ -78,7 +79,7 @@ final class AccountAclService extends Service implements AccountAclServiceInterf * Obtener la ACL de una cuenta * * @param int $actionId - * @param \SP\Domain\Account\Dtos\AccountAclDto $accountAclDto + * @param AccountAclDto $accountAclDto * @param bool $isHistory * * @return AccountAcl @@ -145,7 +146,7 @@ final class AccountAclService extends Service implements AccountAclServiceInterf * @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/Services/AccountCryptService.php b/lib/SP/Domain/Account/Services/AccountCryptService.php index a56d49b5..586a234d 100644 --- a/lib/SP/Domain/Account/Services/AccountCryptService.php +++ b/lib/SP/Domain/Account/Services/AccountCryptService.php @@ -26,21 +26,22 @@ namespace SP\Domain\Account\Services; use Exception; use SP\Core\Application; -use SP\Core\Crypt\CryptInterface; 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\AccountUpdateDto; use SP\Domain\Account\Dtos\EncryptedPassword; +use SP\Domain\Account\Models\Account; use SP\Domain\Account\Ports\AccountCryptServiceInterface; use SP\Domain\Account\Ports\AccountHistoryServiceInterface; 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\Crypt\Services\UpdateMasterPassRequest; use SP\Domain\Task\Services\TaskFactory; use SP\Util\Util; + use function SP\__; use function SP\__u; use function SP\logger; @@ -116,11 +117,11 @@ final class AccountCryptService extends Service implements AccountCryptServiceIn } /** - * @param \SP\Domain\Account\Models\Account[] $accounts + * @param Account[] $accounts * @param callable $passUpdater - * @param \SP\Domain\Crypt\Services\UpdateMasterPassRequest $updateMasterPassRequest + * @param UpdateMasterPassRequest $updateMasterPassRequest * - * @return \SP\Core\Events\EventMessage + * @return EventMessage */ private function processAccounts( array $accounts, @@ -225,7 +226,7 @@ final class AccountCryptService extends Service implements AccountCryptServiceIn /** * Devolver los datos de la clave encriptados * - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function getPasswordEncrypted(string $pass, ?string $masterPass = null): EncryptedPassword { diff --git a/lib/SP/Domain/Account/Services/AccountFilterUser.php b/lib/SP/Domain/Account/Services/AccountFilterUser.php index 77546d33..5d2a66fc 100644 --- a/lib/SP/Domain/Account/Services/AccountFilterUser.php +++ b/lib/SP/Domain/Account/Services/AccountFilterUser.php @@ -26,11 +26,11 @@ namespace SP\Domain\Account\Services; use Aura\SqlQuery\Common\SelectInterface; use Aura\SqlQuery\QueryFactory; -use SP\Core\Context\ContextInterface; use SP\DataModel\ProfileData; use SP\Domain\Account\Ports\AccountFilterUserInterface; use SP\Domain\Account\Search\AccountSearchConstants; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Context\ContextInterface; use SP\Domain\User\Services\UserLoginResponse; /** @@ -97,9 +97,9 @@ final class AccountFilterUser implements AccountFilterUserInterface } /** - * @param \SP\Domain\User\Services\UserLoginResponse $userData + * @param UserLoginResponse $userData * @param bool $useGlobalSearch - * @param \SP\DataModel\ProfileData|null $userProfile + * @param ProfileData|null $userProfile * * @return bool */ diff --git a/lib/SP/Domain/Account/Services/PublicLinkService.php b/lib/SP/Domain/Account/Services/PublicLinkService.php index a6a3f1eb..111ec160 100644 --- a/lib/SP/Domain/Account/Services/PublicLinkService.php +++ b/lib/SP/Domain/Account/Services/PublicLinkService.php @@ -27,9 +27,9 @@ namespace SP\Domain\Account\Services; use Defuse\Crypto\Exception\CryptoException; use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use SP\Core\Application; -use SP\Core\Crypt\CryptInterface; 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; @@ -43,10 +43,12 @@ use SP\Domain\Common\Services\Service; 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\Http\RequestInterface; use SP\Http\Uri; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Database\QueryResult; + use function SP\__u; /** @@ -90,9 +92,9 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf } /** - * @param \SP\DataModel\ItemSearchData $itemSearchData + * @param ItemSearchData $itemSearchData * - * @return \SP\Infrastructure\Database\QueryResult + * @return QueryResult */ public function search(ItemSearchData $itemSearchData): QueryResult { @@ -100,13 +102,13 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf } /** - * @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 { @@ -123,9 +125,9 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf /** * @param int $id * - * @return \SP\DataModel\PublicLinkListData - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @return PublicLinkListData + * @throws SPException + * @throws NoSuchItemException */ public function getById(int $id): PublicLinkListData { @@ -139,15 +141,15 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf } /** - * @param \SP\DataModel\PublicLinkData $publicLinkData + * @param PublicLinkData $publicLinkData * - * @return \SP\DataModel\PublicLinkData - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\CryptException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @return PublicLinkData + * @throws EnvironmentIsBrokenException + * @throws ConstraintException + * @throws CryptException + * @throws QueryException + * @throws ServiceException + * @throws NoSuchItemException */ private function buildPublicLink(PublicLinkData $publicLinkData): PublicLinkData { @@ -182,14 +184,14 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf * Obtener los datos de una cuenta y encriptarlos para el enlace * * @param int $itemId - * @param \SP\Domain\Account\Services\PublicLinkKey $key + * @param PublicLinkKey $key * * @return string - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\CryptException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @throws ConstraintException + * @throws CryptException + * @throws QueryException + * @throws ServiceException + * @throws NoSuchItemException */ private function getSecuredLinkData(int $itemId, PublicLinkKey $key): string { @@ -218,9 +220,9 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf /** * @param int $id * - * @return \SP\Domain\Account\Ports\PublicLinkServiceInterface - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @return PublicLinkServiceInterface + * @throws ConstraintException + * @throws QueryException */ public function delete(int $id): PublicLinkServiceInterface { @@ -261,7 +263,7 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function getAllBasic(): array { @@ -271,11 +273,11 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf /** * Incrementar el contador de visitas de un enlace * - * @param \SP\DataModel\PublicLinkData $publicLinkData + * @param PublicLinkData $publicLinkData * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ConstraintException + * @throws QueryException + * @throws ServiceException */ public function addLinkView(PublicLinkData $publicLinkData): void { @@ -334,9 +336,9 @@ final class PublicLinkService extends Service implements PublicLinkServiceInterf * * @param int $itemId * - * @return \SP\DataModel\PublicLinkData - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @return PublicLinkData + * @throws SPException + * @throws NoSuchItemException */ public function getHashForItem(int $itemId): PublicLinkData { diff --git a/lib/SP/Domain/Api/Services/ApiService.php b/lib/SP/Domain/Api/Services/ApiService.php index 4397ac71..93917b61 100644 --- a/lib/SP/Domain/Api/Services/ApiService.php +++ b/lib/SP/Domain/Api/Services/ApiService.php @@ -26,12 +26,12 @@ namespace SP\Domain\Api\Services; use Exception; use SP\Core\Application; -use SP\Core\Context\ContextInterface; +use SP\Core\Context\ContextException; use SP\Core\Crypt\Crypt; use SP\Core\Crypt\Hash; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Core\Exceptions\CryptException; +use SP\Core\Exceptions\InvalidArgumentException; use SP\Core\Exceptions\InvalidClassException; use SP\Core\Exceptions\SPException; use SP\DataModel\AuthTokenData; @@ -41,6 +41,8 @@ use SP\Domain\Auth\Ports\AuthTokenServiceInterface; use SP\Domain\Auth\Services\AuthTokenService; 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\Security\Ports\TrackServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; @@ -49,6 +51,7 @@ use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Security\Repositories\TrackRequest; use SP\Modules\Api\Controllers\Help\HelpInterface; use SP\Util\Filter; + use function SP\__u; use function SP\logger; use function SP\processException; @@ -69,7 +72,7 @@ final class ApiService extends Service implements ApiServiceInterface private ?int $status = null; /** - * @throws \SP\Core\Exceptions\InvalidArgumentException + * @throws InvalidArgumentException */ public function __construct( Application $application, @@ -88,7 +91,7 @@ final class ApiService extends Service implements ApiServiceInterface /** * Sets up API * - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException * @throws SPException * @throws Exception */ @@ -138,7 +141,7 @@ final class ApiService extends Service implements ApiServiceInterface /** * Añadir un seguimiento * - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ private function addTracking(): void { @@ -197,7 +200,7 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ private function accessDenied(): void { @@ -230,8 +233,8 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Core\Context\ContextException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ContextException + * @throws ServiceException */ public function requireMasterPass(): void { @@ -241,7 +244,7 @@ final class ApiService extends Service implements ApiServiceInterface /** * Devolver la clave maestra * - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ private function getMasterPassFromVault(): string { @@ -278,7 +281,7 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ private function requireInitialized(): void { @@ -293,7 +296,7 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function getParamInt(string $param, bool $required = false, $default = null): ?int { @@ -321,7 +324,7 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function getParamArray(string $param, bool $required = false, $default = null): ?array { @@ -349,7 +352,7 @@ final class ApiService extends Service implements ApiServiceInterface } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function getMasterPass(): string { diff --git a/lib/SP/Domain/Auth/Services/AuthTokenService.php b/lib/SP/Domain/Auth/Services/AuthTokenService.php index f0735fad..352f8324 100644 --- a/lib/SP/Domain/Auth/Services/AuthTokenService.php +++ b/lib/SP/Domain/Auth/Services/AuthTokenService.php @@ -28,11 +28,9 @@ use Defuse\Crypto\Exception\CryptoException; use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use Exception; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Crypt\Hash; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Core\Exceptions\SPException; @@ -42,7 +40,10 @@ use SP\Domain\Auth\Ports\AuthTokenServiceInterface; 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\Crypt\VaultInterface; use SP\Infrastructure\Auth\Repositories\AuthTokenRepository; +use SP\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Database\QueryResult; use SP\Util\PasswordUtil; @@ -128,8 +129,8 @@ final class AuthTokenService extends Service implements AuthTokenServiceInterfac } /** - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function getById(int $id): AuthTokenData { @@ -137,9 +138,9 @@ final class AuthTokenService extends Service implements AuthTokenServiceInterfac } /** - * @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 { @@ -278,13 +279,13 @@ final class AuthTokenService extends Service implements AuthTokenServiceInterfac } /** - * @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/Services/UpgradeAuthTokenService.php b/lib/SP/Domain/Auth/Services/UpgradeAuthTokenService.php index 77324372..7fa6aa5f 100644 --- a/lib/SP/Domain/Auth/Services/UpgradeAuthTokenService.php +++ b/lib/SP/Domain/Auth/Services/UpgradeAuthTokenService.php @@ -25,13 +25,13 @@ namespace SP\Domain\Auth\Services; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Auth\Ports\AuthTokenServiceInterface; use SP\Domain\Auth\Ports\UpgradeAuthTokenServiceInterface; use SP\Domain\Common\Services\Service; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Infrastructure\Database\DatabaseInterface; diff --git a/lib/SP/Domain/Category/Adapters/CategoryAdapter.php b/lib/SP/Domain/Category/Adapters/CategoryAdapter.php index 6645a2b5..bbe24923 100644 --- a/lib/SP/Domain/Category/Adapters/CategoryAdapter.php +++ b/lib/SP/Domain/Category/Adapters/CategoryAdapter.php @@ -25,10 +25,14 @@ namespace SP\Domain\Category\Adapters; use League\Fractal\Resource\Collection; -use SP\Core\Acl\AclActionsInterface; +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\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Adapters\CustomFieldAdapter; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Mvc\Controller\ItemTrait; @@ -46,10 +50,10 @@ final class CategoryAdapter extends Adapter implements CategoryAdapterInterface protected array $availableIncludes = ['customFields']; /** - * @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 { diff --git a/lib/SP/Domain/Client/Adapters/ClientAdapter.php b/lib/SP/Domain/Client/Adapters/ClientAdapter.php index c464fc77..1132cacf 100644 --- a/lib/SP/Domain/Client/Adapters/ClientAdapter.php +++ b/lib/SP/Domain/Client/Adapters/ClientAdapter.php @@ -25,10 +25,14 @@ namespace SP\Domain\Client\Adapters; use League\Fractal\Resource\Collection; -use SP\Core\Acl\AclActionsInterface; +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\CustomField\Adapters\CustomFieldAdapter; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Mvc\Controller\ItemTrait; @@ -46,10 +50,10 @@ final class ClientAdapter extends Adapter implements ClientAdapterInterface protected array $availableIncludes = ['customFields']; /** - * @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/Common/Services/Service.php b/lib/SP/Domain/Common/Services/Service.php index 64c4226d..505fc23e 100644 --- a/lib/SP/Domain/Common/Services/Service.php +++ b/lib/SP/Domain/Common/Services/Service.php @@ -27,11 +27,12 @@ namespace SP\Domain\Common\Services; use Defuse\Crypto\Exception\CryptoException; use SP\Core\Application; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; use SP\Core\Context\SessionContext; use SP\Core\Crypt\Session; -use SP\Core\Events\EventDispatcherInterface; use SP\Domain\Config\Ports\ConfigInterface; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; + use function SP\__u; use function SP\logger; diff --git a/lib/SP/Domain/Config/Services/ConfigFileService.php b/lib/SP/Domain/Config/Services/ConfigFileService.php index 5a221510..814c9a84 100644 --- a/lib/SP/Domain/Config/Services/ConfigFileService.php +++ b/lib/SP/Domain/Config/Services/ConfigFileService.php @@ -26,7 +26,6 @@ namespace SP\Domain\Config\Services; use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use Exception; -use SP\Core\Context\ContextInterface; use SP\Core\Exceptions\ConfigException; use SP\Core\Exceptions\SPException; use SP\Domain\Config\Adapters\ConfigData; @@ -34,6 +33,7 @@ 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\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; use SP\Infrastructure\File\XmlFileStorageInterface; @@ -173,11 +173,11 @@ class ConfigFileService implements ConfigInterface /** * Guardar la configuración * - * @param \SP\Domain\Config\Ports\ConfigDataInterface $configData + * @param ConfigDataInterface $configData * @param bool|null $backup * * @return ConfigInterface - * @throws \SP\Infrastructure\File\FileException + * @throws FileException */ public function saveConfig(ConfigDataInterface $configData, ?bool $backup = true): ConfigInterface { @@ -251,7 +251,7 @@ class ConfigFileService implements ConfigInterface /** * Returns a clone of the configuration data * - * @return \SP\Domain\Config\Ports\ConfigDataInterface + * @return ConfigDataInterface */ public function getConfigData(): ConfigDataInterface { diff --git a/lib/SP/Core/Acl/AclActionsInterface.php b/lib/SP/Domain/Core/Acl/AclActionsInterface.php similarity index 98% rename from lib/SP/Core/Acl/AclActionsInterface.php rename to lib/SP/Domain/Core/Acl/AclActionsInterface.php index 577f16b7..c7e9987e 100644 --- a/lib/SP/Core/Acl/AclActionsInterface.php +++ b/lib/SP/Domain/Core/Acl/AclActionsInterface.php @@ -22,10 +22,7 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Acl; - -use SP\DataModel\ActionData; -use SP\Infrastructure\File\FileException; +namespace SP\Domain\Core\Acl; /** * Interface ActionsInterface para la definición de constantes de acciones disponibles. diff --git a/lib/SP/Core/Acl/ActionsInterface.php b/lib/SP/Domain/Core/Acl/ActionsInterface.php similarity index 94% rename from lib/SP/Core/Acl/ActionsInterface.php rename to lib/SP/Domain/Core/Acl/ActionsInterface.php index f5d63846..8dd31790 100644 --- a/lib/SP/Core/Acl/ActionsInterface.php +++ b/lib/SP/Domain/Core/Acl/ActionsInterface.php @@ -22,9 +22,9 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Acl; - +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/Bootstrap/UriContextInterface.php b/lib/SP/Domain/Core/Bootstrap/UriContextInterface.php similarity index 97% rename from lib/SP/Core/Bootstrap/UriContextInterface.php rename to lib/SP/Domain/Core/Bootstrap/UriContextInterface.php index 91a4d97a..2d136d68 100644 --- a/lib/SP/Core/Bootstrap/UriContextInterface.php +++ b/lib/SP/Domain/Core/Bootstrap/UriContextInterface.php @@ -22,7 +22,7 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Bootstrap; +namespace SP\Domain\Core\Bootstrap; /** * Class UriContext diff --git a/lib/SP/Core/Context/ContextInterface.php b/lib/SP/Domain/Core/Context/ContextInterface.php similarity index 98% rename from lib/SP/Core/Context/ContextInterface.php rename to lib/SP/Domain/Core/Context/ContextInterface.php index 77a20a01..7fac8e91 100644 --- a/lib/SP/Core/Context/ContextInterface.php +++ b/lib/SP/Domain/Core/Context/ContextInterface.php @@ -22,8 +22,9 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Context; +namespace SP\Domain\Core\Context; +use SP\Core\Context\ContextException; use SP\DataModel\ProfileData; use SP\Domain\Account\Dtos\AccountCacheDto; use SP\Domain\User\Services\UserLoginResponse; diff --git a/lib/SP/Core/Context/SessionContextInterface.php b/lib/SP/Domain/Core/Context/SessionContextInterface.php similarity index 97% rename from lib/SP/Core/Context/SessionContextInterface.php rename to lib/SP/Domain/Core/Context/SessionContextInterface.php index ada24ed5..a9e4ea9c 100644 --- a/lib/SP/Core/Context/SessionContextInterface.php +++ b/lib/SP/Domain/Core/Context/SessionContextInterface.php @@ -22,16 +22,13 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Context; +namespace SP\Domain\Core\Context; -use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Domain\Account\Search\AccountSearchFilter; +use SP\Domain\Core\Crypt\VaultInterface; /** * Class Session - * - * @package SP\Core\Session */ interface SessionContextInterface extends ContextInterface { diff --git a/lib/SP/Core/Crypt/CryptInterface.php b/lib/SP/Domain/Core/Crypt/CryptInterface.php similarity index 90% rename from lib/SP/Core/Crypt/CryptInterface.php rename to lib/SP/Domain/Core/Crypt/CryptInterface.php index d674c935..1cbf1be5 100644 --- a/lib/SP/Core/Crypt/CryptInterface.php +++ b/lib/SP/Domain/Core/Crypt/CryptInterface.php @@ -22,15 +22,14 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; use Defuse\Crypto\Key; use Defuse\Crypto\KeyProtectedByPassword; +use SP\Core\Exceptions\CryptException; /** * Class Crypt - * - * @package SP\Core\Crypt */ interface CryptInterface { @@ -41,7 +40,7 @@ interface CryptInterface * @param bool $useAscii * * @return string|KeyProtectedByPassword - * @throws \SP\Core\Exceptions\CryptException + * @throws CryptException */ public function makeSecuredKey(string $password, bool $useAscii = true): KeyProtectedByPassword|string; @@ -53,7 +52,7 @@ interface CryptInterface * @param string|null $password * * @return string - * @throws \SP\Core\Exceptions\CryptException + * @throws CryptException */ public function encrypt(string $data, Key|string $securedKey, ?string $password = null): string; @@ -65,7 +64,7 @@ interface CryptInterface * @param string|null $password * * @return string - * @throws \SP\Core\Exceptions\CryptException + * @throws CryptException */ public function decrypt( string $data, diff --git a/lib/SP/Core/Crypt/CryptPKIInterface.php b/lib/SP/Domain/Core/Crypt/CryptPKIInterface.php similarity index 92% rename from lib/SP/Core/Crypt/CryptPKIInterface.php rename to lib/SP/Domain/Core/Crypt/CryptPKIInterface.php index e23aa103..6123d8d9 100644 --- a/lib/SP/Core/Crypt/CryptPKIInterface.php +++ b/lib/SP/Domain/Core/Crypt/CryptPKIInterface.php @@ -4,7 +4,7 @@ * * @author nuxsmin * @link https://syspass.org - * @copyright 2012-2022, 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,12 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; use SP\Infrastructure\File\FileException; /** * Class CryptPKI para el manejo de las funciones para PKI - * - * @package SP */ interface CryptPKIInterface { diff --git a/lib/SP/Core/Crypt/CsrfInterface.php b/lib/SP/Domain/Core/Crypt/CsrfInterface.php similarity index 97% rename from lib/SP/Core/Crypt/CsrfInterface.php rename to lib/SP/Domain/Core/Crypt/CsrfInterface.php index 547c9298..7dc61c5a 100644 --- a/lib/SP/Core/Crypt/CsrfInterface.php +++ b/lib/SP/Domain/Core/Crypt/CsrfInterface.php @@ -22,7 +22,7 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; /** * Class CSRF diff --git a/lib/SP/Core/Crypt/RequestBasedPasswordInterface.php b/lib/SP/Domain/Core/Crypt/RequestBasedPasswordInterface.php similarity index 96% rename from lib/SP/Core/Crypt/RequestBasedPasswordInterface.php rename to lib/SP/Domain/Core/Crypt/RequestBasedPasswordInterface.php index 3c5f6c42..9c016441 100644 --- a/lib/SP/Core/Crypt/RequestBasedPasswordInterface.php +++ b/lib/SP/Domain/Core/Crypt/RequestBasedPasswordInterface.php @@ -22,7 +22,7 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; /** * Class RequestBasedPassword diff --git a/lib/SP/Core/Crypt/UuidCookieInterface.php b/lib/SP/Domain/Core/Crypt/UuidCookieInterface.php similarity index 96% rename from lib/SP/Core/Crypt/UuidCookieInterface.php rename to lib/SP/Domain/Core/Crypt/UuidCookieInterface.php index e5ae7502..0d231c0e 100644 --- a/lib/SP/Core/Crypt/UuidCookieInterface.php +++ b/lib/SP/Domain/Core/Crypt/UuidCookieInterface.php @@ -22,12 +22,10 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; /** * Class UuidCookie - * - * @package SP\Core\Crypt */ interface UuidCookieInterface { diff --git a/lib/SP/Core/Crypt/VaultInterface.php b/lib/SP/Domain/Core/Crypt/VaultInterface.php similarity index 95% rename from lib/SP/Core/Crypt/VaultInterface.php rename to lib/SP/Domain/Core/Crypt/VaultInterface.php index 44aaa50f..208d45ba 100644 --- a/lib/SP/Core/Crypt/VaultInterface.php +++ b/lib/SP/Domain/Core/Crypt/VaultInterface.php @@ -22,14 +22,12 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Crypt; +namespace SP\Domain\Core\Crypt; use SP\Core\Exceptions\CryptException; /** - * Class Vault - * - * @package SP\Core\Crypt + * Class VaultInterface */ interface VaultInterface { diff --git a/lib/SP/Core/Events/EventDispatcherInterface.php b/lib/SP/Domain/Core/Events/EventDispatcherInterface.php similarity index 96% rename from lib/SP/Core/Events/EventDispatcherInterface.php rename to lib/SP/Domain/Core/Events/EventDispatcherInterface.php index 2443ce93..19699e2c 100644 --- a/lib/SP/Core/Events/EventDispatcherInterface.php +++ b/lib/SP/Domain/Core/Events/EventDispatcherInterface.php @@ -22,7 +22,9 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Events; +namespace SP\Domain\Core\Events; + +use SP\Core\Events\Event; /** * Interface EventDispatcherInterface diff --git a/lib/SP/Core/Events/EventReceiver.php b/lib/SP/Domain/Core/Events/EventReceiver.php similarity index 95% rename from lib/SP/Core/Events/EventReceiver.php rename to lib/SP/Domain/Core/Events/EventReceiver.php index 2453f7e8..2f46c076 100644 --- a/lib/SP/Core/Events/EventReceiver.php +++ b/lib/SP/Domain/Core/Events/EventReceiver.php @@ -22,7 +22,9 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Events; +namespace SP\Domain\Core\Events; + +use SP\Core\Events\Event; /** * Interface EventReceiver diff --git a/lib/SP/Core/Events/EventSource.php b/lib/SP/Domain/Core/Events/EventSource.php similarity index 94% rename from lib/SP/Core/Events/EventSource.php rename to lib/SP/Domain/Core/Events/EventSource.php index 3db18b7b..a85edad7 100644 --- a/lib/SP/Core/Events/EventSource.php +++ b/lib/SP/Domain/Core/Events/EventSource.php @@ -22,7 +22,9 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Events; +namespace SP\Domain\Core\Events; + +use SP\Core\Events\Event; /** * Interface EventSource diff --git a/lib/SP/Core/Messages/FormatterInterface.php b/lib/SP/Domain/Core/Messages/FormatterInterface.php similarity index 88% rename from lib/SP/Core/Messages/FormatterInterface.php rename to lib/SP/Domain/Core/Messages/FormatterInterface.php index b55244cc..9726a3b9 100644 --- a/lib/SP/Core/Messages/FormatterInterface.php +++ b/lib/SP/Domain/Core/Messages/FormatterInterface.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\Messages; +namespace SP\Domain\Core\Messages; /** * Interface DetailsFormatterInterface - * - * @package SP\Core\Messages */ interface FormatterInterface { public function formatDetail(array $text, bool $translate = false): string; public function formatDescription(array $text, bool $translate = false): string; -} \ No newline at end of file +} diff --git a/lib/SP/Core/Messages/MessageInterface.php b/lib/SP/Domain/Core/Messages/MessageInterface.php similarity index 95% rename from lib/SP/Core/Messages/MessageInterface.php rename to lib/SP/Domain/Core/Messages/MessageInterface.php index d8ae4edf..bbb70898 100644 --- a/lib/SP/Core/Messages/MessageInterface.php +++ b/lib/SP/Domain/Core/Messages/MessageInterface.php @@ -22,12 +22,10 @@ * along with sysPass. If not, see . */ -namespace SP\Core\Messages; +namespace SP\Domain\Core\Messages; /** * Interface MessageInterface - * - * @package SP\Core\Messages */ interface MessageInterface { @@ -46,4 +44,4 @@ interface MessageInterface * @return string */ public function composeHtml(): string; -} \ No newline at end of file +} diff --git a/lib/SP/Domain/Core/UI/ThemeIconsInterface.php b/lib/SP/Domain/Core/UI/ThemeIconsInterface.php index 52edcedb..c04bf12b 100644 --- a/lib/SP/Domain/Core/UI/ThemeIconsInterface.php +++ b/lib/SP/Domain/Core/UI/ThemeIconsInterface.php @@ -24,7 +24,7 @@ namespace SP\Domain\Core\UI; -use SP\Core\Context\ContextInterface; +use SP\Domain\Core\Context\ContextInterface; use SP\Html\Assets\IconInterface; use SP\Infrastructure\File\FileCache; diff --git a/lib/SP/Domain/Crypt/Ports/SecureSessionServiceInterface.php b/lib/SP/Domain/Crypt/Ports/SecureSessionServiceInterface.php index aee52133..71b24e54 100644 --- a/lib/SP/Domain/Crypt/Ports/SecureSessionServiceInterface.php +++ b/lib/SP/Domain/Crypt/Ports/SecureSessionServiceInterface.php @@ -25,9 +25,8 @@ namespace SP\Domain\Crypt\Ports; use Defuse\Crypto\Key; -use SP\Core\Crypt\UuidCookie; -use SP\Core\Crypt\UuidCookieInterface; use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Crypt\UuidCookieInterface; /** * Class SecureSessionService diff --git a/lib/SP/Domain/Crypt/Services/SecureSessionService.php b/lib/SP/Domain/Crypt/Services/SecureSessionService.php index 94d8eac9..fcbfb4ec 100644 --- a/lib/SP/Domain/Crypt/Services/SecureSessionService.php +++ b/lib/SP/Domain/Crypt/Services/SecureSessionService.php @@ -27,17 +27,16 @@ namespace SP\Domain\Crypt\Services; use Defuse\Crypto\Key; use Exception; use SP\Core\Application; -use SP\Core\Crypt\CryptInterface; -use SP\Core\Crypt\RequestBasedPassword; -use SP\Core\Crypt\RequestBasedPasswordInterface; -use SP\Core\Crypt\UuidCookie; -use SP\Core\Crypt\UuidCookieInterface; use SP\Core\Crypt\Vault; use SP\Domain\Common\Services\Service; use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Crypt\CryptInterface; +use SP\Domain\Core\Crypt\RequestBasedPasswordInterface; +use SP\Domain\Core\Crypt\UuidCookieInterface; use SP\Domain\Crypt\Ports\SecureSessionServiceInterface; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; + use function SP\logger; use function SP\processException; diff --git a/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php b/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php index ca5976df..b2abeb3a 100644 --- a/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php +++ b/lib/SP/Domain/CustomField/Services/CustomFieldDefService.php @@ -24,7 +24,6 @@ namespace SP\Domain\CustomField\Services; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; @@ -34,6 +33,7 @@ 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\CustomField\Ports\CustomFieldDefRepositoryInterface; use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface; use SP\Domain\CustomField\Ports\CustomFieldRepositoryInterface; @@ -104,7 +104,7 @@ final class CustomFieldDefService extends Service implements CustomFieldDefServi } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function delete(int $id): CustomFieldDefService { @@ -147,11 +147,11 @@ final class CustomFieldDefService extends Service implements CustomFieldDefServi } /** - * @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 { @@ -193,9 +193,9 @@ final class CustomFieldDefService extends Service implements CustomFieldDefServi } /** - * @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 { diff --git a/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDataService.php b/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDataService.php index fb968429..fc1472b0 100644 --- a/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDataService.php +++ b/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDataService.php @@ -26,11 +26,11 @@ namespace SP\Domain\CustomField\Services; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\Domain\Common\Services\Service; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Ports\CustomFieldServiceInterface; use SP\Domain\CustomField\Ports\UpgradeCustomFieldDataServiceInterface; use SP\Infrastructure\Database\DatabaseInterface; diff --git a/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDefinitionService.php b/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDefinitionService.php index ab29f21e..eba9bbd4 100644 --- a/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDefinitionService.php +++ b/lib/SP/Domain/CustomField/Services/UpgradeCustomFieldDefinitionService.php @@ -25,13 +25,13 @@ namespace SP\Domain\CustomField\Services; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Application; use SP\Core\Events\Event; use SP\Core\Events\EventMessage; use SP\DataModel\CustomFieldDefDataOld; use SP\DataModel\CustomFieldDefinitionData; use SP\Domain\Common\Services\Service; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\CustomField\Ports\CustomFieldDefServiceInterface; use SP\Domain\CustomField\Ports\CustomFieldTypeServiceInterface; use SP\Domain\CustomField\Ports\UpgradeCustomFieldDefinitionServiceInterface; diff --git a/lib/SP/Domain/Export/Services/FileBackupService.php b/lib/SP/Domain/Export/Services/FileBackupService.php index 5c6b89f7..9cc8061a 100644 --- a/lib/SP/Domain/Export/Services/FileBackupService.php +++ b/lib/SP/Domain/Export/Services/FileBackupService.php @@ -29,7 +29,6 @@ use Exception; use PDO; use SP\Core\Application; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Events\EventMessage; use SP\Core\Exceptions\CheckException; use SP\Core\Exceptions\ConstraintException; @@ -39,6 +38,7 @@ 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\Export\Ports\BackupFilesInterface; use SP\Domain\Export\Ports\FileBackupServiceInterface; use SP\Infrastructure\Common\Repositories\Query; diff --git a/lib/SP/Http/Request.php b/lib/SP/Http/Request.php index 35da4f27..a41fc538 100644 --- a/lib/SP/Http/Request.php +++ b/lib/SP/Http/Request.php @@ -27,9 +27,9 @@ namespace SP\Http; use Exception; use Klein\DataCollection\DataCollection; use Klein\DataCollection\HeaderDataCollection; -use SP\Core\Crypt\CryptPKIInterface; use SP\Core\Crypt\Hash; use SP\Core\Exceptions\SPException; +use SP\Domain\Core\Crypt\CryptPKIInterface; use SP\Util\Filter; use SP\Util\Util; diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountRepository.php index 0eb83aa9..be510b4f 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\Context\ContextInterface; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\DataModel\ItemSearchData; @@ -36,11 +34,14 @@ use SP\Domain\Account\Models\AccountDataView; use SP\Domain\Account\Models\AccountSearchView; 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\Infrastructure\Common\Repositories\Repository; use SP\Infrastructure\Common\Repositories\RepositoryItemTrait; use SP\Infrastructure\Database\DatabaseInterface; use SP\Infrastructure\Database\QueryData; use SP\Infrastructure\Database\QueryResult; + use function SP\__u; /** @@ -128,9 +129,9 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * * @param int $accountId * - * @return \SP\Infrastructure\Database\QueryResult - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @return QueryResult + * @throws ConstraintException + * @throws QueryException */ public function incrementDecryptCounter(int $accountId): QueryResult { @@ -147,11 +148,11 @@ final class AccountRepository extends Repository implements AccountRepositoryInt /** * 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 { @@ -170,11 +171,11 @@ final class AccountRepository extends Repository implements AccountRepositoryInt /** * 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 { @@ -192,11 +193,11 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * 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 { @@ -218,11 +219,11 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * 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 { @@ -242,11 +243,11 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * 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 { @@ -281,8 +282,8 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * @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 { @@ -301,13 +302,13 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * 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\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function update(int $accountId, Account $account, bool $changeOwner, bool $changeUserGroup): QueryResult { @@ -352,13 +353,13 @@ final class AccountRepository extends Repository implements AccountRepositoryInt * 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\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function updateBulk(int $accountId, Account $account, bool $changeOwner, bool $changeUserGroup): QueryResult { @@ -625,7 +626,7 @@ final class AccountRepository extends Repository implements AccountRepositoryInt /** * Obtener los datos relativos a la clave de todas las cuentas. * - * @return \SP\Infrastructure\Database\QueryResult + * @return QueryResult */ public function getAccountsPassData(): QueryResult { diff --git a/lib/SP/Infrastructure/Account/Repositories/AccountSearchRepository.php b/lib/SP/Infrastructure/Account/Repositories/AccountSearchRepository.php index e93831f0..f63913d3 100644 --- a/lib/SP/Infrastructure/Account/Repositories/AccountSearchRepository.php +++ b/lib/SP/Infrastructure/Account/Repositories/AccountSearchRepository.php @@ -26,13 +26,13 @@ namespace SP\Infrastructure\Account\Repositories; use Aura\SqlQuery\Common\SelectInterface; use Aura\SqlQuery\QueryFactory; -use SP\Core\Context\ContextInterface; -use SP\Core\Events\EventDispatcherInterface; use SP\DataModel\AccountSearchVData; use SP\Domain\Account\Ports\AccountFilterUserInterface; use SP\Domain\Account\Ports\AccountSearchRepositoryInterface; use SP\Domain\Account\Search\AccountSearchConstants; use SP\Domain\Account\Search\AccountSearchFilter; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Infrastructure\Common\Repositories\Repository; use SP\Infrastructure\Database\DatabaseInterface; use SP\Infrastructure\Database\QueryData; @@ -192,7 +192,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR * @param int $userId * @param int $userGroupId * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForUser(int $userId, int $userGroupId): SelectInterface { @@ -215,7 +215,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param int $userGroupId * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForGroup(int $userGroupId): SelectInterface { @@ -233,7 +233,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $userGroupName * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForMainGroup(string $userGroupName): SelectInterface { @@ -249,7 +249,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $owner * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForOwner(string $owner): SelectInterface { @@ -266,7 +266,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $fileName * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForFile(string $fileName): SelectInterface { @@ -284,7 +284,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param int $accountId * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForAccountId(int $accountId): SelectInterface { @@ -298,7 +298,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $clientName * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForClient(string $clientName): SelectInterface { @@ -314,7 +314,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $categoryName * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForCategory(string $categoryName): SelectInterface { @@ -330,7 +330,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR /** * @param string $accountName * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForAccountNameRegex(string $accountName): SelectInterface { @@ -359,7 +359,7 @@ final class AccountSearchRepository extends Repository implements AccountSearchR * @param int $userId * @param int $userGroupId * - * @return \Aura\SqlQuery\Common\SelectInterface + * @return SelectInterface */ public function withFilterForIsPrivate(int $userId, int $userGroupId): SelectInterface { diff --git a/lib/SP/Infrastructure/Common/Repositories/Repository.php b/lib/SP/Infrastructure/Common/Repositories/Repository.php index e228449e..bcd9b218 100644 --- a/lib/SP/Infrastructure/Common/Repositories/Repository.php +++ b/lib/SP/Infrastructure/Common/Repositories/Repository.php @@ -27,16 +27,17 @@ namespace SP\Infrastructure\Common\Repositories; use Aura\SqlQuery\QueryFactory; use Closure; use Exception; -use SP\Core\Context\ContextInterface; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; 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\Infrastructure\Database\DatabaseInterface; use SP\Infrastructure\Database\QueryData; use SP\Infrastructure\Database\QueryResult; + use function SP\__u; use function SP\logger; @@ -61,11 +62,11 @@ abstract class Repository implements RepositoryInterface /** * Bubbles a Closure in a database transaction * - * @param \Closure $closure + * @param Closure $closure * @param object $newThis * * @return mixed - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ final public function transactionAware(Closure $closure, object $newThis): mixed { @@ -102,7 +103,7 @@ abstract class Repository implements RepositoryInterface * @param string|null $where * @param array|null $bindValues * - * @return \SP\Infrastructure\Database\QueryResult + * @return QueryResult */ final public function getAny( array $columns, diff --git a/lib/SP/Mvc/Controller/ExtensibleControllerInterface.php b/lib/SP/Mvc/Controller/ExtensibleControllerInterface.php index 40918cc4..8683eb6d 100644 --- a/lib/SP/Mvc/Controller/ExtensibleControllerInterface.php +++ b/lib/SP/Mvc/Controller/ExtensibleControllerInterface.php @@ -25,7 +25,7 @@ namespace SP\Mvc\Controller; -use SP\Core\Events\EventDispatcherInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Mvc\View\TemplateInterface; /** @@ -49,4 +49,4 @@ interface ExtensibleControllerInterface * @return EventDispatcherInterface */ public function getEventDispatcher(): EventDispatcherInterface; -} \ No newline at end of file +} diff --git a/lib/SP/Providers/Acl/AclHandler.php b/lib/SP/Providers/Acl/AclHandler.php index 83bbba6b..a99c760d 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\Events\EventReceiver; 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\User\Ports\UserGroupServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; use SP\Providers\EventsTrait; diff --git a/lib/SP/Providers/Auth/Ldap/LdapActions.php b/lib/SP/Providers/Auth/Ldap/LdapActions.php index 59449229..24def0ff 100644 --- a/lib/SP/Providers/Auth/Ldap/LdapActions.php +++ b/lib/SP/Providers/Auth/Ldap/LdapActions.php @@ -28,9 +28,10 @@ use Laminas\Ldap\Collection; use Laminas\Ldap\Exception\LdapException as LaminasLdapException; use Laminas\Ldap\Ldap as LaminasLdap; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Events\EventMessage; use SP\Domain\Auth\Ports\LdapActionsInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; + use function SP\__u; /** diff --git a/lib/SP/Providers/Auth/Ldap/LdapAuth.php b/lib/SP/Providers/Auth/Ldap/LdapAuth.php index 72ffc91d..9ba7b1b8 100644 --- a/lib/SP/Providers/Auth/Ldap/LdapAuth.php +++ b/lib/SP/Providers/Auth/Ldap/LdapAuth.php @@ -26,12 +26,12 @@ namespace SP\Providers\Auth\Ldap; use SP\Core\Events\Event; use SP\Core\Events\EventDispatcher; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Events\EventMessage; use SP\DataModel\UserLoginData; use SP\Domain\Auth\Ports\LdapAuthInterface; use SP\Domain\Auth\Ports\LdapInterface; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use function SP\__u; use function SP\processException; diff --git a/lib/SP/Providers/Auth/Ldap/LdapBase.php b/lib/SP/Providers/Auth/Ldap/LdapBase.php index 6d4e7495..36f7f1f1 100644 --- a/lib/SP/Providers/Auth/Ldap/LdapBase.php +++ b/lib/SP/Providers/Auth/Ldap/LdapBase.php @@ -26,10 +26,10 @@ namespace SP\Providers\Auth\Ldap; use Exception; use SP\Core\Events\EventDispatcher; -use SP\Core\Events\EventDispatcherInterface; use SP\Domain\Auth\Ports\LdapActionsInterface; use SP\Domain\Auth\Ports\LdapConnectionInterface; use SP\Domain\Auth\Ports\LdapInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use function SP\__u; diff --git a/lib/SP/Providers/Auth/Ldap/LdapConnection.php b/lib/SP/Providers/Auth/Ldap/LdapConnection.php index 4d505bf7..bda6ee17 100644 --- a/lib/SP/Providers/Auth/Ldap/LdapConnection.php +++ b/lib/SP/Providers/Auth/Ldap/LdapConnection.php @@ -29,9 +29,9 @@ namespace SP\Providers\Auth\Ldap; use Laminas\Ldap\Exception\LdapException as LaminasLdapException; use Laminas\Ldap\Ldap as LaminasLdap; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; use SP\Core\Events\EventMessage; use SP\Domain\Auth\Ports\LdapConnectionInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use function SP\__u; diff --git a/lib/SP/Providers/Log/DatabaseLogHandler.php b/lib/SP/Providers/Log/DatabaseLogHandler.php index 5701e8da..29ed873c 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\Events\EventReceiver; 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\LanguageInterface; use SP\Domain\Security\Ports\EventlogServiceInterface; use SP\Domain\Security\Services\EventlogService; diff --git a/lib/SP/Providers/Log/LoggerBase.php b/lib/SP/Providers/Log/LoggerBase.php index 77d22757..c5790eea 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\Events\EventReceiver; use SP\Core\Exceptions\InvalidClassException; use SP\Core\Language; +use SP\Domain\Core\Events\EventReceiver; use SP\Domain\Core\LanguageInterface; use SP\Http\Request; use SP\Http\RequestInterface; diff --git a/lib/SP/Providers/Mail/MailHandler.php b/lib/SP/Providers/Mail/MailHandler.php index de453f8e..9c541309 100644 --- a/lib/SP/Providers/Mail/MailHandler.php +++ b/lib/SP/Providers/Mail/MailHandler.php @@ -27,9 +27,9 @@ namespace SP\Providers\Mail; use Exception; use SP\Core\Application; use SP\Core\Events\Event; -use SP\Core\Events\EventReceiver; use SP\Core\Messages\MailMessage; use SP\Core\Messages\TextFormatter; +use SP\Domain\Core\Events\EventReceiver; use SP\Domain\Notification\Ports\MailServiceInterface; use SP\Domain\Notification\Services\MailService; use SP\Http\Request; diff --git a/lib/SP/Providers/Notification/NotificationHandler.php b/lib/SP/Providers/Notification/NotificationHandler.php index 5b54ffb9..ed11efaf 100644 --- a/lib/SP/Providers/Notification/NotificationHandler.php +++ b/lib/SP/Providers/Notification/NotificationHandler.php @@ -27,8 +27,8 @@ namespace SP\Providers\Notification; use Exception; use SP\Core\Application; use SP\Core\Events\Event; -use SP\Core\Events\EventReceiver; use SP\DataModel\NotificationData; +use SP\Domain\Core\Events\EventReceiver; use SP\Domain\Notification\Ports\NotificationServiceInterface; use SP\Domain\Notification\Services\NotificationService; use SP\Providers\EventsTrait; diff --git a/lib/SP/Providers/Provider.php b/lib/SP/Providers/Provider.php index 920e16ad..9a0e1456 100644 --- a/lib/SP/Providers/Provider.php +++ b/lib/SP/Providers/Provider.php @@ -25,9 +25,9 @@ namespace SP\Providers; use SP\Core\Application; -use SP\Core\Context\ContextInterface; -use SP\Core\Events\EventDispatcherInterface; use SP\Domain\Config\Ports\ConfigInterface; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; /** * Class Service diff --git a/tests/SP/Core/Crypt/CsrfTest.php b/tests/SP/Core/Crypt/CsrfTest.php index 54a74439..22ad7610 100644 --- a/tests/SP/Core/Crypt/CsrfTest.php +++ b/tests/SP/Core/Crypt/CsrfTest.php @@ -25,10 +25,10 @@ namespace SP\Tests\Core\Crypt; use PHPUnit\Framework\MockObject\MockObject; -use SP\Core\Context\SessionContextInterface; use SP\Core\Crypt\Csrf; use SP\Core\Crypt\Hash; use SP\Domain\Config\Ports\ConfigDataInterface; +use SP\Domain\Core\Context\SessionContextInterface; use SP\Http\RequestInterface; use SP\Tests\UnitaryTestCase; diff --git a/tests/SP/Core/Crypt/SessionTest.php b/tests/SP/Core/Crypt/SessionTest.php index 64dc5706..dcc91c52 100644 --- a/tests/SP/Core/Crypt/SessionTest.php +++ b/tests/SP/Core/Crypt/SessionTest.php @@ -26,10 +26,10 @@ namespace SP\Tests\Core\Crypt; use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; -use SP\Core\Context\SessionContextInterface; use SP\Core\Crypt\Session; -use SP\Core\Crypt\VaultInterface; use SP\Core\Exceptions\CryptException; +use SP\Domain\Core\Context\SessionContextInterface; +use SP\Domain\Core\Crypt\VaultInterface; use SP\Tests\UnitaryTestCase; /** diff --git a/tests/SP/Core/Events/EventDispatcherTest.php b/tests/SP/Core/Events/EventDispatcherTest.php index a3544eb0..918d7aa6 100644 --- a/tests/SP/Core/Events/EventDispatcherTest.php +++ b/tests/SP/Core/Events/EventDispatcherTest.php @@ -27,7 +27,7 @@ namespace SP\Tests\Core\Events; use PHPUnit\Framework\MockObject\MockObject; use SP\Core\Events\Event; use SP\Core\Events\EventDispatcher; -use SP\Core\Events\EventReceiver; +use SP\Domain\Core\Events\EventReceiver; use SP\Tests\UnitaryTestCase; /** diff --git a/tests/SP/Core/UI/ThemeIconsTest.php b/tests/SP/Core/UI/ThemeIconsTest.php index 9ec2e1dc..f6a279e0 100644 --- a/tests/SP/Core/UI/ThemeIconsTest.php +++ b/tests/SP/Core/UI/ThemeIconsTest.php @@ -25,9 +25,10 @@ namespace SP\Tests\Core\UI; use PHPUnit\Framework\MockObject\Exception; -use SP\Core\Context\ContextInterface; use SP\Core\Exceptions\InvalidClassException; use SP\Core\UI\ThemeIcons; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\UI\ThemeContextInterface; use SP\Html\Assets\FontIcon; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; @@ -85,7 +86,7 @@ class ThemeIconsTest extends UnitaryTestCase { $context = $this->createMock(ContextInterface::class); $fileCache = $this->createMock(FileCacheInterface::class); - $themeContext = $this->createMock(\SP\Domain\Core\UI\ThemeContextInterface::class); + $themeContext = $this->createMock(ThemeContextInterface::class); $context->expects(self::once()) ->method('getAppStatus') diff --git a/tests/SP/Core/UI/ThemeTest.php b/tests/SP/Core/UI/ThemeTest.php index 9723acf8..5103e5fc 100644 --- a/tests/SP/Core/UI/ThemeTest.php +++ b/tests/SP/Core/UI/ThemeTest.php @@ -28,9 +28,10 @@ use Directory; use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; use SP\Core\Context\ContextException; -use SP\Core\Context\SessionContextInterface; use SP\Core\UI\Theme; +use SP\Domain\Core\Context\SessionContextInterface; use SP\Domain\Core\UI\ThemeContextInterface; +use SP\Domain\Core\UI\ThemeIconsInterface; use SP\Domain\User\Services\UserLoginResponse; use SP\Tests\Generators\UserDataGenerator; use SP\Tests\UnitaryTestCase; @@ -43,8 +44,8 @@ use SP\Tests\UnitaryTestCase; class ThemeTest extends UnitaryTestCase { - private \SP\Domain\Core\UI\ThemeContextInterface|MockObject $themeContext; - private \SP\Domain\Core\UI\ThemeIconsInterface|MockObject $themeIcons; + private ThemeContextInterface|MockObject $themeContext; + private ThemeIconsInterface|MockObject $themeIcons; private Theme $theme; public function testGetIcons() @@ -180,7 +181,7 @@ class ThemeTest extends UnitaryTestCase parent::setUp(); $this->themeContext = $this->createMock(ThemeContextInterface::class); - $this->themeIcons = $this->createMock(\SP\Domain\Core\UI\ThemeIconsInterface::class); + $this->themeIcons = $this->createMock(ThemeIconsInterface::class); $this->theme = new Theme($this->themeContext, $this->themeIcons); } diff --git a/tests/SP/Domain/Account/Services/AccountAclServiceTest.php b/tests/SP/Domain/Account/Services/AccountAclServiceTest.php index 0cd6915a..3b8dabeb 100644 --- a/tests/SP/Domain/Account/Services/AccountAclServiceTest.php +++ b/tests/SP/Domain/Account/Services/AccountAclServiceTest.php @@ -24,8 +24,8 @@ namespace SP\Tests\Domain\Account\Services; +use PHPUnit\Framework\MockObject\Exception; use SP\Core\Acl\Acl; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\DataModel\ItemData; @@ -33,6 +33,7 @@ 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\User\Ports\UserToUserGroupServiceInterface; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; @@ -167,8 +168,8 @@ class AccountAclServiceTest extends UnitaryTestCase /** * @group acl:admin * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testGetAclForAdminApp(): void { @@ -197,7 +198,7 @@ class AccountAclServiceTest extends UnitaryTestCase } /** - * @param \SP\Domain\Account\Dtos\AccountAclDto $accountAclDto The ACL dto to compile the ACL for the user + * @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 @@ -336,7 +337,7 @@ class AccountAclServiceTest extends UnitaryTestCase /** * @group acl:admin * - * @return \SP\Domain\Account\Services\AccountAcl + * @return AccountAcl */ private function getExampleAclForAdmin(): AccountAcl { @@ -365,8 +366,8 @@ class AccountAclServiceTest extends UnitaryTestCase /** * @group acl:admin * - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\ConstraintException + * @throws QueryException + * @throws ConstraintException */ public function testGetAclForAdminAcc(): void { @@ -406,8 +407,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testCheckViewPass( int $accountId, @@ -442,8 +443,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testCheckDelete( int $accountId, @@ -478,8 +479,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testEditPass( int $accountId, @@ -514,8 +515,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testEditAndRestore( int $accountId, @@ -551,8 +552,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testCheckPermission( int $accountId, @@ -587,8 +588,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testViewFiles( int $accountId, @@ -623,8 +624,8 @@ class AccountAclServiceTest extends UnitaryTestCase * @param bool $shouldView * @param bool $shouldEdit * - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testCheckView( int $accountId, @@ -657,9 +658,9 @@ class AccountAclServiceTest extends UnitaryTestCase } /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws Exception + * @throws ConstraintException + * @throws QueryException */ public function testCacheIsUsedWithHit(): void { @@ -697,9 +698,9 @@ class AccountAclServiceTest extends UnitaryTestCase } /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws Exception + * @throws ConstraintException + * @throws QueryException */ public function testCacheIsUsedWithMiss(): void { @@ -741,9 +742,9 @@ class AccountAclServiceTest extends UnitaryTestCase } /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws Exception + * @throws ConstraintException + * @throws QueryException */ public function testCacheLoadThrowsExceptionAndLogged(): void { @@ -776,9 +777,9 @@ class AccountAclServiceTest extends UnitaryTestCase } /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws Exception + * @throws ConstraintException + * @throws QueryException */ public function testCacheSaveThrowsExceptionAndLogged(): void { diff --git a/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php b/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php index 605ac8d1..f6ca102f 100644 --- a/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php +++ b/tests/SP/Domain/Account/Services/AccountCryptServiceTest.php @@ -24,16 +24,20 @@ namespace SP\Tests\Domain\Account\Services; +use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; -use SP\Core\Crypt\CryptInterface; +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\Crypt\Services\UpdateMasterPassRequest; use SP\Domain\Task\Ports\TaskInterface; use SP\Domain\Task\Services\TaskFactory; +use SP\Infrastructure\File\FileException; use SP\Tests\Generators\AccountDataGenerator; use SP\Tests\UnitaryTestCase; @@ -51,9 +55,9 @@ class AccountCryptServiceTest extends UnitaryTestCase private MockObject|CryptInterface $crypt; /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Infrastructure\File\FileException - * @throws \PHPUnit\Framework\MockObject\Exception + * @throws ServiceException + * @throws FileException + * @throws Exception */ public function testUpdateMasterPassword(): void { @@ -94,7 +98,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateMasterPasswordWithNoAccounts(): void { @@ -121,7 +125,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateMasterPasswordDoesNotThrowException(): void { @@ -139,7 +143,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateMasterPasswordThrowException(): void { @@ -147,7 +151,7 @@ class AccountCryptServiceTest extends UnitaryTestCase $this->accountService->expects(self::once()) ->method('getAccountsPassData') - ->willThrowException(new \RuntimeException('test')); + ->willThrowException(new RuntimeException('test')); $this->expectException(ServiceException::class); $this->expectExceptionMessage('Error while updating the accounts\' passwords'); @@ -156,8 +160,8 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Infrastructure\File\FileException + * @throws ServiceException + * @throws FileException */ public function testUpdateHistoryMasterPassword(): void { @@ -191,7 +195,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateHistoryMasterPasswordWithNoAccounts(): void { @@ -218,7 +222,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateHistoryMasterPasswordThrowException(): void { @@ -226,7 +230,7 @@ class AccountCryptServiceTest extends UnitaryTestCase $this->accountHistoryService->expects(self::once()) ->method('getAccountsPassData') - ->willThrowException(new \RuntimeException('test')); + ->willThrowException(new RuntimeException('test')); $this->expectException(ServiceException::class); $this->expectExceptionMessage('Error while updating the accounts\' passwords in history'); @@ -235,7 +239,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateHistoryMasterPasswordDoesNotThrowException(): void { @@ -253,7 +257,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetPasswordEncrypted(): void { @@ -278,8 +282,8 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Context\ContextException + * @throws ServiceException + * @throws ContextException */ public function testGetPasswordEncryptedThrowsExceptionWithNoMasterPassword(): void { @@ -298,7 +302,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetPasswordEncryptedThrowsExceptionWithEmptyMasterPassword(): void { @@ -315,7 +319,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetPasswordEncryptedThrowsExceptionWithLongPass(): void { @@ -334,7 +338,7 @@ class AccountCryptServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetPasswordEncryptedThrowsExceptionWithLongKey(): void { diff --git a/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php b/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php index 4d72ed1d..0791dd1a 100644 --- a/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php +++ b/tests/SP/Domain/Account/Services/PublicLinkServiceTest.php @@ -24,10 +24,13 @@ namespace SP\Tests\Domain\Account\Services; +use Defuse\Crypto\Exception\CryptoException; +use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use PHPUnit\Framework\Constraint\Callback; use PHPUnit\Framework\MockObject\MockObject; -use SP\Core\Context\ContextInterface; -use SP\Core\Crypt\CryptInterface; +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; @@ -35,6 +38,8 @@ use SP\Domain\Account\Ports\PublicLinkRepositoryInterface; use SP\Domain\Account\Services\PublicLinkService; 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\Http\RequestInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Database\QueryResult; @@ -56,9 +61,9 @@ class PublicLinkServiceTest extends UnitaryTestCase private MockObject|AccountServiceInterface $accountService; /** - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws QueryException + * @throws ConstraintException + * @throws ServiceException */ public function testAddLinkView() { @@ -80,9 +85,9 @@ class PublicLinkServiceTest 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 testAddLinkViewWithoutHash() { @@ -95,9 +100,9 @@ class PublicLinkServiceTest 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 testAddLinkViewWithUseInfo() { @@ -128,7 +133,7 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function testGetByHash() { @@ -148,7 +153,7 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function testGetByHashNotFound() { @@ -167,9 +172,9 @@ class PublicLinkServiceTest 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 testDeleteByIdBatch() { @@ -187,9 +192,9 @@ class PublicLinkServiceTest 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 testDeleteByIdBatchWithCountMismatch() { @@ -213,9 +218,9 @@ class PublicLinkServiceTest 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 testUpdate() { @@ -230,8 +235,8 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException + * @throws ConstraintException + * @throws QueryException */ public function testDelete() { @@ -258,8 +263,8 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Core\Exceptions\SPException + * @throws NoSuchItemException + * @throws SPException */ public function testGetHashForItem() { @@ -278,8 +283,8 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Core\Exceptions\SPException + * @throws NoSuchItemException + * @throws SPException */ public function testGetHashForItemNotFound() { @@ -298,13 +303,13 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws CryptoException + * @throws EnvironmentIsBrokenException + * @throws NoSuchItemException + * @throws ConstraintException + * @throws QueryException + * @throws ServiceException + * @throws SPException */ public function testRefresh() { @@ -357,13 +362,13 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws CryptoException + * @throws EnvironmentIsBrokenException + * @throws NoSuchItemException + * @throws ConstraintException + * @throws QueryException + * @throws ServiceException + * @throws SPException */ public function testRefreshNotFound() { @@ -383,7 +388,7 @@ class PublicLinkServiceTest extends UnitaryTestCase /** * @return void - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException + * @throws EnvironmentIsBrokenException */ public function testGetPublicLinkKey() { @@ -397,7 +402,7 @@ class PublicLinkServiceTest extends UnitaryTestCase /** * @return void - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException + * @throws EnvironmentIsBrokenException */ public function testGetPublicLinkKeyWithoutHash() { @@ -409,8 +414,8 @@ class PublicLinkServiceTest extends UnitaryTestCase /** * @return void - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @throws SPException + * @throws NoSuchItemException */ public function testGetById() { @@ -430,8 +435,8 @@ class PublicLinkServiceTest extends UnitaryTestCase /** * @return void - * @throws \SP\Core\Exceptions\SPException - * @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException + * @throws SPException + * @throws NoSuchItemException */ public function testGetByIdNotFound() { @@ -450,7 +455,7 @@ class PublicLinkServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function testGetAllBasic() { @@ -497,10 +502,10 @@ class PublicLinkServiceTest extends UnitaryTestCase /** * @return void - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\SPException + * @throws CryptoException + * @throws ConstraintException + * @throws QueryException + * @throws SPException */ public function testCreate() { diff --git a/tests/SP/Domain/Api/Services/ApiServiceTest.php b/tests/SP/Domain/Api/Services/ApiServiceTest.php index a84002c5..fd4f0213 100644 --- a/tests/SP/Domain/Api/Services/ApiServiceTest.php +++ b/tests/SP/Domain/Api/Services/ApiServiceTest.php @@ -28,16 +28,20 @@ use Exception; use Faker\Factory; use PHPUnit\Framework\MockObject\MockObject; use ReflectionClass; -use SP\Core\Acl\AclActionsInterface; -use SP\Core\Context\ContextInterface; +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; 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\Security\Ports\TrackServiceInterface; use SP\Domain\User\Ports\UserProfileServiceInterface; use SP\Domain\User\Ports\UserServiceInterface; @@ -48,6 +52,7 @@ use SP\Tests\Generators\UserDataGenerator; use SP\Tests\Generators\UserProfileDataGenerator; use SP\Tests\UnitaryTestCase; use stdClass; + use function PHPUnit\Framework\onConsecutiveCalls; /** @@ -186,8 +191,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\InvalidClassException - * @throws \SP\Core\Exceptions\InvalidArgumentException + * @throws InvalidClassException + * @throws InvalidArgumentException */ public function testGetParamWithHelp() { @@ -214,7 +219,7 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\InvalidClassException + * @throws InvalidClassException */ public function testSetHelpClass() { @@ -227,7 +232,7 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\InvalidClassException + * @throws InvalidClassException */ public function testSetHelpClassError() { @@ -246,8 +251,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetup() { @@ -285,8 +290,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\InvalidArgumentException - * @throws \SP\Core\Context\ContextException + * @throws InvalidArgumentException + * @throws ContextException */ protected function setUp(): void { @@ -313,8 +318,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetupAttemptsExceeded() { @@ -333,8 +338,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetupTrackingError() { @@ -358,7 +363,7 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Exceptions\SPException + * @throws SPException */ public function testSetupInvalidToken() { @@ -383,8 +388,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetupAccessDenied() { @@ -419,8 +424,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetupWithMasterPass() { @@ -470,8 +475,8 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws SPException */ public function testSetupWithMasterPassWrongTokenPass() { @@ -557,10 +562,10 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Context\ContextException - * @throws \SP\Core\Exceptions\CryptException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ContextException + * @throws CryptException + * @throws ServiceException + * @throws SPException */ public function testRequireMasterPass() { @@ -608,9 +613,9 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Core\Context\ContextException - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\SPException + * @throws ContextException + * @throws ServiceException + * @throws SPException */ public function testRequireMasterPassNotInitialized() { @@ -621,9 +626,9 @@ class ApiServiceTest extends UnitaryTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException - * @throws \SP\Core\Exceptions\CryptException - * @throws \SP\Core\Exceptions\SPException + * @throws ServiceException + * @throws CryptException + * @throws SPException */ public function testGetMasterPass() { diff --git a/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php b/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php index 08ea6014..054e58d2 100644 --- a/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php +++ b/tests/SP/Domain/Crypt/Services/SecureSessionServiceTest.php @@ -24,15 +24,18 @@ namespace SP\Tests\Domain\Crypt\Services; +use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use Defuse\Crypto\Key; use Exception; use PHPUnit\Framework\MockObject\MockObject; +use SP\Core\Context\ContextException; use SP\Core\Crypt\Crypt; -use SP\Core\Crypt\CryptInterface; -use SP\Core\Crypt\RequestBasedPasswordInterface; 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\Crypt\Services\SecureSessionService; use SP\Infrastructure\File\FileCacheInterface; use SP\Infrastructure\File\FileException; @@ -52,8 +55,8 @@ class SecureSessionServiceTest extends UnitaryTestCase /** * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Core\Exceptions\CryptException + * @throws EnvironmentIsBrokenException + * @throws CryptException */ public function testGetKey() { @@ -118,8 +121,8 @@ class SecureSessionServiceTest extends UnitaryTestCase } /** - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Core\Exceptions\CryptException + * @throws EnvironmentIsBrokenException + * @throws CryptException */ public function testGetKeyBuildPasswordException() { @@ -136,7 +139,7 @@ class SecureSessionServiceTest extends UnitaryTestCase /** * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetFileNameFrom() { @@ -152,7 +155,7 @@ class SecureSessionServiceTest extends UnitaryTestCase /** * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetFileNameFromErrorLoadingCookie() { @@ -168,7 +171,7 @@ class SecureSessionServiceTest extends UnitaryTestCase /** * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetFileNameFromErrorCreatingCookie() { @@ -185,7 +188,7 @@ class SecureSessionServiceTest extends UnitaryTestCase /** * @return void * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Context\ContextException + * @throws ContextException */ protected function setUp(): void { diff --git a/tests/SP/Modules/Api/ApiTestCase.php b/tests/SP/Modules/Api/ApiTestCase.php index e5f806cc..92927e0d 100644 --- a/tests/SP/Modules/Api/ApiTestCase.php +++ b/tests/SP/Modules/Api/ApiTestCase.php @@ -24,27 +24,38 @@ namespace SP\Tests\Modules\Api; +use Defuse\Crypto\Exception\CryptoException; +use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use DI\ContainerBuilder; +use DI\DependencyException; +use DI\NotFoundException; +use Exception; +use JsonException; use Klein\Klein; use Klein\Request; use Klein\Response; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use RuntimeException; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Bootstrap\BootstrapApi; -use SP\Core\Context\ContextInterface; +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; 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\Infrastructure\Database\DatabaseConnectionData; use SP\Infrastructure\Database\DbStorageInterface; use SP\Infrastructure\Database\MysqlHandler; use SP\Tests\DatabaseTrait; use stdClass; + use function DI\create; + use const SP\Tests\APP_DEFINITIONS_FILE; define('APP_MODULE', 'api'); @@ -92,7 +103,7 @@ abstract class ApiTestCase extends TestCase protected static ?ConfigDataInterface $configData = null; /** - * @throws \JsonException + * @throws JsonException */ protected static function processJsonResponse( Response $response, @@ -120,9 +131,9 @@ abstract class ApiTestCase extends TestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \Exception + * @throws DependencyException + * @throws NotFoundException + * @throws Exception */ final protected function callApi(int $actionId, array $params): Response { @@ -206,11 +217,11 @@ abstract class ApiTestCase extends TestCase } /** - * @throws \SP\Core\Exceptions\QueryException - * @throws \SP\Core\Exceptions\ConstraintException - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \SP\Core\Exceptions\SPException + * @throws QueryException + * @throws ConstraintException + * @throws CryptoException + * @throws EnvironmentIsBrokenException + * @throws SPException */ private static function createApiToken( AuthTokenService $service, diff --git a/tests/SP/Modules/Api/Controllers/AccountControllerTest.php b/tests/SP/Modules/Api/Controllers/AccountControllerTest.php index 15641ad1..63c8db71 100644 --- a/tests/SP/Modules/Api/Controllers/AccountControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/AccountControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Modules\Api\Controllers\Account\AccountController; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -56,9 +59,9 @@ class AccountControllerTest extends ApiTestCase protected AccountController $controller; /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateAction(): void { @@ -100,9 +103,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ private function createAccount(?array $params = null): stdClass { @@ -115,9 +118,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionNoUserData(): void { @@ -152,9 +155,9 @@ class AccountControllerTest extends ApiTestCase /** * @dataProvider getUnsetParams * - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionRequiredParameters(string $unsetParam): void { @@ -172,9 +175,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewPassAction(): void { @@ -200,9 +203,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewPassActionRequiredParamater(): void { @@ -220,9 +223,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditPassAction(): void { @@ -264,9 +267,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditPassActionRequiredParameters(): void { @@ -290,9 +293,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewPassActionNonExistant(): void { @@ -308,9 +311,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewAction(): void { @@ -369,9 +372,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionNonExistant(): void { @@ -387,9 +390,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionRequiredParameter(): void { @@ -409,9 +412,9 @@ class AccountControllerTest extends ApiTestCase /** * @dataProvider searchProvider * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testSearchActionByFilter(array $filter, int $resultsCount): void { @@ -428,9 +431,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testEditAction(): void { @@ -521,9 +524,9 @@ class AccountControllerTest extends ApiTestCase /** * @dataProvider getUnsetParams * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testEditActionRequiredParameter(string $unsetParam): void { @@ -564,9 +567,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testEditActionNonExistant(): void { @@ -599,9 +602,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteAction(): void { @@ -623,9 +626,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionNonExistant(): void { @@ -641,9 +644,9 @@ class AccountControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionRequiredParameters(): void { diff --git a/tests/SP/Modules/Api/Controllers/CategoryControllerTest.php b/tests/SP/Modules/Api/Controllers/CategoryControllerTest.php index 33d344ed..d1db5e4c 100644 --- a/tests/SP/Modules/Api/Controllers/CategoryControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/CategoryControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -41,9 +44,9 @@ class CategoryControllerTest extends ApiTestCase ]; /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateAction(): void { @@ -63,9 +66,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ private function createCategory(?array $params = null): stdClass { @@ -78,9 +81,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionDuplicated(): void { @@ -91,9 +94,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionRequiredParameter(): void { @@ -110,9 +113,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewAction(): void { @@ -143,9 +146,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionNonExistant(): void { @@ -161,9 +164,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditAction(): void { @@ -209,9 +212,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionDuplicated(): void { @@ -236,9 +239,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionRequiredParameters(): void { @@ -265,9 +268,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionNonExistant(): void { @@ -291,9 +294,9 @@ class CategoryControllerTest extends ApiTestCase /** * @dataProvider searchProvider * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testSearchActionByFilter(array $filter, int $resultsCount): void { @@ -310,9 +313,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteAction(): void { @@ -334,9 +337,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionNonExistant(): void { @@ -352,9 +355,9 @@ class CategoryControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionRequiredParameters(): void { diff --git a/tests/SP/Modules/Api/Controllers/ClientControllerTest.php b/tests/SP/Modules/Api/Controllers/ClientControllerTest.php index 4de8d315..f10de519 100644 --- a/tests/SP/Modules/Api/Controllers/ClientControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/ClientControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -42,9 +45,9 @@ class ClientControllerTest extends ApiTestCase ]; /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateAction(): void { @@ -65,9 +68,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ private function createClient(?array $params = null): stdClass { @@ -80,9 +83,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionDuplicated(): void { @@ -93,9 +96,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionRequiredParameters(): void { @@ -112,9 +115,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewAction(): void { @@ -146,9 +149,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionNonExistant(): void { @@ -164,9 +167,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditAction(): void { @@ -214,9 +217,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionDuplicated(): void { @@ -241,9 +244,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionRequiredParameters(): void { @@ -270,9 +273,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionNonExistant(): void { @@ -297,9 +300,9 @@ class ClientControllerTest extends ApiTestCase /** * @dataProvider searchProvider * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testSearchActionByFilter(array $filter, int $resultsCount): void { @@ -316,9 +319,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteAction(): void { @@ -340,9 +343,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionNonExistant(): void { @@ -358,9 +361,9 @@ class ClientControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionRequiredParameters(): void { diff --git a/tests/SP/Modules/Api/Controllers/ConfigControllerTest.php b/tests/SP/Modules/Api/Controllers/ConfigControllerTest.php index 2d298cde..3ff0a265 100644 --- a/tests/SP/Modules/Api/Controllers/ConfigControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/ConfigControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -36,9 +39,9 @@ use stdClass; class ConfigControllerTest extends ApiTestCase { /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testExportAction(): void { @@ -58,9 +61,9 @@ class ConfigControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testExportActionCustomPath(): void { @@ -82,9 +85,9 @@ class ConfigControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testExportActionInvalidPath(): void { @@ -102,9 +105,9 @@ class ConfigControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testBackupAction(): void { @@ -126,9 +129,9 @@ class ConfigControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testBackupActionInvalidPath(): void { @@ -146,9 +149,9 @@ class ConfigControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testBackupActionCustomPath(): void { diff --git a/tests/SP/Modules/Api/Controllers/TagControllerTest.php b/tests/SP/Modules/Api/Controllers/TagControllerTest.php index 98822103..9d97ea68 100644 --- a/tests/SP/Modules/Api/Controllers/TagControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/TagControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -40,9 +43,9 @@ class TagControllerTest extends ApiTestCase ]; /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateAction(): void { @@ -61,9 +64,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ private function createTag(?array $params = null): stdClass { @@ -76,9 +79,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionDuplicated(): void { @@ -89,9 +92,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionRequiredParameters(): void { @@ -105,9 +108,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewAction(): void { @@ -132,9 +135,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionNonExistant(): void { @@ -150,9 +153,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditAction(): void { @@ -194,9 +197,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionDuplicated(): void { @@ -221,9 +224,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionWrongParameters(): void { @@ -250,9 +253,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionNonExistant(): void { @@ -275,9 +278,9 @@ class TagControllerTest extends ApiTestCase /** * @dataProvider searchProvider * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testSearchActionByFilter(array $filter, int $resultsCount): void { @@ -294,9 +297,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteAction(): void { @@ -318,9 +321,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionNonExistant(): void { @@ -336,9 +339,9 @@ class TagControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionRequiredParameters(): void { diff --git a/tests/SP/Modules/Api/Controllers/UserGroupControllerTest.php b/tests/SP/Modules/Api/Controllers/UserGroupControllerTest.php index 6be95a99..26ed364a 100644 --- a/tests/SP/Modules/Api/Controllers/UserGroupControllerTest.php +++ b/tests/SP/Modules/Api/Controllers/UserGroupControllerTest.php @@ -24,7 +24,10 @@ namespace SP\Tests\Modules\Api\Controllers; -use SP\Core\Acl\AclActionsInterface; +use DI\DependencyException; +use DI\NotFoundException; +use JsonException; +use SP\Domain\Core\Acl\AclActionsInterface; use SP\Tests\Modules\Api\ApiTestCase; use stdClass; @@ -42,9 +45,9 @@ class UserGroupControllerTest extends ApiTestCase ]; /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateAction(): void { @@ -66,9 +69,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ private function createUserGroup(?array $params = null): stdClass { @@ -81,9 +84,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionInvalidUser(): void { @@ -97,9 +100,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionRequiredParameters(): void { @@ -115,9 +118,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testCreateActionDuplicatedName(): void { @@ -131,9 +134,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewAction(): void { @@ -161,9 +164,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testViewActionNonExistant(): void { @@ -181,9 +184,9 @@ class UserGroupControllerTest extends ApiTestCase /** * @dataProvider getGroupUsers * - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditAction(array $users, int $usersCount): void { @@ -229,9 +232,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionInvalidUser(): void { @@ -258,9 +261,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionRequiredParameters(): void { @@ -287,9 +290,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testEditActionNonExistant(): void { @@ -312,9 +315,9 @@ class UserGroupControllerTest extends ApiTestCase /** * @dataProvider searchProvider * - * @throws \DI\DependencyException - * @throws \JsonException - * @throws \DI\NotFoundException + * @throws DependencyException + * @throws JsonException + * @throws NotFoundException */ public function testSearchActionByFilter(array $filter, int $resultsCount): void { @@ -331,9 +334,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteAction(): void { @@ -355,9 +358,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionNonExistant(): void { @@ -373,9 +376,9 @@ class UserGroupControllerTest extends ApiTestCase } /** - * @throws \DI\DependencyException - * @throws \DI\NotFoundException - * @throws \JsonException + * @throws DependencyException + * @throws NotFoundException + * @throws JsonException */ public function testDeleteActionRequiredParameters(): void { diff --git a/tests/SP/Modules/Cli/CliTestCase.php b/tests/SP/Modules/Cli/CliTestCase.php index 2eaca10e..b06ab579 100644 --- a/tests/SP/Modules/Cli/CliTestCase.php +++ b/tests/SP/Modules/Cli/CliTestCase.php @@ -30,10 +30,12 @@ use DI\NotFoundException; use Exception; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; -use SP\Core\Context\ContextInterface; +use SP\Domain\Core\Context\ContextInterface; use SP\Infrastructure\Database\DbStorageInterface; use Symfony\Component\Console\Tester\CommandTester; + use function SP\Tests\getDbHandler; + use const SP\Tests\APP_DEFINITIONS_FILE; define('APP_MODULE', 'cli'); diff --git a/tests/SP/Providers/Auth/Ldap/LdapActionsTest.php b/tests/SP/Providers/Auth/Ldap/LdapActionsTest.php index b2a8349b..2cd3e92f 100644 --- a/tests/SP/Providers/Auth/Ldap/LdapActionsTest.php +++ b/tests/SP/Providers/Auth/Ldap/LdapActionsTest.php @@ -29,7 +29,7 @@ use Laminas\Ldap\Ldap; use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; use SP\Core\Events\Event; -use SP\Core\Events\EventDispatcherInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Providers\Auth\Ldap\AttributeCollection; use SP\Providers\Auth\Ldap\LdapActions; use SP\Providers\Auth\Ldap\LdapCodeEnum; @@ -174,7 +174,7 @@ class LdapActionsTest extends UnitaryTestCase } /** - * @throws \SP\Providers\Auth\Ldap\LdapException + * @throws LdapException */ public function testGetAttributesError(): void { @@ -194,8 +194,8 @@ class LdapActionsTest extends UnitaryTestCase } /** - * @throws \SP\Providers\Auth\Ldap\LdapException - * @throws \PHPUnit\Framework\MockObject\Exception + * @throws LdapException + * @throws Exception */ public function testSearchGroupsDn(): void { @@ -228,8 +228,8 @@ class LdapActionsTest extends UnitaryTestCase } /** - * @throws \SP\Providers\Auth\Ldap\LdapException - * @throws \PHPUnit\Framework\MockObject\Exception + * @throws LdapException + * @throws Exception */ public function testSearchGroupsDnNoGroups(): void { @@ -260,7 +260,7 @@ class LdapActionsTest extends UnitaryTestCase } /** - * @throws \SP\Providers\Auth\Ldap\LdapException + * @throws LdapException */ public function testSearchGroupsDnError(): void { diff --git a/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php b/tests/SP/Providers/Auth/Ldap/LdapAuthTest.php index 223861e8..fae9ebaf 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\Events\EventDispatcherInterface; 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\Providers\Auth\Ldap\AttributeCollection; use SP\Providers\Auth\Ldap\LdapAuth; use SP\Providers\Auth\Ldap\LdapException; diff --git a/tests/SP/Providers/Auth/Ldap/LdapConnectionTest.php b/tests/SP/Providers/Auth/Ldap/LdapConnectionTest.php index 6d631e1d..8a1194f2 100644 --- a/tests/SP/Providers/Auth/Ldap/LdapConnectionTest.php +++ b/tests/SP/Providers/Auth/Ldap/LdapConnectionTest.php @@ -25,8 +25,10 @@ namespace SP\Tests\Providers\Auth\Ldap; use Laminas\Ldap\Ldap; +use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; -use SP\Core\Events\EventDispatcherInterface; +use SP\Core\Context\ContextException; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Providers\Auth\Ldap\LdapConnection; use SP\Providers\Auth\Ldap\LdapException; use SP\Providers\Auth\Ldap\LdapParams; @@ -176,8 +178,8 @@ class LdapConnectionTest extends UnitaryTestCase } /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws \SP\Core\Context\ContextException + * @throws Exception + * @throws ContextException * @throws LdapException */ protected function setUp(): void diff --git a/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php b/tests/SP/Providers/Auth/Ldap/LdapMsAdsTest.php index 386d11ee..f06c11c9 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\Events\EventDispatcherInterface; 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\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 a9d1c0ec..964e16d8 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\Events\EventDispatcherInterface; 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\Providers\Auth\Ldap\LdapException; use SP\Providers\Auth\Ldap\LdapParams; use SP\Providers\Auth\Ldap\LdapStd; diff --git a/tests/SP/Repositories/AuthTokenRepositoryTest.php b/tests/SP/Repositories/AuthTokenRepositoryTest.php index c116897b..d0e3ddc4 100644 --- a/tests/SP/Repositories/AuthTokenRepositoryTest.php +++ b/tests/SP/Repositories/AuthTokenRepositoryTest.php @@ -28,22 +28,23 @@ use Defuse\Crypto\Exception\CryptoException; use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Context\ContextException; use SP\Core\Crypt\Hash; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; 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\Infrastructure\Auth\Repositories\AuthTokenRepository; use SP\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Tests\DatabaseTestCase; use SP\Util\PasswordUtil; use SP\Util\Util; use stdClass; + use function SP\Tests\setupContext; /** @@ -53,11 +54,11 @@ use function SP\Tests\setupContext; */ class AuthTokenRepositoryTest extends DatabaseTestCase { - const AUTH_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; - const AUTH_TOKEN_PASS = 123456; + public const AUTH_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; + public const AUTH_TOKEN_PASS = 123456; /** - * @var \SP\Infrastructure\Auth\Repositories\AuthTokenRepository + * @var AuthTokenRepository */ private static $repository; diff --git a/tests/SP/Repositories/CustomFieldDefRepositoryTest.php b/tests/SP/Repositories/CustomFieldDefRepositoryTest.php index 07eca3ba..cd12410a 100644 --- a/tests/SP/Repositories/CustomFieldDefRepositoryTest.php +++ b/tests/SP/Repositories/CustomFieldDefRepositoryTest.php @@ -26,17 +26,18 @@ namespace SP\Tests\Repositories; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldDefRepositoryInterface; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\CustomField\Repositories\CustomFieldDefRepository; use SP\Tests\DatabaseTestCase; + use function SP\Tests\setupContext; /** diff --git a/tests/SP/Repositories/CustomFieldRepositoryTest.php b/tests/SP/Repositories/CustomFieldRepositoryTest.php index 33a4a72d..d763a98b 100644 --- a/tests/SP/Repositories/CustomFieldRepositoryTest.php +++ b/tests/SP/Repositories/CustomFieldRepositoryTest.php @@ -26,14 +26,15 @@ namespace SP\Tests\Repositories; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Ports\CustomFieldRepositoryInterface; use SP\Infrastructure\CustomField\Repositories\CustomFieldRepository; 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 0f679ce9..ba144ea5 100644 --- a/tests/SP/Services/Api/ApiServiceTest.php +++ b/tests/SP/Services/Api/ApiServiceTest.php @@ -27,14 +27,15 @@ namespace SP\Tests\Services\Api; use Closure; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; 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\Tests\DatabaseTestCase; + use function SP\Tests\getResource; use function SP\Tests\setupContext; @@ -45,12 +46,12 @@ use function SP\Tests\setupContext; */ class ApiServiceTest extends DatabaseTestCase { - const ADMIN_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; - const ADMIN_PASS = '123456'; - const DEMO_TOKEN = '12b9027d24efff7bfbaca8bd774a4c34b45de35e033d2b192a88f4dfaee5c233'; + public const ADMIN_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; + public const ADMIN_PASS = '123456'; + public const DEMO_TOKEN = '12b9027d24efff7bfbaca8bd774a4c34b45de35e033d2b192a88f4dfaee5c233'; /** - * @var \SP\Domain\Api\Ports\ApiServiceInterface + * @var ApiServiceInterface */ private static $service; /** @@ -78,7 +79,7 @@ class ApiServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException * @throws SPException */ public function testSetup() @@ -133,7 +134,7 @@ class ApiServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException * @throws SPException */ public function testGetParamInt() @@ -169,7 +170,7 @@ class ApiServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException * @throws SPException */ public function testGetParamRaw() @@ -195,7 +196,7 @@ class ApiServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetMasterPass() { diff --git a/tests/SP/Services/AuthToken/AuthTokenServiceTest.php b/tests/SP/Services/AuthToken/AuthTokenServiceTest.php index 765ecc30..a200a9ef 100644 --- a/tests/SP/Services/AuthToken/AuthTokenServiceTest.php +++ b/tests/SP/Services/AuthToken/AuthTokenServiceTest.php @@ -29,11 +29,9 @@ use Defuse\Crypto\Exception\EnvironmentIsBrokenException; use DI\DependencyException; use DI\NotFoundException; use Exception; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Context\ContextException; use SP\Core\Crypt\Hash; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Core\Exceptions\SPException; @@ -41,11 +39,14 @@ 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\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Tests\DatabaseTestCase; use SP\Util\Util; use stdClass; + use function SP\Tests\setupContext; /** @@ -55,8 +56,8 @@ use function SP\Tests\setupContext; */ class AuthTokenServiceTest extends DatabaseTestCase { - const AUTH_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; - const AUTH_TOKEN_PASS = 123456; + public const AUTH_TOKEN = '2cee8b224f48e01ef48ac172e879cc7825800a9d7ce3b23783212f4758f1c146'; + public const AUTH_TOKEN_PASS = 123456; /** * @var AuthTokenService @@ -142,7 +143,7 @@ class AuthTokenServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException * @throws CryptoException * @throws ConstraintException * @throws QueryException diff --git a/tests/SP/Services/Client/ClientServiceTest.php b/tests/SP/Services/Client/ClientServiceTest.php index edda8433..03846344 100644 --- a/tests/SP/Services/Client/ClientServiceTest.php +++ b/tests/SP/Services/Client/ClientServiceTest.php @@ -28,18 +28,20 @@ use Closure; use DI\DependencyException; use DI\NotFoundException; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; 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\User\Services\UserLoginResponse; use SP\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Tests\DatabaseTestCase; + use function SP\Tests\setupContext; /** @@ -54,7 +56,7 @@ class ClientServiceTest extends DatabaseTestCase */ private static $setupUser; /** - * @var \SP\Domain\Client\Ports\ClientServiceInterface + * @var ClientServiceInterface */ private static $service; diff --git a/tests/SP/Services/Crypt/TemporaryMasterPassServiceTest.php b/tests/SP/Services/Crypt/TemporaryMasterPassServiceTest.php index e78c29b1..d92b17b2 100644 --- a/tests/SP/Services/Crypt/TemporaryMasterPassServiceTest.php +++ b/tests/SP/Services/Crypt/TemporaryMasterPassServiceTest.php @@ -29,9 +29,12 @@ use DI\DependencyException; use DI\NotFoundException; use PHPUnit\Framework\TestCase; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; +use SP\Domain\Common\Services\ServiceException; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Crypt\Ports\TemporaryMasterPassServiceInterface; use SP\Domain\Crypt\Services\TemporaryMasterPassService; use SP\Infrastructure\Common\Repositories\NoSuchItemException; + use function SP\Tests\setupContext; /** @@ -46,7 +49,7 @@ class TemporaryMasterPassServiceTest extends TestCase */ private $context; /** - * @var \SP\Domain\Crypt\Ports\TemporaryMasterPassServiceInterface + * @var TemporaryMasterPassServiceInterface */ private $service; @@ -66,7 +69,7 @@ class TemporaryMasterPassServiceTest extends TestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testCreate() { @@ -85,7 +88,7 @@ class TemporaryMasterPassServiceTest extends TestCase * * @throws CryptoException * @throws NoSuchItemException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testGetUsingKey($key) { @@ -101,7 +104,7 @@ class TemporaryMasterPassServiceTest extends TestCase * * @param $key * - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testCheckTempMasterPass($key) { @@ -116,7 +119,7 @@ class TemporaryMasterPassServiceTest extends TestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testExpiredKey() { diff --git a/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php b/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php index b9cec013..680edd99 100644 --- a/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php +++ b/tests/SP/Services/CustomField/CustomFieldDefServiceTest.php @@ -26,16 +26,17 @@ namespace SP\Tests\Services\CustomField; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; 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\CustomField\Services\CustomFieldDefService; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Tests\DatabaseTestCase; + use function SP\Tests\setupContext; /** @@ -66,7 +67,7 @@ class CustomFieldDefServiceTest extends DatabaseTestCase } /** - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testDelete() { @@ -192,7 +193,7 @@ class CustomFieldDefServiceTest extends DatabaseTestCase * @throws ConstraintException * @throws NoSuchItemException * @throws QueryException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdate() { diff --git a/tests/SP/Services/CustomField/CustomFieldServiceTest.php b/tests/SP/Services/CustomField/CustomFieldServiceTest.php index 3941e3a7..ed942283 100644 --- a/tests/SP/Services/CustomField/CustomFieldServiceTest.php +++ b/tests/SP/Services/CustomField/CustomFieldServiceTest.php @@ -27,7 +27,6 @@ namespace SP\Tests\Services\CustomField; use Defuse\Crypto\Exception\CryptoException; use DI\DependencyException; use DI\NotFoundException; -use SP\Core\Acl\AclActionsInterface; use SP\Core\Context\ContextException; use SP\Core\Crypt\Crypt; use SP\Core\Exceptions\ConstraintException; @@ -35,10 +34,13 @@ 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\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,7 +51,7 @@ use function SP\Tests\setupContext; class CustomFieldServiceTest extends DatabaseTestCase { /** - * @var \SP\Domain\CustomField\Ports\CustomFieldServiceInterface + * @var CustomFieldServiceInterface */ private static $service; @@ -85,7 +87,7 @@ class CustomFieldServiceTest extends DatabaseTestCase * @throws CryptoException * @throws ConstraintException * @throws QueryException - * @throws \SP\Domain\Common\Services\ServiceException + * @throws ServiceException */ public function testUpdateMasterPass() { diff --git a/tests/SP/Services/Notification/NotificationServiceTest.php b/tests/SP/Services/Notification/NotificationServiceTest.php index 7cc43d3f..c268be3b 100644 --- a/tests/SP/Services/Notification/NotificationServiceTest.php +++ b/tests/SP/Services/Notification/NotificationServiceTest.php @@ -27,17 +27,19 @@ namespace SP\Tests\Services\Notification; use DI\DependencyException; use DI\NotFoundException; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; 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\Notification\Ports\NotificationServiceInterface; use SP\Domain\Notification\Services\NotificationService; use SP\Domain\User\Services\UserLoginResponse; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Tests\DatabaseTestCase; + use function SP\Tests\setupContext; /** @@ -52,7 +54,7 @@ class NotificationServiceTest extends DatabaseTestCase */ private static $context; /** - * @var \SP\Domain\Notification\Ports\NotificationServiceInterface + * @var NotificationServiceInterface */ private static $service; diff --git a/tests/SP/Services/PublicLink/PublicLinkServiceTest.php b/tests/SP/Services/PublicLink/PublicLinkServiceTest.php index 36445ce4..99d41e31 100644 --- a/tests/SP/Services/PublicLink/PublicLinkServiceTest.php +++ b/tests/SP/Services/PublicLink/PublicLinkServiceTest.php @@ -30,7 +30,6 @@ use DI\DependencyException; use DI\NotFoundException; use SP\Core\Context\ContextException; use SP\Core\Crypt\Vault; -use SP\Core\Crypt\VaultInterface; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Core\Exceptions\SPException; @@ -42,11 +41,13 @@ use SP\Domain\Account\Ports\PublicLinkServiceInterface; 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\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Tests\DatabaseTestCase; use SP\Util\PasswordUtil; use SP\Util\Util; + use function SP\Tests\setupContext; /** diff --git a/tests/SP/UnitaryTestCase.php b/tests/SP/UnitaryTestCase.php index 85e1401e..1872bfac 100644 --- a/tests/SP/UnitaryTestCase.php +++ b/tests/SP/UnitaryTestCase.php @@ -30,11 +30,11 @@ use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\TestCase; use SP\Core\Application; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; use SP\Core\Context\StatelessContext; -use SP\Core\Events\EventDispatcherInterface; use SP\DataModel\ProfileData; use SP\Domain\Config\Ports\ConfigInterface; +use SP\Domain\Core\Context\ContextInterface; +use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Domain\User\Services\UserLoginResponse; use SP\Tests\Generators\ConfigDataGenerator; diff --git a/tests/SP/bootstrap.php b/tests/SP/bootstrap.php index c3fc6590..6d051e78 100644 --- a/tests/SP/bootstrap.php +++ b/tests/SP/bootstrap.php @@ -29,14 +29,15 @@ use DI\ContainerBuilder; use Exception; use RuntimeException; use SP\Core\Context\ContextException; -use SP\Core\Context\ContextInterface; use SP\Core\Exceptions\FileNotFoundException; use SP\DataModel\ProfileData; +use SP\Domain\Core\Context\ContextInterface; use SP\Domain\User\Services\UserLoginResponse; use SP\Infrastructure\Database\DatabaseConnectionData; use SP\Infrastructure\Database\DbStorageInterface; use SP\Infrastructure\Database\MysqlHandler; use SP\Util\FileUtil; + use function SP\logger; use function SP\processException; @@ -165,7 +166,7 @@ function saveResource(string $dir, string $file, string $data): bool|int } /** - * @throws \SP\Core\Exceptions\FileNotFoundException + * @throws FileNotFoundException */ function recreateDir(string $dir): void {