php-cs-fixer and phpstan

This commit is contained in:
Matthew Penner 2022-12-14 18:04:16 -07:00
parent 363c4fd49f
commit 7ed2be50fd
No known key found for this signature in database
25 changed files with 102 additions and 109 deletions

View file

@ -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');
}