Skip to content

Commit

Permalink
[PSR4] ApplicationModule - (Rector) Fix uses of changed classes
Browse files Browse the repository at this point in the history
remp/crm#2228
  • Loading branch information
markoph committed Jan 22, 2024
1 parent 7ba2ca7 commit b8a9278
Show file tree
Hide file tree
Showing 121 changed files with 202 additions and 204 deletions.
2 changes: 1 addition & 1 deletion src/Api/DeleteUserApiHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Contributte\Translation\Translator;
use Crm\ApiModule\Models\Api\ApiHandler;
use Crm\ApiModule\Models\Response\EmptyResponse;
use Crm\ApplicationModule\User\DeleteUserData;
use Crm\ApplicationModule\Models\User\DeleteUserData;
use Crm\UsersModule\Models\Auth\UsersApiAuthorizationInterface;
use Nette\Http\IResponse;
use Tomaj\NetteApi\Response\JsonApiResponse;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/GoogleTokenSignInHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Crm\UsersModule\Api;

use Crm\ApiModule\Models\Api\ApiHandler;
use Crm\ApplicationModule\DataProvider\DataProviderManager;
use Crm\ApplicationModule\Models\DataProvider\DataProviderManager;
use Crm\UsersModule\DataProviders\GoogleTokenSignInDataProviderInterface;
use Crm\UsersModule\Models\Auth\Sso\GoogleSignIn;
use Crm\UsersModule\Repositories\AccessTokensRepository;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/UsersCreateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Crm\ApiModule\Models\Api\ApiHandler;
use Crm\ApiModule\Models\Api\ApiParamsValidatorInterface;
use Crm\ApiModule\Models\Authorization\NoAuthorization;
use Crm\ApplicationModule\Request;
use Crm\ApplicationModule\Models\Request;
use Crm\UsersModule\Models\Auth\InvalidEmailException;
use Crm\UsersModule\Models\Auth\Rate\RegistrationIpRateLimit;
use Crm\UsersModule\Models\Auth\UserManager;
Expand Down
4 changes: 2 additions & 2 deletions src/Authenticator/AccessTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Authenticator;

use Crm\ApplicationModule\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Authenticator\BaseAuthenticator;
use Crm\ApplicationModule\Models\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Models\Authenticator\BaseAuthenticator;
use Crm\UsersModule\Repositories\AccessTokensRepository;
use Crm\UsersModule\Repositories\LoginAttemptsRepository;
use Crm\UsersModule\Repositories\UsersRepository;
Expand Down
4 changes: 2 additions & 2 deletions src/Authenticator/AutoLoginAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Authenticator;

use Crm\ApplicationModule\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Authenticator\BaseAuthenticator;
use Crm\ApplicationModule\Models\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Models\Authenticator\BaseAuthenticator;
use Crm\UsersModule\Repositories\LoginAttemptsRepository;
use Crm\UsersModule\Repositories\UsersRepository;
use League\Event\Emitter;
Expand Down
4 changes: 2 additions & 2 deletions src/Authenticator/AutoLoginTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Authenticator;

use Crm\ApplicationModule\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Authenticator\BaseAuthenticator;
use Crm\ApplicationModule\Models\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Models\Authenticator\BaseAuthenticator;
use Crm\UsersModule\Models\Auth\AutoLogin\AutoLogin;
use Crm\UsersModule\Models\Auth\UserAuthenticator;
use Crm\UsersModule\Repositories\LoginAttemptsRepository;
Expand Down
6 changes: 3 additions & 3 deletions src/Authenticator/UsernameAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Authenticator;

