forked from Alex/Pterodactyl-Panel
StyleCI fixes
This commit is contained in:
parent
668dc9216a
commit
2d90187c83
@ -24,7 +24,6 @@
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\Server;
|
||||
|
||||
use DB;
|
||||
use Log;
|
||||
use Uuid;
|
||||
use Alert;
|
||||
|
@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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())
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user