Apply fixes from StyleCI (#581)
This commit is contained in:
parent
b8d7d99096
commit
340193c013
15 changed files with 165 additions and 166 deletions
|
@ -42,53 +42,53 @@ class ServerVariable extends Model
|
|||
*/
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Cast values to correct type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
/**
|
||||
* Cast values to correct type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'server_id' => 'integer',
|
||||
'variable_id' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if variable is viewable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanViewAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_viewable;
|
||||
}
|
||||
/**
|
||||
* Determine if variable is viewable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanViewAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_viewable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if variable is editable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanEditAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_editable;
|
||||
}
|
||||
/**
|
||||
* Determine if variable is editable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanEditAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_editable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if variable is required.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getRequiredAttribute()
|
||||
{
|
||||
return $this->variable->required;
|
||||
}
|
||||
/**
|
||||
* Determine if variable is required.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getRequiredAttribute()
|
||||
{
|
||||
return $this->variable->required;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about a given variables parent.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function variable()
|
||||
{
|
||||
return $this->belongsTo(ServiceVariable::class, 'variable_id');
|
||||
}
|
||||
/**
|
||||
* Returns information about a given variables parent.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function variable()
|
||||
{
|
||||
return $this->belongsTo(ServiceVariable::class, 'variable_id');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue