mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Refactor phpstan errors.
This commit is contained in:
@@ -78,19 +78,17 @@ class AccountMeta extends Model
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
public function getDataAttribute($value): string
|
||||
public function getDataAttribute(mixed $value): string
|
||||
{
|
||||
return (string)json_decode($value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
|
||||
*/
|
||||
public function setDataAttribute($value): void
|
||||
public function setDataAttribute(mixed $value): void
|
||||
{
|
||||
$this->attributes['data'] = json_encode($value);
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Carbon;
|
||||
@@ -145,7 +146,7 @@ class PiggyBank extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the piggy bank's notes.
|
||||
* Get all the piggy bank's notes.
|
||||
*/
|
||||
public function notes(): MorphMany
|
||||
{
|
||||
@@ -155,7 +156,7 @@ class PiggyBank extends Model
|
||||
/**
|
||||
* Get all the tags for the post.
|
||||
*/
|
||||
public function objectGroups()
|
||||
public function objectGroups(): MorphToMany
|
||||
{
|
||||
return $this->morphToMany(ObjectGroup::class, 'object_groupable');
|
||||
}
|
||||
|
Reference in New Issue
Block a user