use Crm\ApplicationModule\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Authenticator\BaseAuthenticator;
use Crm\ApplicationModule\Models\Authenticator\AuthenticatorInterface;
use Crm\ApplicationModule\Models\Authenticator\BaseAuthenticator;
use Crm\UsersModule\Models\Auth\Rate\IpRateLimit;
use Crm\UsersModule\Models\Auth\Rate\RateLimitException;
use Crm\UsersModule\Models\Auth\Rate\WrongPasswordRateLimit;
Expand Down Expand Up @@ -92,7 +92,7 @@ public function setCredentials(array $credentials) : AuthenticatorInterface
*/
private function process() : ActiveRow
{
if ($this->ipRateLimit->reachLimit(\Crm\ApplicationModule\Request::getIp())) {
if ($this->ipRateLimit->reachLimit(\Crm\ApplicationModule\Models\Request::getIp())) {
$this->addAttempt($this->username, null, $this->source, LoginAttemptsRepository::RATE_LIMIT_EXCEEDED, 'Rate limit exceeded.');
throw new RateLimitException($this->translator->translate('users.authenticator.rate_limit_exceeded'), UserAuthenticator::FAILURE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Components\ActiveRegisteredUsersStatWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Crm\SegmentModule\Repositories\SegmentsRepository;
use Crm\SegmentModule\Repositories\SegmentsValuesRepository;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/AddressWidget/AddressWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\AddressWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;

/**
* This widget renders simple address detail from given address.
Expand Down
2 changes: 1 addition & 1 deletion src/Components/AutologinTokens/AutologinTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\AutologinTokens;

use Crm\ApplicationModule\Widget\WidgetInterface;
use Crm\ApplicationModule\Models\Widget\WidgetInterface;
use Crm\UsersModule\Repositories\AutoLoginTokensRepository;
use Nette\Application\UI\Control;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Components\MonthToDateUsersStatWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Utils\DateTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Crm\UsersModule\Components\MonthUsersSmallBarGraphWidget;

use Crm\ApplicationModule\Components\Graphs\SmallBarGraphControlFactoryInterface;
use Crm\ApplicationModule\Graphs\Criteria;
use Crm\ApplicationModule\Graphs\GraphData;
use Crm\ApplicationModule\Graphs\GraphDataItem;
use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Components\Graphs\SmallBarGraph\SmallBarGraphControlFactoryInterface;
use Crm\ApplicationModule\Models\Graphs\Criteria;
use Crm\ApplicationModule\Models\Graphs\GraphData;
use Crm\ApplicationModule\Models\Graphs\GraphDataItem;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Nette\Localization\Translator;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Components/MonthUsersStatWidget/MonthUsersStatWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Components\MonthUsersStatWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Utils\DateTime;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/SsoWidget/SsoWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\SsoWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;

/**
* This widget renders SSO login form
Expand Down
4 changes: 2 additions & 2 deletions src/Components/TodayUsersStatWidget/TodayUsersStatWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Components\TodayUsersStatWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Utils\DateTime;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/UserActionLogAdmin/UserActionLogAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\UserActionLogAdmin;

use Crm\ApplicationModule\DataProvider\DataProviderManager;
use Crm\ApplicationModule\Models\DataProvider\DataProviderManager;
use Crm\UsersModule\DataProviders\FilterUserActionLogsDataProviderInterface;
use Crm\UsersModule\Repositories\UserActionsLogRepository;
use Nette\Application\UI\Control;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\Components\UserConnectedAccountsListWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;
use Crm\UsersModule\Repositories\UserConnectedAccountsRepository;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Localization\Translator;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UserLoginAttempts/UserLoginAttempts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Crm\UsersModule\Components\UserLoginAttempts;

use Crm\ApiModule\Repositories\UserSourceAccessesRepository;
use Crm\ApplicationModule\Widget\WidgetInterface;
use Crm\ApplicationModule\Models\Widget\WidgetInterface;
use Crm\UsersModule\Repositories\LoginAttemptsRepository;
use Nette\Application\UI\Control;
use Nette\Localization\Translator;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UserMeta/UserMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\UserMeta;

use Crm\ApplicationModule\Widget\WidgetInterface;
use Crm\ApplicationModule\Models\Widget\WidgetInterface;
use Crm\UsersModule\Repositories\UserMetaRepository;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Application\UI\Control;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UserPasswordChanges/UserPasswordChanges.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\UserPasswordChanges;

use Crm\ApplicationModule\Widget\WidgetInterface;
use Crm\ApplicationModule\Models\Widget\WidgetInterface;
use Crm\UsersModule\Repositories\ChangePasswordsLogsRepository;
use Crm\UsersModule\Repositories\PasswordResetTokensRepository;
use Nette\Application\UI\Control;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/UserSourceAccesses/UserSourceAccesses.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Crm\UsersModule\Components\UserSourceAccesses;

use Crm\ApiModule\Repositories\UserSourceAccessesRepository;
use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Widget\LazyWidgetManager;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\LazyWidgetManager;

/**
* This widget fetches last user accesses from access repository
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UserTokens/UserTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\UserTokens;

use Crm\ApplicationModule\Widget\WidgetInterface;
use Crm\ApplicationModule\Models\Widget\WidgetInterface;
use Crm\UsersModule\Models\Auth\Access\AccessToken;
use Crm\UsersModule\Models\User\UserData;
use Crm\UsersModule\Repositories\AccessTokensRepository;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Widgets/DetailWidget/DetailWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\Components\Widgets\DetailWidget;

use Crm\ApplicationModule\Widget\BaseLazyWidget;
use Crm\ApplicationModule\Models\Widget\BaseLazyWidget;

/**
* This widget fetches all widgets for specific widget namespace
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/AccessTokenDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Database\Table\ActiveRow;

interface AccessTokenDataProviderInterface extends DataProviderInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/AddressFormDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Application\UI\Form;

interface AddressFormDataProviderInterface extends DataProviderInterface
Expand Down
4 changes: 2 additions & 2 deletions src/DataProviders/AddressesUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\NowTrait;
use Crm\ApplicationModule\User\UserDataProviderInterface;
use Crm\ApplicationModule\Models\NowTrait;
use Crm\ApplicationModule\Models\User\UserDataProviderInterface;
use Crm\UsersModule\Repositories\AddressesRepository;

class AddressesUserDataProvider implements UserDataProviderInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/AdminUserGroupsUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\User\UserDataProviderInterface;
use Crm\ApplicationModule\Models\User\UserDataProviderInterface;
use Crm\UsersModule\Repositories\AdminUserGroupsRepository;
use Crm\UsersModule\Repositories\UsersRepository;

Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/AutoLoginTokensUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\User\UserDataProviderInterface;
use Crm\ApplicationModule\Models\User\UserDataProviderInterface;
use Crm\UsersModule\Repositories\AutoLoginTokensRepository;

class AutoLoginTokensUserDataProvider implements UserDataProviderInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/BasicUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\User\UserDataProviderInterface;
use Crm\ApplicationModule\Models\User\UserDataProviderInterface;
use Crm\UsersModule\Models\Auth\UserManager;
use Crm\UsersModule\Repositories\UsersRepository;
use Nette\Utils\DateTime;
Expand Down
4 changes: 2 additions & 2 deletions src/DataProviders/CanDeleteAddressDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderException;
use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderException;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Database\Table\ActiveRow;

interface CanDeleteAddressDataProviderInterface extends DataProviderInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/ClaimUserDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Database\Table\ActiveRow;

interface ClaimUserDataProviderInterface extends DataProviderInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Selection;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\Database\Selection;

interface FilterAbusiveUserFormDataProviderInterface extends DataProviderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Selection;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\Database\Selection;

interface FilterUserActionLogsDataProviderInterface extends DataProviderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Application\UI\Form;

interface FilterUserActionLogsFormDataProviderInterface extends DataProviderInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/FilterUsersFormDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Application\UI\Form;
use Nette\Database\Table\Selection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;
use Nette\Database\Table\Selection;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/GoogleSignInDataProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;

interface GoogleSignInDataProviderInterface extends DataProviderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Crm\ApplicationModule\Models\DataProvider\DataProviderInterface;

interface GoogleTokenSignInDataProviderInterface extends DataProviderInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/DataProviders/LoginAttemptsUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crm\UsersModule\DataProviders;

use Crm\ApplicationModule\User\UserDataProviderInterface;
use Crm\ApplicationModule\Models\User\UserDataProviderInterface;
use Crm\UsersModule\Repositories\LoginAttemptsRepository;

class LoginAttemptsUserDataProvider implements UserDataProviderInterface
Expand Down
Loading

0 comments on commit b8a9278

Please sign in to comment.