diff --git a/app/Http/Controllers/Server/ServerController.php b/app/Http/Controllers/Server/ServerController.php index c2a597928..c1514e334 100644 --- a/app/Http/Controllers/Server/ServerController.php +++ b/app/Http/Controllers/Server/ServerController.php @@ -24,7 +24,6 @@ namespace Pterodactyl\Http\Controllers\Server; -use DB; use Log; use Uuid; use Alert; diff --git a/app/Models/ServiceVariable.php b/app/Models/ServiceVariable.php index 7e35e48dc..0e7746312 100644 --- a/app/Models/ServiceVariable.php +++ b/app/Models/ServiceVariable.php @@ -42,16 +42,15 @@ class ServiceVariable extends Model */ protected $guarded = ['id', 'created_at', 'updated_at']; - /** - * Cast values to correct type. - * - * @var array - */ + /** + * Cast values to correct type. + * + * @var array + */ protected $casts = [ 'option_id' => 'integer', 'user_viewable' => 'integer', 'user_editable' => 'integer', - 'required' => 'integer', ]; /** @@ -62,7 +61,7 @@ class ServiceVariable extends Model */ public function getRequiredAttribute($value) { - return ($this->rules === 'required' || str_contains($this->rules, ['required|', '|required'])); + return $this->rules === 'required' || str_contains($this->rules, ['required|', '|required']); } /** diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 478bddc11..51806042c 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -643,7 +643,7 @@ class ServerRepository if ($validator->fails()) { throw new DisplayValidationException(json_encode( collect([ - 'notice' => ['There was a validation error with the `' . $variable->name . '` variable.'] + 'notice' => ['There was a validation error with the `' . $variable->name . '` variable.'], ])->merge($validator->errors()->toArray()) )); }