php-cs-fixer and phpstan
This commit is contained in:
parent
363c4fd49f
commit
7ed2be50fd
25 changed files with 102 additions and 109 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
|
@ -19,7 +19,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||
* @property \Carbon\CarbonImmutable $updated_at
|
||||
* @property bool $required
|
||||
* @property Egg $egg
|
||||
* @property ServerVariable $serverVariable
|
||||
* @property ServerVariable $serverVariables
|
||||
* @property string $field_type
|
||||
*
|
||||
* The "server_value" variable is only present on the object if you've loaded this model
|
||||
|
@ -81,15 +81,18 @@ class EggVariable extends Model
|
|||
return in_array('required', explode('|', $this->rules));
|
||||
}
|
||||
|
||||
public function egg(): HasOne
|
||||
/**
|
||||
* Returns the egg that this variable belongs to.
|
||||
*/
|
||||
public function egg(): BelongsTo
|
||||
{
|
||||
return $this->hasOne(Egg::class);
|
||||
return $this->belongsTo(Egg::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server variables associated with this variable.
|
||||
*/
|
||||
public function serverVariable(): HasMany
|
||||
public function serverVariables(): HasMany
|
||||
{
|
||||
return $this->hasMany(ServerVariable::class, 'variable_id');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue