Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:51:59 +01:00
parent c2b22a2bac
commit 46e130fdfe
195 changed files with 973 additions and 984 deletions

View File

@@ -23,7 +23,9 @@ declare(strict_types=1);
namespace FireflyIII\Models;
use Carbon\Carbon;
use Eloquent;
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
@@ -33,9 +35,8 @@ use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
use Carbon\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
/**
* FireflyIII\Models\PiggyBank
*
@@ -43,12 +44,12 @@ use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int $account_id
* @property int $account_id
* @property string $name
* @property string $targetamount
* @property Carbon|null $startdate
* @property Carbon|null $targetdate
* @property int $order
* @property int $order
* @property bool $active
* @property bool $encrypted
* @property-read Account $account
@@ -182,18 +183,6 @@ class PiggyBank extends Model
$this->attributes['targetamount'] = (string)$value;
}
/**
* Get the max amount
*
* @return Attribute
*/
protected function targetamount(): Attribute
{
return Attribute::make(
get: static fn ($value) => (string)$value,
);
}
/**
* @return Attribute
*/
@@ -214,4 +203,16 @@ class PiggyBank extends Model
);
}
/**
* Get the max amount
*
* @return Attribute
*/
protected function targetamount(): Attribute
{
return Attribute::make(
get: static fn($value) => (string)$value,
);
}
}