File tree Expand file tree Collapse file tree 7 files changed +28
-25
lines changed
Expand file tree Collapse file tree 7 files changed +28
-25
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ return PhpCsFixer\Config::create()
3535 'no_unreachable_default_argument_value ' => true ,
3636 'no_useless_return ' => true ,
3737 'not_operator_with_successor_space ' => true ,
38+ 'ordered_imports ' => [
39+ 'sortAlgorithm ' => 'length ' ,
40+ ],
3841 'phpdoc_align ' => ['tags ' => ['param ' ]],
3942 'phpdoc_separation ' => false ,
4043 'protected_to_private ' => false ,
Original file line number Diff line number Diff line change 2424
2525namespace Pterodactyl \Http \Controllers \Server ;
2626
27- use Illuminate \Contracts \Session \Session ;
28- use Prologue \Alerts \AlertsMessageBag ;
29- use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
3027use Illuminate \Http \Request ;
31- use Pterodactyl \Http \Controllers \Controller ;
3228use Pterodactyl \Models \Permission ;
33- use Pterodactyl \Services \Subusers \SubuserCreationService ;
34- use Pterodactyl \Services \Subusers \SubuserDeletionService ;
29+ use Prologue \Alerts \AlertsMessageBag ;
30+ use Illuminate \Contracts \Session \Session ;
31+ use Pterodactyl \Http \Controllers \Controller ;
3532use Pterodactyl \Services \Subusers \SubuserUpdateService ;
3633use Pterodactyl \Traits \Controllers \JavascriptInjection ;
34+ use Pterodactyl \Services \Subusers \SubuserCreationService ;
35+ use Pterodactyl \Services \Subusers \SubuserDeletionService ;
36+ use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
3737
3838class SubuserController extends Controller
3939{
Original file line number Diff line number Diff line change 2626
2727use Closure ;
2828use Illuminate \Contracts \Session \Session ;
29- use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
3029use Pterodactyl \Exceptions \DisplayException ;
30+ use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
3131use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
3232
3333class SubuserAccess
Original file line number Diff line number Diff line change 2525namespace Pterodactyl \Services \Subusers ;
2626
2727use Illuminate \Log \Writer ;
28- use Pterodactyl \Exceptions \Repository \RecordNotFoundException ;
2928use Pterodactyl \Models \Server ;
3029use GuzzleHttp \Exception \RequestException ;
3130use Illuminate \Database \ConnectionInterface ;
3231use Pterodactyl \Exceptions \DisplayException ;
3332use Pterodactyl \Services \Users \UserCreationService ;
3433use Pterodactyl \Contracts \Repository \UserRepositoryInterface ;
34+ use Pterodactyl \Exceptions \Repository \RecordNotFoundException ;
3535use Pterodactyl \Contracts \Repository \ServerRepositoryInterface ;
3636use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
3737use Pterodactyl \Exceptions \Service \Subuser \UserIsServerOwnerException ;
Original file line number Diff line number Diff line change 2424
2525namespace Tests \Unit \Http \Controllers \Server \Files ;
2626
27+ use Mockery as m ;
28+ use Tests \TestCase ;
29+ use Illuminate \Log \Writer ;
30+ use Illuminate \Http \Request ;
31+ use Pterodactyl \Models \Server ;
32+ use Illuminate \Contracts \Session \Session ;
2733use GuzzleHttp \Exception \RequestException ;
2834use Illuminate \Contracts \Config \Repository ;
29- use Illuminate \Contracts \Session \Session ;
30- use Illuminate \Http \Request ;
31- use Illuminate \Log \Writer ;
32- use Mockery as m ;
35+ use Tests \Assertions \ControllerAssertionsTrait ;
3336use Pterodactyl \Contracts \Repository \Daemon \FileRepositoryInterface ;
3437use Pterodactyl \Http \Controllers \Server \Files \RemoteRequestController ;
35- use Pterodactyl \Models \Server ;
36- use Tests \Assertions \ControllerAssertionsTrait ;
37- use Tests \TestCase ;
3838
3939class RemoteRequestControllerTest extends TestCase
4040{
Original file line number Diff line number Diff line change 2424
2525namespace Tests \Unit \Http \Controllers \Server ;
2626
27- use Illuminate \Contracts \Session \Session ;
28- use Illuminate \Http \Request ;
2927use Mockery as m ;
30- use Prologue \Alerts \AlertsMessageBag ;
31- use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
32- use Pterodactyl \Http \Controllers \Server \SubuserController ;
33- use Pterodactyl \Models \Permission ;
28+ use Tests \TestCase ;
29+ use Illuminate \Http \Request ;
3430use Pterodactyl \Models \Server ;
3531use Pterodactyl \Models \Subuser ;
32+ use Pterodactyl \Models \Permission ;
33+ use Prologue \Alerts \AlertsMessageBag ;
34+ use Illuminate \Contracts \Session \Session ;
35+ use Tests \Assertions \ControllerAssertionsTrait ;
36+ use Pterodactyl \Services \Subusers \SubuserUpdateService ;
3637use Pterodactyl \Services \Subusers \SubuserCreationService ;
3738use Pterodactyl \Services \Subusers \SubuserDeletionService ;
38- use Pterodactyl \Services \Subusers \SubuserUpdateService ;
39- use Tests \Assertions \ControllerAssertionsTrait ;
40- use Tests \TestCase ;
39+ use Pterodactyl \Http \Controllers \Server \SubuserController ;
40+ use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
4141
4242class SubuserControllerTest extends TestCase
4343{
Original file line number Diff line number Diff line change 2525namespace Tests \Unit \Services \Subusers ;
2626
2727use Mockery as m ;
28- use Pterodactyl \Exceptions \Repository \RecordNotFoundException ;
2928use Tests \TestCase ;
3029use Illuminate \Log \Writer ;
3130use phpmock \phpunit \PHPMock ;
3837use Pterodactyl \Services \Subusers \SubuserCreationService ;
3938use Pterodactyl \Services \Subusers \PermissionCreationService ;
4039use Pterodactyl \Contracts \Repository \UserRepositoryInterface ;
40+ use Pterodactyl \Exceptions \Repository \RecordNotFoundException ;
4141use Pterodactyl \Contracts \Repository \ServerRepositoryInterface ;
4242use Pterodactyl \Contracts \Repository \SubuserRepositoryInterface ;
4343use Pterodactyl \Exceptions \Service \Subuser \UserIsServerOwnerException ;
You can’t perform that action at this time.
0 commit comments