diff --git a/app/Http/Controllers/Server/Files/FileActionsController.php b/app/Http/Controllers/Server/Files/FileActionsController.php index 902e713c2..878332a14 100644 --- a/app/Http/Controllers/Server/Files/FileActionsController.php +++ b/app/Http/Controllers/Server/Files/FileActionsController.php @@ -24,15 +24,15 @@ namespace Pterodactyl\Http\Controllers\Server\Files; -use GuzzleHttp\Exception\RequestException; -use Illuminate\Contracts\Session\Session; -use Illuminate\Http\Request; use Illuminate\Log\Writer; -use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; +use Illuminate\Http\Request; +use Illuminate\Contracts\Session\Session; +use GuzzleHttp\Exception\RequestException; use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Http\Controllers\Controller; -use Pterodactyl\Http\Requests\Server\UpdateFileContentsFormRequest; use Pterodactyl\Traits\Controllers\JavascriptInjection; +use Pterodactyl\Http\Requests\Server\UpdateFileContentsFormRequest; +use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; class FileActionsController extends Controller { diff --git a/app/Http/Controllers/Server/Files/RemoteRequestController.php b/app/Http/Controllers/Server/Files/RemoteRequestController.php index cdc29878f..5995d4717 100644 --- a/app/Http/Controllers/Server/Files/RemoteRequestController.php +++ b/app/Http/Controllers/Server/Files/RemoteRequestController.php @@ -24,13 +24,13 @@ namespace Pterodactyl\Http\Controllers\Server\Files; -use GuzzleHttp\Exception\RequestException; -use Illuminate\Contracts\Config\Repository as ConfigRepository; -use Illuminate\Contracts\Session\Session; -use Illuminate\Http\Request; use Illuminate\Log\Writer; -use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; +use Illuminate\Http\Request; +use Illuminate\Contracts\Session\Session; +use GuzzleHttp\Exception\RequestException; use Pterodactyl\Http\Controllers\Controller; +use Illuminate\Contracts\Config\Repository as ConfigRepository; +use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; class RemoteRequestController extends Controller { diff --git a/app/Http/Middleware/ServerAuthenticate.php b/app/Http/Middleware/ServerAuthenticate.php index 83d35073d..b5d3fd1c2 100644 --- a/app/Http/Middleware/ServerAuthenticate.php +++ b/app/Http/Middleware/ServerAuthenticate.php @@ -25,12 +25,12 @@ namespace Pterodactyl\Http\Middleware; use Closure; -use Illuminate\Contracts\Session\Session; use Illuminate\Http\Request; -use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; use Pterodactyl\Models\Server; -use Illuminate\Contracts\Config\Repository as ConfigRepository; +use Illuminate\Contracts\Session\Session; use Illuminate\Auth\AuthenticationException; +use Illuminate\Contracts\Config\Repository as ConfigRepository; +use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; diff --git a/app/Http/Middleware/SubuserAccessAuthenticate.php b/app/Http/Middleware/SubuserAccessAuthenticate.php index ca52d7e22..b3b54fb0b 100644 --- a/app/Http/Middleware/SubuserAccessAuthenticate.php +++ b/app/Http/Middleware/SubuserAccessAuthenticate.php @@ -25,11 +25,11 @@ namespace Pterodactyl\Http\Middleware; use Closure; -use Illuminate\Auth\AuthenticationException; -use Illuminate\Contracts\Session\Session; use Illuminate\Http\Request; -use Pterodactyl\Exceptions\Service\Server\UserNotLinkedToServerException; +use Illuminate\Contracts\Session\Session; +use Illuminate\Auth\AuthenticationException; use Pterodactyl\Services\Servers\ServerAccessHelperService; +use Pterodactyl\Exceptions\Service\Server\UserNotLinkedToServerException; class SubuserAccessAuthenticate { diff --git a/app/Http/Requests/Server/UpdateFileContentsFormRequest.php b/app/Http/Requests/Server/UpdateFileContentsFormRequest.php index cde7d8a08..1f469aa8f 100644 --- a/app/Http/Requests/Server/UpdateFileContentsFormRequest.php +++ b/app/Http/Requests/Server/UpdateFileContentsFormRequest.php @@ -24,15 +24,15 @@ namespace Pterodactyl\Http\Requests\Server; +use Illuminate\Log\Writer; +use Illuminate\Contracts\Session\Session; use GuzzleHttp\Exception\RequestException; use Illuminate\Contracts\Config\Repository; -use Illuminate\Contracts\Session\Session; -use Illuminate\Log\Writer; use Pterodactyl\Exceptions\DisplayException; -use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException; -use Pterodactyl\Exceptions\Http\Server\FileTypeNotEditableException; use Pterodactyl\Http\Requests\FrontendUserFormRequest; +use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException; use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; +use Pterodactyl\Exceptions\Http\Server\FileTypeNotEditableException; class UpdateFileContentsFormRequest extends FrontendUserFormRequest { diff --git a/app/Services/Servers/ServerAccessHelperService.php b/app/Services/Servers/ServerAccessHelperService.php index deabbc050..4618d323b 100644 --- a/app/Services/Servers/ServerAccessHelperService.php +++ b/app/Services/Servers/ServerAccessHelperService.php @@ -24,13 +24,13 @@ namespace Pterodactyl\Services\Servers; -use Pterodactyl\Exceptions\Service\Server\UserNotLinkedToServerException; -use Pterodactyl\Models\Server; use Pterodactyl\Models\User; +use Pterodactyl\Models\Server; use Illuminate\Cache\Repository as CacheRepository; use Pterodactyl\Contracts\Repository\UserRepositoryInterface; use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface; +use Pterodactyl\Exceptions\Service\Server\UserNotLinkedToServerException; class ServerAccessHelperService { diff --git a/tests/Assertions/ControllerAssertionsTrait.php b/tests/Assertions/ControllerAssertionsTrait.php index 420eba1be..cfd0a2fc6 100644 --- a/tests/Assertions/ControllerAssertionsTrait.php +++ b/tests/Assertions/ControllerAssertionsTrait.php @@ -24,10 +24,10 @@ namespace Tests\Assertions; -use Illuminate\Http\JsonResponse; -use Illuminate\Http\Response; use Illuminate\View\View; +use Illuminate\Http\Response; use PHPUnit_Framework_Assert; +use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; trait ControllerAssertionsTrait diff --git a/tests/Unit/Http/Controllers/Base/IndexControllerTest.php b/tests/Unit/Http/Controllers/Base/IndexControllerTest.php index 529f7c69a..65884d748 100644 --- a/tests/Unit/Http/Controllers/Base/IndexControllerTest.php +++ b/tests/Unit/Http/Controllers/Base/IndexControllerTest.php @@ -24,16 +24,16 @@ namespace Tests\Unit\Http\Controllers\Base; -use Illuminate\Http\Request; use Mockery as m; -use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface; -use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; -use Pterodactyl\Http\Controllers\Base\IndexController; -use Pterodactyl\Models\Server; -use Pterodactyl\Models\User; -use Pterodactyl\Services\Servers\ServerAccessHelperService; -use Tests\Assertions\ControllerAssertionsTrait; use Tests\TestCase; +use Illuminate\Http\Request; +use Pterodactyl\Models\User; +use Pterodactyl\Models\Server; +use Tests\Assertions\ControllerAssertionsTrait; +use Pterodactyl\Http\Controllers\Base\IndexController; +use Pterodactyl\Services\Servers\ServerAccessHelperService; +use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; +use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface; class IndexControllerTest extends TestCase { diff --git a/tests/Unit/Http/Controllers/Base/SecurityControllerTest.php b/tests/Unit/Http/Controllers/Base/SecurityControllerTest.php index 359b626f4..3c9c8b8a2 100644 --- a/tests/Unit/Http/Controllers/Base/SecurityControllerTest.php +++ b/tests/Unit/Http/Controllers/Base/SecurityControllerTest.php @@ -24,19 +24,19 @@ namespace Tests\Unit\Http\Controllers\Base; -use Illuminate\Contracts\Config\Repository; -use Illuminate\Contracts\Session\Session; -use Illuminate\Http\Request; use Mockery as m; +use Tests\TestCase; +use Illuminate\Http\Request; +use Pterodactyl\Models\User; use Prologue\Alerts\AlertsMessageBag; +use Illuminate\Contracts\Session\Session; +use Illuminate\Contracts\Config\Repository; +use Tests\Assertions\ControllerAssertionsTrait; +use Pterodactyl\Services\Users\TwoFactorSetupService; +use Pterodactyl\Services\Users\ToggleTwoFactorService; +use Pterodactyl\Http\Controllers\Base\SecurityController; use Pterodactyl\Contracts\Repository\SessionRepositoryInterface; use Pterodactyl\Exceptions\Service\User\TwoFactorAuthenticationTokenInvalid; -use Pterodactyl\Http\Controllers\Base\SecurityController; -use Pterodactyl\Models\User; -use Pterodactyl\Services\Users\ToggleTwoFactorService; -use Pterodactyl\Services\Users\TwoFactorSetupService; -use Tests\Assertions\ControllerAssertionsTrait; -use Tests\TestCase; class SecurityControllerTest extends TestCase { diff --git a/tests/Unit/Http/Controllers/Server/ConsoleControllerTest.php b/tests/Unit/Http/Controllers/Server/ConsoleControllerTest.php index b89dbb5bf..b4eaba39a 100644 --- a/tests/Unit/Http/Controllers/Server/ConsoleControllerTest.php +++ b/tests/Unit/Http/Controllers/Server/ConsoleControllerTest.php @@ -24,13 +24,13 @@ namespace Tests\Unit\Http\Controllers\Server; -use Illuminate\Contracts\Session\Session; use Mockery as m; -use Pterodactyl\Http\Controllers\Server\ConsoleController; -use Pterodactyl\Models\Server; -use Tests\Assertions\ControllerAssertionsTrait; use Tests\TestCase; +use Pterodactyl\Models\Server; +use Illuminate\Contracts\Session\Session; use Illuminate\Contracts\Config\Repository; +use Tests\Assertions\ControllerAssertionsTrait; +use Pterodactyl\Http\Controllers\Server\ConsoleController; class ConsoleControllerTest extends TestCase { diff --git a/tests/Unit/Http/Controllers/Server/Files/DownloadControllerTest.php b/tests/Unit/Http/Controllers/Server/Files/DownloadControllerTest.php index fcf066e19..a0ecd9419 100644 --- a/tests/Unit/Http/Controllers/Server/Files/DownloadControllerTest.php +++ b/tests/Unit/Http/Controllers/Server/Files/DownloadControllerTest.php @@ -25,14 +25,14 @@ namespace Tests\Unit\Http\Controllers\Server\Files; use Mockery as m; -use Illuminate\Cache\Repository; -use Illuminate\Contracts\Session\Session; +use Tests\TestCase; use phpmock\phpunit\PHPMock; -use Pterodactyl\Http\Controllers\Server\Files\DownloadController; use Pterodactyl\Models\Node; use Pterodactyl\Models\Server; +use Illuminate\Cache\Repository; +use Illuminate\Contracts\Session\Session; use Tests\Assertions\ControllerAssertionsTrait; -use Tests\TestCase; +use Pterodactyl\Http\Controllers\Server\Files\DownloadController; class DownloadControllerTest extends TestCase { diff --git a/tests/Unit/Http/Controllers/Server/Files/FileActionsControllerTest.php b/tests/Unit/Http/Controllers/Server/Files/FileActionsControllerTest.php index edbc6e3f8..67bf357ea 100644 --- a/tests/Unit/Http/Controllers/Server/Files/FileActionsControllerTest.php +++ b/tests/Unit/Http/Controllers/Server/Files/FileActionsControllerTest.php @@ -24,18 +24,18 @@ namespace Tests\Unit\Http\Controllers\Server\Files; -use GuzzleHttp\Exception\RequestException; -use Illuminate\Contracts\Session\Session; -use Illuminate\Http\Request; -use Illuminate\Log\Writer; use Mockery as m; -use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; -use Pterodactyl\Exceptions\DisplayException; -use Pterodactyl\Http\Controllers\Server\Files\FileActionsController; -use Pterodactyl\Http\Requests\Server\UpdateFileContentsFormRequest; -use Pterodactyl\Models\Server; -use Tests\Assertions\ControllerAssertionsTrait; use Tests\TestCase; +use Illuminate\Log\Writer; +use Illuminate\Http\Request; +use Pterodactyl\Models\Server; +use Illuminate\Contracts\Session\Session; +use GuzzleHttp\Exception\RequestException; +use Pterodactyl\Exceptions\DisplayException; +use Tests\Assertions\ControllerAssertionsTrait; +use Pterodactyl\Http\Requests\Server\UpdateFileContentsFormRequest; +use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface; +use Pterodactyl\Http\Controllers\Server\Files\FileActionsController; class FileActionsControllerTest extends TestCase {