From 10827cf56c7ed75bd6138fef4fb7731eabb33a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D?= Date: Mon, 6 Jun 2022 08:30:53 +0200 Subject: [PATCH] refactor: [WIP] Optimize code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rubén D --- .../Client/In/ClientRepositoryInterface.php | 4 - .../Domain/Client/Services/ClientService.php | 2 +- .../Domain/Common/In/RepositoryInterface.php | 18 +- .../Domain/Config/In/ConfigDataInterface.php | 190 +++++++++--------- lib/SP/Domain/Config/Services/ConfigUtil.php | 3 +- .../Export/FileBackupServiceInterface.php | 2 - lib/SP/Domain/Install/Services/Installer.php | 6 +- .../In/NotificationRepositoryInterface.php | 1 - .../Notification/MailServiceInterface.php | 1 - .../Plugin/In/PluginRepositoryInterface.php | 3 - .../Domain/Security/Services/TrackService.php | 7 +- .../Domain/User/Services/UserGroupService.php | 4 +- lib/SP/Domain/User/Services/UserService.php | 2 +- 13 files changed, 118 insertions(+), 125 deletions(-) diff --git a/lib/SP/Domain/Client/In/ClientRepositoryInterface.php b/lib/SP/Domain/Client/In/ClientRepositoryInterface.php index d74b2fea..879a8a58 100644 --- a/lib/SP/Domain/Client/In/ClientRepositoryInterface.php +++ b/lib/SP/Domain/Client/In/ClientRepositoryInterface.php @@ -27,11 +27,7 @@ namespace SP\Domain\Client\In; 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\Common\In\RepositoryInterface; -use SP\Infrastructure\Common\Repositories\DuplicatedItemException; use SP\Infrastructure\Database\QueryResult; use SP\Mvc\Model\QueryCondition; diff --git a/lib/SP/Domain/Client/Services/ClientService.php b/lib/SP/Domain/Client/Services/ClientService.php index ff850029..5d63c011 100644 --- a/lib/SP/Domain/Client/Services/ClientService.php +++ b/lib/SP/Domain/Client/Services/ClientService.php @@ -50,7 +50,7 @@ final class ClientService extends Service implements ClientServiceInterface { use ServiceItemTrait; - private ClientRepository $clientRepository; + private ClientRepository $clientRepository; private AccountFilterUser $accountFilterUser; public function __construct( diff --git a/lib/SP/Domain/Common/In/RepositoryInterface.php b/lib/SP/Domain/Common/In/RepositoryInterface.php index ce6d3aca..6f406175 100644 --- a/lib/SP/Domain/Common/In/RepositoryInterface.php +++ b/lib/SP/Domain/Common/In/RepositoryInterface.php @@ -37,7 +37,7 @@ interface RepositoryInterface /** * Creates an item * - * @param mixed $itemData + * @param mixed $itemData * * @return mixed */ @@ -46,7 +46,7 @@ interface RepositoryInterface /** * Updates an item * - * @param mixed $itemData + * @param mixed $itemData * * @return mixed */ @@ -55,14 +55,14 @@ interface RepositoryInterface /** * Deletes an item * - * @param int $id + * @param int $id */ public function delete(int $id); /** * Returns the item for given id * - * @param int $id + * @param int $id * * @return mixed */ @@ -76,7 +76,7 @@ interface RepositoryInterface /** * Returns all the items for given ids * - * @param array $ids + * @param array $ids * * @return QueryResult */ @@ -85,7 +85,7 @@ interface RepositoryInterface /** * Deletes all the items for given ids * - * @param array $ids + * @param array $ids * * @return int */ @@ -103,7 +103,7 @@ interface RepositoryInterface /** * Checks whether the item is duplicated on updating * - * @param mixed $itemData + * @param mixed $itemData * * @return bool */ @@ -112,7 +112,7 @@ interface RepositoryInterface /** * Checks whether the item is duplicated on adding * - * @param mixed $itemData + * @param mixed $itemData * * @return bool */ @@ -121,7 +121,7 @@ interface RepositoryInterface /** * Searches for items by a given filter * - * @param ItemSearchData $itemSearchData + * @param ItemSearchData $itemSearchData * * @return mixed */ diff --git a/lib/SP/Domain/Config/In/ConfigDataInterface.php b/lib/SP/Domain/Config/In/ConfigDataInterface.php index 7d0c72b5..7913d8c9 100644 --- a/lib/SP/Domain/Config/In/ConfigDataInterface.php +++ b/lib/SP/Domain/Config/In/ConfigDataInterface.php @@ -4,7 +4,7 @@ * * @author nuxsmin * @link https://syspass.org - * @copyright 2012-2021, Rubén Domínguez nuxsmin@$syspass.org + * @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org * * This file is part of sysPass. * @@ -43,7 +43,7 @@ interface ConfigDataInterface public function getLogEvents(): array; /** - * @param array|null $logEvents + * @param array|null $logEvents * * @return ConfigDataInterface */ @@ -55,7 +55,7 @@ interface ConfigDataInterface public function isDokuwikiEnabled(): bool; /** - * @param bool|null $dokuwikiEnabled + * @param bool|null $dokuwikiEnabled * * @return $this */ @@ -67,7 +67,7 @@ interface ConfigDataInterface public function getDokuwikiUrl(): ?string; /** - * @param string|null $dokuwikiUrl + * @param string|null $dokuwikiUrl * * @return $this */ @@ -79,7 +79,7 @@ interface ConfigDataInterface public function getDokuwikiUrlBase(): ?string; /** - * @param string|null $dokuwikiUrlBase + * @param string|null $dokuwikiUrlBase * * @return $this */ @@ -91,7 +91,7 @@ interface ConfigDataInterface public function getDokuwikiUser(): ?string; /** - * @param string|null $dokuwikiUser + * @param string|null $dokuwikiUser * * @return $this */ @@ -103,7 +103,7 @@ interface ConfigDataInterface public function getDokuwikiPass(): ?string; /** - * @param string|null $dokuwikiPass + * @param string|null $dokuwikiPass * * @return $this */ @@ -115,7 +115,7 @@ interface ConfigDataInterface public function getDokuwikiNamespace(): ?string; /** - * @param string|null $dokuwikiNamespace + * @param string|null $dokuwikiNamespace * * @return $this */ @@ -127,7 +127,7 @@ interface ConfigDataInterface public function getLdapDefaultGroup(): int; /** - * @param int|null $ldapDefaultGroup + * @param int|null $ldapDefaultGroup * * @return $this */ @@ -139,7 +139,7 @@ interface ConfigDataInterface public function getLdapDefaultProfile(): int; /** - * @param int|null $ldapDefaultProfile + * @param int|null $ldapDefaultProfile * * @return $this */ @@ -151,7 +151,7 @@ interface ConfigDataInterface public function isProxyEnabled(): bool; /** - * @param boolean|null $proxyEnabled + * @param boolean|null $proxyEnabled * * @return $this */ @@ -163,7 +163,7 @@ interface ConfigDataInterface public function getProxyServer(): ?string; /** - * @param string|null $proxyServer + * @param string|null $proxyServer * * @return $this */ @@ -175,7 +175,7 @@ interface ConfigDataInterface public function getProxyPort(): int; /** - * @param int|null $proxyPort + * @param int|null $proxyPort * * @return $this */ @@ -187,7 +187,7 @@ interface ConfigDataInterface public function getProxyUser(): ?string; /** - * @param string|null $proxyUser + * @param string|null $proxyUser * * @return $this */ @@ -199,7 +199,7 @@ interface ConfigDataInterface public function getProxyPass(): ?string; /** - * @param string|null $proxyPass + * @param string|null $proxyPass * * @return $this */ @@ -211,7 +211,7 @@ interface ConfigDataInterface public function getPublinksMaxViews(): int; /** - * @param int|null $publinksMaxViews + * @param int|null $publinksMaxViews * * @return $this */ @@ -223,7 +223,7 @@ interface ConfigDataInterface public function getPublinksMaxTime(): int; /** - * @param int|null $publinksMaxTime + * @param int|null $publinksMaxTime * * @return $this */ @@ -235,7 +235,7 @@ interface ConfigDataInterface public function isSyslogEnabled(): bool; /** - * @param boolean|null $syslogEnabled + * @param boolean|null $syslogEnabled * * @return $this */ @@ -247,7 +247,7 @@ interface ConfigDataInterface public function isSyslogRemoteEnabled(): bool; /** - * @param boolean|null $syslogRemoteEnabled + * @param boolean|null $syslogRemoteEnabled * * @return $this */ @@ -259,7 +259,7 @@ interface ConfigDataInterface public function getSyslogServer(): ?string; /** - * @param string|null $syslogServer + * @param string|null $syslogServer * * @return $this */ @@ -271,7 +271,7 @@ interface ConfigDataInterface public function getSyslogPort(): int; /** - * @param int|null $syslogPort + * @param int|null $syslogPort * * @return $this */ @@ -283,7 +283,7 @@ interface ConfigDataInterface public function getBackupHash(): ?string; /** - * @param string|null $backup_hash + * @param string|null $backup_hash * * @return $this */ @@ -295,7 +295,7 @@ interface ConfigDataInterface public function getExportHash(): ?string; /** - * @param string|null $export_hash + * @param string|null $export_hash * * @return $this */ @@ -307,7 +307,7 @@ interface ConfigDataInterface public function getLdapBindUser(): ?string; /** - * @param string|null $ldapBindUser + * @param string|null $ldapBindUser * * @return $this */ @@ -319,7 +319,7 @@ interface ConfigDataInterface public function getAccountCount(): int; /** - * @param int|null $accountCount + * @param int|null $accountCount * * @return $this */ @@ -331,7 +331,7 @@ interface ConfigDataInterface public function isAccountLink(): bool; /** - * @param bool|null $accountLink + * @param bool|null $accountLink * * @return $this */ @@ -343,7 +343,7 @@ interface ConfigDataInterface public function isCheckUpdates(): bool; /** - * @param bool|null $checkUpdates + * @param bool|null $checkUpdates * * @return $this */ @@ -365,7 +365,7 @@ interface ConfigDataInterface public function getDbHost(): ?string; /** - * @param string|null $dbHost + * @param string|null $dbHost * * @return $this */ @@ -377,7 +377,7 @@ interface ConfigDataInterface public function getDbName(): ?string; /** - * @param string|null $dbName + * @param string|null $dbName * * @return $this */ @@ -389,7 +389,7 @@ interface ConfigDataInterface public function getDbPass(): ?string; /** - * @param string|null $dbPass + * @param string|null $dbPass * * @return $this */ @@ -401,7 +401,7 @@ interface ConfigDataInterface public function getDbUser(): ?string; /** - * @param string|null $dbUser + * @param string|null $dbUser * * @return $this */ @@ -413,7 +413,7 @@ interface ConfigDataInterface public function isDebug(): bool; /** - * @param bool|null $debug + * @param bool|null $debug * * @return $this */ @@ -425,7 +425,7 @@ interface ConfigDataInterface public function isDemoEnabled(): bool; /** - * @param bool|null $demoEnabled + * @param bool|null $demoEnabled * * @return $this */ @@ -442,7 +442,7 @@ interface ConfigDataInterface public function getFilesAllowedSize(): int; /** - * @param int|null $filesAllowedSize + * @param int|null $filesAllowedSize * * @return $this */ @@ -454,7 +454,7 @@ interface ConfigDataInterface public function isFilesEnabled(): bool; /** - * @param bool|null $filesEnabled + * @param bool|null $filesEnabled * * @return $this */ @@ -466,7 +466,7 @@ interface ConfigDataInterface public function isGlobalSearch(): bool; /** - * @param bool|null $globalSearch + * @param bool|null $globalSearch * * @return $this */ @@ -478,7 +478,7 @@ interface ConfigDataInterface public function isInstalled(): bool; /** - * @param bool|null $installed + * @param bool|null $installed * * @return $this */ @@ -490,7 +490,7 @@ interface ConfigDataInterface public function getLdapBase(): ?string; /** - * @param string|null $ldapBase + * @param string|null $ldapBase * * @return $this */ @@ -502,7 +502,7 @@ interface ConfigDataInterface public function isLdapEnabled(): bool; /** - * @param bool|null $ldapEnabled + * @param bool|null $ldapEnabled * * @return $this */ @@ -514,7 +514,7 @@ interface ConfigDataInterface public function getLdapGroup(): ?string; /** - * @param string|null $ldapGroup + * @param string|null $ldapGroup * * @return $this */ @@ -526,7 +526,7 @@ interface ConfigDataInterface public function getLdapServer(): ?string; /** - * @param string|null $ldapServer + * @param string|null $ldapServer * * @return $this */ @@ -538,7 +538,7 @@ interface ConfigDataInterface public function isLogEnabled(): bool; /** - * @param bool|null $logEnabled + * @param bool|null $logEnabled * * @return $this */ @@ -550,7 +550,7 @@ interface ConfigDataInterface public function isMailAuthenabled(): bool; /** - * @param bool|null $mailAuthenabled + * @param bool|null $mailAuthenabled * * @return $this */ @@ -562,7 +562,7 @@ interface ConfigDataInterface public function isMailEnabled(): bool; /** - * @param bool|null $mailEnabled + * @param bool|null $mailEnabled * * @return $this */ @@ -574,7 +574,7 @@ interface ConfigDataInterface public function getMailFrom(): ?string; /** - * @param string|null $mailFrom + * @param string|null $mailFrom * * @return $this */ @@ -586,7 +586,7 @@ interface ConfigDataInterface public function getMailPass(): ?string; /** - * @param string|null $mailPass + * @param string|null $mailPass * * @return $this */ @@ -598,7 +598,7 @@ interface ConfigDataInterface public function getMailPort(): int; /** - * @param int|null $mailPort + * @param int|null $mailPort * * @return $this */ @@ -610,7 +610,7 @@ interface ConfigDataInterface public function isMailRequestsEnabled(): bool; /** - * @param bool|null $mailRequestsEnabled + * @param bool|null $mailRequestsEnabled * * @return $this */ @@ -622,7 +622,7 @@ interface ConfigDataInterface public function getMailSecurity(): ?string; /** - * @param string|null $mailSecurity + * @param string|null $mailSecurity * * @return $this */ @@ -634,7 +634,7 @@ interface ConfigDataInterface public function getMailServer(): ?string; /** - * @param string|null $mailServer + * @param string|null $mailServer * * @return $this */ @@ -646,7 +646,7 @@ interface ConfigDataInterface public function getMailUser(): ?string; /** - * @param string|null $mailUser + * @param string|null $mailUser * * @return $this */ @@ -658,7 +658,7 @@ interface ConfigDataInterface public function isMaintenance(): bool; /** - * @param bool|null $maintenance + * @param bool|null $maintenance * * @return $this */ @@ -670,7 +670,7 @@ interface ConfigDataInterface public function getPasswordSalt(): ?string; /** - * @param string|null $passwordSalt + * @param string|null $passwordSalt * * @return $this */ @@ -682,7 +682,7 @@ interface ConfigDataInterface public function isResultsAsCards(): bool; /** - * @param bool|null $resultsAsCards + * @param bool|null $resultsAsCards * * @return $this */ @@ -694,7 +694,7 @@ interface ConfigDataInterface public function getSessionTimeout(): int; /** - * @param int|null $sessionTimeout + * @param int|null $sessionTimeout * * @return $this */ @@ -706,7 +706,7 @@ interface ConfigDataInterface public function getSiteLang(): ?string; /** - * @param string|null $siteLang + * @param string|null $siteLang * * @return $this */ @@ -718,7 +718,7 @@ interface ConfigDataInterface public function getSiteTheme(): string; /** - * @param string|null $siteTheme + * @param string|null $siteTheme * * @return $this */ @@ -730,7 +730,7 @@ interface ConfigDataInterface public function getConfigVersion(): ?string; /** - * @param string|null $configVersion + * @param string|null $configVersion * * @return $this */ @@ -742,7 +742,7 @@ interface ConfigDataInterface public function isWikiEnabled(): bool; /** - * @param bool|null $wikiEnabled + * @param bool|null $wikiEnabled * * @return $this */ @@ -754,7 +754,7 @@ interface ConfigDataInterface public function getWikiFilter(): array; /** - * @param array|null $wikiFilter + * @param array|null $wikiFilter * * @return $this */ @@ -766,7 +766,7 @@ interface ConfigDataInterface public function getWikiPageurl(): ?string; /** - * @param string|null $wikiPageurl + * @param string|null $wikiPageurl * * @return $this */ @@ -778,7 +778,7 @@ interface ConfigDataInterface public function getWikiSearchurl(): ?string; /** - * @param string|null $wikiSearchurl + * @param string|null $wikiSearchurl * * @return $this */ @@ -790,7 +790,7 @@ interface ConfigDataInterface public function getLdapBindPass(): ?string; /** - * @param string|null $ldapBindPass + * @param string|null $ldapBindPass * * @return $this */ @@ -802,7 +802,7 @@ interface ConfigDataInterface public function isPublinksImageEnabled(): bool; /** - * @param bool|null $publinksImageEnabled + * @param bool|null $publinksImageEnabled * * @return $this */ @@ -814,7 +814,7 @@ interface ConfigDataInterface public function isHttpsEnabled(): bool; /** - * @param bool|null $httpsEnabled + * @param bool|null $httpsEnabled * * @return $this */ @@ -826,7 +826,7 @@ interface ConfigDataInterface public function isCheckNotices(): bool; /** - * @param bool|null $checknotices + * @param bool|null $checknotices * * @return $this */ @@ -838,7 +838,7 @@ interface ConfigDataInterface public function isAccountPassToImage(): bool; /** - * @param bool|null $accountPassToImage + * @param bool|null $accountPassToImage * * @return $this */ @@ -850,7 +850,7 @@ interface ConfigDataInterface public function getUpgradeKey(): ?string; /** - * @param string|null $upgradeKey + * @param string|null $upgradeKey * * @return $this */ @@ -862,7 +862,7 @@ interface ConfigDataInterface public function getDbPort(): int; /** - * @param int|null $dbPort + * @param int|null $dbPort * * @return $this */ @@ -874,7 +874,7 @@ interface ConfigDataInterface public function isPublinksEnabled(): bool; /** - * @param bool|null $publinksEnabled + * @param bool|null $publinksEnabled * * @return $this */ @@ -896,7 +896,7 @@ interface ConfigDataInterface public function getConfigSaver(): ?string; /** - * @param string|null $configSaver + * @param string|null $configSaver * * @return $this */ @@ -908,7 +908,7 @@ interface ConfigDataInterface public function getDbSocket(): ?string; /** - * @param string|null $dbSocket + * @param string|null $dbSocket * * @return ConfigDataInterface */ @@ -920,7 +920,7 @@ interface ConfigDataInterface public function isEncryptSession(): bool; /** - * @param bool|null $encryptSession + * @param bool|null $encryptSession * * @return $this */ @@ -932,7 +932,7 @@ interface ConfigDataInterface public function isAccountFullGroupAccess(): bool; /** - * @param bool|null $accountFullGroupAccess + * @param bool|null $accountFullGroupAccess * * @return $this */ @@ -944,7 +944,7 @@ interface ConfigDataInterface public function isAuthBasicEnabled(): bool; /** - * @param bool|null $authBasicEnabled + * @param bool|null $authBasicEnabled */ public function setAuthBasicEnabled(?bool $authBasicEnabled); @@ -954,7 +954,7 @@ interface ConfigDataInterface public function getAuthBasicDomain(): ?string; /** - * @param string|null $authBasicDomain + * @param string|null $authBasicDomain * * @return ConfigDataInterface */ @@ -966,7 +966,7 @@ interface ConfigDataInterface public function isAuthBasicAutoLoginEnabled(): bool; /** - * @param bool|null $authBasicAutoLoginEnabled + * @param bool|null $authBasicAutoLoginEnabled * * @return ConfigDataInterface */ @@ -978,7 +978,7 @@ interface ConfigDataInterface public function getSsoDefaultGroup(): ?int; /** - * @param int|null $ssoDefaultGroup + * @param int|null $ssoDefaultGroup * * @return ConfigDataInterface */ @@ -990,7 +990,7 @@ interface ConfigDataInterface public function getSsoDefaultProfile(): ?int; /** - * @param int|null $ssoDefaultProfile + * @param int|null $ssoDefaultProfile * * @return ConfigDataInterface */ @@ -1002,7 +1002,7 @@ interface ConfigDataInterface public function getMailRecipients(): ?array; /** - * @param array|null $mailRecipients + * @param array|null $mailRecipients * * @return ConfigDataInterface */ @@ -1014,7 +1014,7 @@ interface ConfigDataInterface public function getMailEvents(): ?array; /** - * @param array|null $mailEvents + * @param array|null $mailEvents * * @return ConfigDataInterface */ @@ -1026,7 +1026,7 @@ interface ConfigDataInterface public function getDatabaseVersion(): string; /** - * @param string|null $databaseVersion + * @param string|null $databaseVersion * * @return ConfigDataInterface */ @@ -1038,7 +1038,7 @@ interface ConfigDataInterface public function getConfigDate(): int; /** - * @param int $configDate + * @param int $configDate * * @return $this */ @@ -1050,7 +1050,7 @@ interface ConfigDataInterface public function isAccountExpireEnabled(): bool; /** - * @param bool|null $accountExpireEnabled + * @param bool|null $accountExpireEnabled * * @return ConfigDataInterface */ @@ -1062,7 +1062,7 @@ interface ConfigDataInterface public function getAccountExpireTime(): int; /** - * @param int|null $accountExpireTime + * @param int|null $accountExpireTime * * @return ConfigDataInterface */ @@ -1074,7 +1074,7 @@ interface ConfigDataInterface public function isLdapTlsEnabled(): bool; /** - * @param bool|null $ldapTlsEnabled + * @param bool|null $ldapTlsEnabled * * @return ConfigDataInterface */ @@ -1086,7 +1086,7 @@ interface ConfigDataInterface public function getFilesAllowedMime(): array; /** - * @param array|null $filesAllowedMime + * @param array|null $filesAllowedMime * * @return ConfigDataInterface */ @@ -1098,7 +1098,7 @@ interface ConfigDataInterface public function getLdapType(): int; /** - * @param int|null $ldapType + * @param int|null $ldapType * * @return ConfigDataInterface */ @@ -1110,7 +1110,7 @@ interface ConfigDataInterface public function getAppVersion(): string; /** - * @param string|null $appVersion + * @param string|null $appVersion * * @return ConfigDataInterface */ @@ -1122,7 +1122,7 @@ interface ConfigDataInterface public function getApplicationUrl(): ?string; /** - * @param string|null $applicationUrl + * @param string|null $applicationUrl * * @return ConfigDataInterface */ @@ -1134,7 +1134,7 @@ interface ConfigDataInterface public function getLdapFilterUserObject(): ?string; /** - * @param string|null $filter + * @param string|null $filter * * @return ConfigDataInterface */ @@ -1146,7 +1146,7 @@ interface ConfigDataInterface public function getLdapFilterGroupObject(): ?string; /** - * @param string|null $filter + * @param string|null $filter * * @return ConfigDataInterface */ @@ -1158,7 +1158,7 @@ interface ConfigDataInterface public function getLdapFilterUserAttributes(): array; /** - * @param array|null $attributes + * @param array|null $attributes * * @return ConfigDataInterface */ @@ -1170,7 +1170,7 @@ interface ConfigDataInterface public function getLdapFilterGroupAttributes(): array; /** - * @param array|null $attributes + * @param array|null $attributes * * @return ConfigDataInterface */ @@ -1182,7 +1182,7 @@ interface ConfigDataInterface public function isLdapDatabaseEnabled(): bool; /** - * @param bool|null $ldapDatabaseEnabled + * @param bool|null $ldapDatabaseEnabled * * @return ConfigDataInterface */ diff --git a/lib/SP/Domain/Config/Services/ConfigUtil.php b/lib/SP/Domain/Config/Services/ConfigUtil.php index 8943d987..5fc5d05c 100644 --- a/lib/SP/Domain/Config/Services/ConfigUtil.php +++ b/lib/SP/Domain/Config/Services/ConfigUtil.php @@ -107,7 +107,8 @@ final class ConfigUtil throw new ConfigException( __u('\'/app/config\' directory permissions are wrong'), SPException::ERROR, - sprintf(__('Current: %s - Needed: 750'), $configPerms)); + sprintf(__('Current: %s - Needed: 750'), $configPerms) + ); } } } \ No newline at end of file diff --git a/lib/SP/Domain/Export/FileBackupServiceInterface.php b/lib/SP/Domain/Export/FileBackupServiceInterface.php index 55d2ab6b..40c0e4e1 100644 --- a/lib/SP/Domain/Export/FileBackupServiceInterface.php +++ b/lib/SP/Domain/Export/FileBackupServiceInterface.php @@ -25,8 +25,6 @@ namespace SP\Domain\Export; -use SP\Domain\Common\Services\ServiceException; - /** * Esta clase es la encargada de realizar la copia de sysPass. */ diff --git a/lib/SP/Domain/Install/Services/Installer.php b/lib/SP/Domain/Install/Services/Installer.php index 691913c4..9361e717 100644 --- a/lib/SP/Domain/Install/Services/Installer.php +++ b/lib/SP/Domain/Install/Services/Installer.php @@ -72,9 +72,9 @@ final class Installer implements InstallerInterface public const VERSION_TEXT = '4.0'; public const BUILD = 21031301; - private Request $request; - private ConfigFileService $config; - private UserService $userService; + private Request $request; + private ConfigFileService $config; + private UserService $userService; private UserGroupService $userGroupService; private UserProfileService $userProfileService; private ConfigService $configService; diff --git a/lib/SP/Domain/Notification/In/NotificationRepositoryInterface.php b/lib/SP/Domain/Notification/In/NotificationRepositoryInterface.php index 980bf044..26cb07cf 100644 --- a/lib/SP/Domain/Notification/In/NotificationRepositoryInterface.php +++ b/lib/SP/Domain/Notification/In/NotificationRepositoryInterface.php @@ -28,7 +28,6 @@ namespace SP\Domain\Notification\In; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\DataModel\ItemSearchData; -use SP\DataModel\NotificationData; use SP\Domain\Common\In\RepositoryInterface; use SP\Infrastructure\Database\QueryResult; diff --git a/lib/SP/Domain/Notification/MailServiceInterface.php b/lib/SP/Domain/Notification/MailServiceInterface.php index d76178d3..f335dfc4 100644 --- a/lib/SP/Domain/Notification/MailServiceInterface.php +++ b/lib/SP/Domain/Notification/MailServiceInterface.php @@ -26,7 +26,6 @@ namespace SP\Domain\Notification; use SP\Core\Messages\MailMessage; -use SP\Domain\Common\Services\ServiceException; use SP\Providers\Mail\MailParams; /** diff --git a/lib/SP/Domain/Plugin/In/PluginRepositoryInterface.php b/lib/SP/Domain/Plugin/In/PluginRepositoryInterface.php index 923a4844..c65dd9c7 100644 --- a/lib/SP/Domain/Plugin/In/PluginRepositoryInterface.php +++ b/lib/SP/Domain/Plugin/In/PluginRepositoryInterface.php @@ -27,11 +27,8 @@ namespace SP\Domain\Plugin\In; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; -use SP\Core\Exceptions\SPException; -use SP\DataModel\ItemSearchData; use SP\Domain\Common\In\RepositoryInterface; use SP\Infrastructure\Database\QueryResult; -use SP\Infrastructure\Plugin\Repositories\PluginModel; /** * Class PluginRepository diff --git a/lib/SP/Domain/Security/Services/TrackService.php b/lib/SP/Domain/Security/Services/TrackService.php index d1cc534f..892b06f0 100644 --- a/lib/SP/Domain/Security/Services/TrackService.php +++ b/lib/SP/Domain/Security/Services/TrackService.php @@ -60,8 +60,11 @@ final class TrackService extends Service implements TrackServiceInterface private TrackRepository $trackRepository; private RequestInterface $request; - public function __construct(Application $application, TrackRepositoryInterface $trackRepository, RequestInterface $request) - { + public function __construct( + Application $application, + TrackRepositoryInterface $trackRepository, + RequestInterface $request + ) { parent::__construct($application); $this->trackRepository = $trackRepository; diff --git a/lib/SP/Domain/User/Services/UserGroupService.php b/lib/SP/Domain/User/Services/UserGroupService.php index 4cef1e8e..4518b7c4 100644 --- a/lib/SP/Domain/User/Services/UserGroupService.php +++ b/lib/SP/Domain/User/Services/UserGroupService.php @@ -51,9 +51,9 @@ final class UserGroupService extends Service implements UserGroupServiceInterfac { use ServiceItemTrait; - protected UserGroupRepository $userGroupRepository; + protected UserGroupRepository $userGroupRepository; protected UserToUserGroupServiceInterface $userToUserGroupService; - private DatabaseInterface $database; + private DatabaseInterface $database; public function __construct( Application $application, diff --git a/lib/SP/Domain/User/Services/UserService.php b/lib/SP/Domain/User/Services/UserService.php index 25d353a0..825ecbef 100644 --- a/lib/SP/Domain/User/Services/UserService.php +++ b/lib/SP/Domain/User/Services/UserService.php @@ -54,7 +54,7 @@ final class UserService extends Service implements UserServiceInterface { use ServiceItemTrait; - private UserRepository $userRepository; + private UserRepository $userRepository; private UserPassService $userPassService; public function __construct(