StyleCI fixes
This commit is contained in:
parent
668dc9216a
commit
2d90187c83
3 changed files with 7 additions and 9 deletions
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Http\Controllers\Server;
|
namespace Pterodactyl\Http\Controllers\Server;
|
||||||
|
|
||||||
use DB;
|
|
||||||
use Log;
|
use Log;
|
||||||
use Uuid;
|
use Uuid;
|
||||||
use Alert;
|
use Alert;
|
||||||
|
|
|
@ -42,16 +42,15 @@ class ServiceVariable extends Model
|
||||||
*/
|
*/
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cast values to correct type.
|
* Cast values to correct type.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'option_id' => 'integer',
|
'option_id' => 'integer',
|
||||||
'user_viewable' => 'integer',
|
'user_viewable' => 'integer',
|
||||||
'user_editable' => 'integer',
|
'user_editable' => 'integer',
|
||||||
'required' => 'integer',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,7 +61,7 @@ class ServiceVariable extends Model
|
||||||
*/
|
*/
|
||||||
public function getRequiredAttribute($value)
|
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()) {
|
if ($validator->fails()) {
|
||||||
throw new DisplayValidationException(json_encode(
|
throw new DisplayValidationException(json_encode(
|
||||||
collect([
|
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())
|
])->merge($validator->errors()->toArray())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue