mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Code cleanup.
This commit is contained in:
@@ -36,25 +36,28 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class AuditLogEntry
|
||||
*
|
||||
* @property-read Model|Eloquent $auditable
|
||||
* @property-read Model|Eloquent $changer
|
||||
* @method static Builder|AuditLogEntry newModelQuery()
|
||||
* @method static Builder|AuditLogEntry newQuery()
|
||||
* @property \Eloquent|Model $auditable
|
||||
* @property \Eloquent|Model $changer
|
||||
*
|
||||
* @method static Builder|AuditLogEntry newModelQuery()
|
||||
* @method static Builder|AuditLogEntry newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry onlyTrashed()
|
||||
* @method static Builder|AuditLogEntry query()
|
||||
* @method static Builder|AuditLogEntry query()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withoutTrashed()
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property int $auditable_id
|
||||
* @property string $auditable_type
|
||||
* @property int $changer_id
|
||||
* @property string $changer_type
|
||||
* @property string $action
|
||||
* @property array|null $before
|
||||
* @property array|null $after
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $auditable_id
|
||||
* @property string $auditable_type
|
||||
* @property int $changer_id
|
||||
* @property string $changer_type
|
||||
* @property string $action
|
||||
* @property null|array $before
|
||||
* @property null|array $after
|
||||
*
|
||||
* @method static Builder|AuditLogEntry whereAction($value)
|
||||
* @method static Builder|AuditLogEntry whereAfter($value)
|
||||
* @method static Builder|AuditLogEntry whereAuditableId($value)
|
||||
@@ -66,6 +69,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static Builder|AuditLogEntry whereDeletedAt($value)
|
||||
* @method static Builder|AuditLogEntry whereId($value)
|
||||
* @method static Builder|AuditLogEntry whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class AuditLogEntry extends Model
|
||||
@@ -82,39 +86,27 @@ class AuditLogEntry extends Model
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
*/
|
||||
public function auditable(): MorphTo
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public function changer(): MorphTo
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function auditableId(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn($value) => (int)$value,
|
||||
get: static fn ($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function changerId(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn($value) => (int)$value,
|
||||
get: static fn ($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user