diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ea4346aef..2ff7a6260 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -4,8 +4,8 @@ namespace Pterodactyl\Http; use Pterodactyl\Models\ApiKey; use Illuminate\Auth\Middleware\Authorize; -use Illuminate\Http\Middleware\TrustProxies; use Illuminate\Auth\Middleware\Authenticate; +use Illuminate\Http\Middleware\TrustProxies; use Pterodactyl\Http\Middleware\TrimStrings; use Illuminate\Session\Middleware\StartSession; use Pterodactyl\Http\Middleware\EncryptCookies; diff --git a/app/Models/Model.php b/app/Models/Model.php index 5eaa1fa68..3fca705fd 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -2,8 +2,8 @@ namespace Pterodactyl\Models; -use Illuminate\Support\Str; use Illuminate\Support\Arr; +use Illuminate\Support\Str; use Illuminate\Validation\Rule; use Illuminate\Container\Container; use Illuminate\Contracts\Validation\Factory; diff --git a/app/Transformers/Api/Application/AllocationTransformer.php b/app/Transformers/Api/Application/AllocationTransformer.php index cc749e194..3584d8683 100644 --- a/app/Transformers/Api/Application/AllocationTransformer.php +++ b/app/Transformers/Api/Application/AllocationTransformer.php @@ -11,8 +11,6 @@ class AllocationTransformer extends BaseTransformer { /** * Relationships that can be loaded onto allocation transformations. - * - * @var array */ protected array $availableIncludes = ['node', 'server']; diff --git a/app/Transformers/Api/Application/DatabaseHostTransformer.php b/app/Transformers/Api/Application/DatabaseHostTransformer.php index 3855cf372..08d635a03 100644 --- a/app/Transformers/Api/Application/DatabaseHostTransformer.php +++ b/app/Transformers/Api/Application/DatabaseHostTransformer.php @@ -8,9 +8,6 @@ use Pterodactyl\Services\Acl\Api\AdminAcl; class DatabaseHostTransformer extends BaseTransformer { - /** - * @var array - */ protected array $availableIncludes = [ 'databases', ]; diff --git a/app/Transformers/Api/Application/EggTransformer.php b/app/Transformers/Api/Application/EggTransformer.php index d2b269b73..8a0dbf8b3 100644 --- a/app/Transformers/Api/Application/EggTransformer.php +++ b/app/Transformers/Api/Application/EggTransformer.php @@ -2,8 +2,8 @@ namespace Pterodactyl\Transformers\Api\Application; -use Pterodactyl\Models\Egg; use Illuminate\Support\Arr; +use Pterodactyl\Models\Egg; use Pterodactyl\Models\Nest; use Pterodactyl\Models\Server; use Pterodactyl\Models\EggVariable; @@ -13,8 +13,6 @@ class EggTransformer extends BaseTransformer { /** * Relationships that can be loaded onto this transformation. - * - * @var array */ protected array $availableIncludes = [ 'nest', diff --git a/app/Transformers/Api/Application/LocationTransformer.php b/app/Transformers/Api/Application/LocationTransformer.php index 427667734..90564d81d 100644 --- a/app/Transformers/Api/Application/LocationTransformer.php +++ b/app/Transformers/Api/Application/LocationTransformer.php @@ -9,8 +9,6 @@ class LocationTransformer extends BaseTransformer { /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = ['nodes', 'servers']; diff --git a/app/Transformers/Api/Application/NestTransformer.php b/app/Transformers/Api/Application/NestTransformer.php index 29f9559ae..1274901a7 100644 --- a/app/Transformers/Api/Application/NestTransformer.php +++ b/app/Transformers/Api/Application/NestTransformer.php @@ -11,8 +11,6 @@ class NestTransformer extends BaseTransformer { /** * Relationships that can be loaded onto this transformation. - * - * @var array */ protected array $availableIncludes = [ 'eggs', 'servers', diff --git a/app/Transformers/Api/Application/NodeTransformer.php b/app/Transformers/Api/Application/NodeTransformer.php index fc7d9c0f0..c7c1fc93b 100644 --- a/app/Transformers/Api/Application/NodeTransformer.php +++ b/app/Transformers/Api/Application/NodeTransformer.php @@ -9,8 +9,6 @@ class NodeTransformer extends BaseTransformer { /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = ['allocations', 'location', 'servers']; diff --git a/app/Transformers/Api/Application/ServerDatabaseTransformer.php b/app/Transformers/Api/Application/ServerDatabaseTransformer.php index 58de97a63..4e425c9e4 100644 --- a/app/Transformers/Api/Application/ServerDatabaseTransformer.php +++ b/app/Transformers/Api/Application/ServerDatabaseTransformer.php @@ -9,9 +9,6 @@ use Illuminate\Contracts\Encryption\Encrypter; class ServerDatabaseTransformer extends BaseTransformer { - /** - * @var array - */ protected array $availableIncludes = ['password', 'host']; /** diff --git a/app/Transformers/Api/Application/ServerTransformer.php b/app/Transformers/Api/Application/ServerTransformer.php index b96c0aa6b..33110ec7e 100644 --- a/app/Transformers/Api/Application/ServerTransformer.php +++ b/app/Transformers/Api/Application/ServerTransformer.php @@ -15,8 +15,6 @@ class ServerTransformer extends BaseTransformer /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = [ 'allocations', diff --git a/app/Transformers/Api/Application/ServerVariableTransformer.php b/app/Transformers/Api/Application/ServerVariableTransformer.php index 28d065048..2b1d68876 100644 --- a/app/Transformers/Api/Application/ServerVariableTransformer.php +++ b/app/Transformers/Api/Application/ServerVariableTransformer.php @@ -9,8 +9,6 @@ class ServerVariableTransformer extends BaseTransformer { /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = ['parent']; diff --git a/app/Transformers/Api/Application/SubuserTransformer.php b/app/Transformers/Api/Application/SubuserTransformer.php index 7ce9eba3c..c7b8abd9e 100644 --- a/app/Transformers/Api/Application/SubuserTransformer.php +++ b/app/Transformers/Api/Application/SubuserTransformer.php @@ -9,8 +9,6 @@ class SubuserTransformer extends BaseTransformer { /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = ['user', 'server']; diff --git a/app/Transformers/Api/Application/UserTransformer.php b/app/Transformers/Api/Application/UserTransformer.php index 8202512fe..9e2769a13 100644 --- a/app/Transformers/Api/Application/UserTransformer.php +++ b/app/Transformers/Api/Application/UserTransformer.php @@ -9,8 +9,6 @@ class UserTransformer extends BaseTransformer { /** * List of resources that can be included. - * - * @var array */ protected array $availableIncludes = ['servers']; diff --git a/app/Transformers/Api/Client/ScheduleTransformer.php b/app/Transformers/Api/Client/ScheduleTransformer.php index 3f42234b2..07dbf77cb 100644 --- a/app/Transformers/Api/Client/ScheduleTransformer.php +++ b/app/Transformers/Api/Client/ScheduleTransformer.php @@ -8,14 +8,8 @@ use Illuminate\Database\Eloquent\Model; class ScheduleTransformer extends BaseClientTransformer { - /** - * @var array - */ protected array $availableIncludes = ['tasks']; - /** - * @var array - */ protected array $defaultIncludes = ['tasks']; /** diff --git a/app/Transformers/Api/Client/ServerTransformer.php b/app/Transformers/Api/Client/ServerTransformer.php index 1e4412b91..583ccab68 100644 --- a/app/Transformers/Api/Client/ServerTransformer.php +++ b/app/Transformers/Api/Client/ServerTransformer.php @@ -18,9 +18,6 @@ class ServerTransformer extends BaseClientTransformer */ protected array $defaultIncludes = ['allocations', 'variables']; - /** - * @var array - */ protected array $availableIncludes = ['egg', 'subusers']; public function getResourceName(): string diff --git a/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php b/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php index 22f941807..33f6069a5 100644 --- a/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php +++ b/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php @@ -89,6 +89,7 @@ abstract class ClientApiIntegrationTestCase extends IntegrationTestCase * is assumed that the user is actually a subuser of the server. * * @param string[] $permissions + * * @return array{\Pterodactyl\Models\User, \Pterodactyl\Models\Server} */ protected function generateTestAccount(array $permissions = []): array