Apply fixes from StyleCI (#609)
This commit is contained in:
parent
cb62e6a96d
commit
30660cfac2
19 changed files with 41 additions and 41 deletions
|
@ -30,9 +30,9 @@ use Pterodactyl\Models\Node;
|
|||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Nodes\NodeUpdateService;
|
||||
use Illuminate\Cache\Repository as CacheRepository;
|
||||
use Pterodactyl\Services\Nodes\NodeCreationService;
|
||||
use Pterodactyl\Services\Nodes\NodeDeletionService;
|
||||
use Illuminate\Cache\Repository as CacheRepository;
|
||||
use Pterodactyl\Services\Allocations\AssignmentService;
|
||||
use Pterodactyl\Http\Requests\Admin\Node\NodeFormRequest;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
|
|
|
@ -30,11 +30,11 @@ use Pterodactyl\Models\Server;
|
|||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Servers\SuspensionService;
|
||||
use Pterodactyl\Http\Requests\Admin\ServerFormRequest;
|
||||
use Pterodactyl\Services\Servers\ServerCreationService;
|
||||
use Pterodactyl\Services\Servers\ServerDeletionService;
|
||||
use Pterodactyl\Services\Servers\ReinstallServerService;
|
||||
use Pterodactyl\Services\Servers\SuspensionService;
|
||||
use Pterodactyl\Http\Requests\Admin\ServerFormRequest;
|
||||
use Pterodactyl\Services\Servers\ContainerRebuildService;
|
||||
use Pterodactyl\Services\Servers\BuildModificationService;
|
||||
use Pterodactyl\Services\Database\DatabaseManagementService;
|
||||
|
|
|
@ -29,10 +29,10 @@ use Pterodactyl\Models\User;
|
|||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Pterodactyl\Services\Users\UserUpdateService;
|
||||
use Pterodactyl\Services\Users\UserCreationService;
|
||||
use Pterodactyl\Services\Users\UserDeletionService;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Pterodactyl\Http\Requests\Admin\UserFormRequest;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ namespace Pterodactyl\Http\Controllers\Base;
|
|||
|
||||
use Illuminate\Http\Request;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Http\Requests\Base\ApiKeyFormRequest;
|
||||
use Pterodactyl\Models\APIPermission;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface;
|
||||
use Pterodactyl\Services\Api\KeyCreationService;
|
||||
use Pterodactyl\Http\Requests\Base\ApiKeyFormRequest;
|
||||
use Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface;
|
||||
|
||||
class APIController extends Controller
|
||||
{
|
||||
|
|
|
@ -27,8 +27,8 @@ namespace Pterodactyl\Http\Controllers\Base;
|
|||
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Http\Requests\Base\AccountDataFormRequest;
|
||||
use Pterodactyl\Services\Users\UserUpdateService;
|
||||
use Pterodactyl\Http\Requests\Base\AccountDataFormRequest;
|
||||
|
||||
class AccountController extends Controller
|
||||
{
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
namespace Pterodactyl\Http\Controllers\Base;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Servers\ServerAccessHelperService;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class IndexController extends Controller
|
||||
|
|
|
@ -25,15 +25,15 @@
|
|||
|
||||
namespace Pterodactyl\Http\Controllers\Base;
|
||||
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Illuminate\Contracts\Session\Session;
|
||||
use Illuminate\Http\Request;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Illuminate\Contracts\Session\Session;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Users\TwoFactorSetupService;
|
||||
use Pterodactyl\Services\Users\ToggleTwoFactorService;
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Pterodactyl\Contracts\Repository\SessionRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\User\TwoFactorAuthenticationTokenInvalid;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Users\ToggleTwoFactorService;
|
||||
use Pterodactyl\Services\Users\TwoFactorSetupService;
|
||||
|
||||
class SecurityController extends Controller
|
||||
{
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\Base;
|
||||
|
||||
use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Http\Requests\FrontendUserFormRequest;
|
||||
use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException;
|
||||
|
||||
class AccountDataFormRequest extends FrontendUserFormRequest
|
||||
{
|
||||
|
|
|
@ -25,24 +25,21 @@
|
|||
namespace Pterodactyl\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SessionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Daemon\FileRepository;
|
||||
use Pterodactyl\Repositories\Daemon\PowerRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\NodeRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\PackRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\PermissionRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\SessionRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\SubuserRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\UserRepository;
|
||||
use Pterodactyl\Repositories\Daemon\CommandRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ServiceRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\SessionRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\SubuserRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\LocationRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\AllocationRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\PermissionRepository;
|
||||
use Pterodactyl\Repositories\Daemon\ConfigurationRepository;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
|
@ -55,10 +52,13 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
|||
use Pterodactyl\Repositories\Eloquent\OptionVariableRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ServerVariableRepository;
|
||||
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SessionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\PowerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
class ServerRepository extends EloquentRepository implements ServerRepositoryInterface
|
||||
{
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
namespace Pterodactyl\Services\Servers;
|
||||
|
||||
use Pterodactyl\Models\User;
|
||||
use Illuminate\Cache\Repository as CacheRepository;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Models\User;
|
||||
|
||||
class ServerAccessHelperService
|
||||
{
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace Pterodactyl\Services\Users;
|
||||
|
||||
use Pterodactyl\Models\User;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\User\TwoFactorAuthenticationTokenInvalid;
|
||||
use Pterodactyl\Models\User;
|
||||
|
||||
class ToggleTwoFactorService
|
||||
{
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace Pterodactyl\Services\Users;
|
||||
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Pterodactyl\Models\User;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Models\User;
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
|
||||
class TwoFactorSetupService
|
||||
{
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
namespace Tests\Unit\Http\Controllers\Base;
|
||||
|
||||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Tests\Assertions\ControllerAssertionsTrait;
|
||||
use Pterodactyl\Services\Users\UserUpdateService;
|
||||
use Pterodactyl\Http\Controllers\Base\AccountController;
|
||||
use Pterodactyl\Http\Requests\Base\AccountDataFormRequest;
|
||||
use Pterodactyl\Services\Users\UserUpdateService;
|
||||
use Tests\Assertions\ControllerAssertionsTrait;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AccountControllerTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -27,10 +27,10 @@ namespace Tests\Unit\Services\Api;
|
|||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use phpmock\phpunit\PHPMock;
|
||||
use Pterodactyl\Services\Api\KeyCreationService;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Services\Api\PermissionService;
|
||||
use Pterodactyl\Services\Api\KeyCreationService;
|
||||
use Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface;
|
||||
|
||||
class KeyCreationServiceTest extends TestCase
|
||||
|
|
|
@ -27,8 +27,8 @@ namespace Tests\Unit\Services\Nodes;
|
|||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Services\Nodes\NodeDeletionService;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Pterodactyl\Services\Nodes\NodeDeletionService;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
namespace Tests\Unit\Services\Users;
|
||||
|
||||
use Mockery as m;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Services\Users\ToggleTwoFactorService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\User;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Services\Users\ToggleTwoFactorService;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
|
||||
class ToggleTwoFactorServiceTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
|
||||
namespace Tests\Unit\Services\Users;
|
||||
|
||||
use Illuminate\Contracts\Config\Repository;
|
||||
use Mockery as m;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Services\Users\TwoFactorSetupService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\User;
|
||||
use Illuminate\Contracts\Config\Repository;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Pterodactyl\Services\Users\TwoFactorSetupService;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
|
||||
class TwoFactorSetupServiceTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -27,8 +27,8 @@ namespace Tests\Unit\Services\Users;
|
|||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Services\Users\UserDeletionService;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Pterodactyl\Services\Users\UserDeletionService;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
|
||||
|
|
Loading…
Reference in a new issue