mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Various code cleanup.
This commit is contained in:
@@ -24,6 +24,7 @@ namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* Class PiggyBankEvent.
|
||||
@@ -47,22 +48,16 @@ class PiggyBankEvent extends Model
|
||||
'updated_at' => 'datetime',
|
||||
'date' => 'date',
|
||||
];
|
||||
/** @var array */
|
||||
protected $dates = ['date'];
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array Fields that can be filled */
|
||||
protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array Hidden from view */
|
||||
protected $hidden = ['amount_encrypted'];
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function piggyBank(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
public function piggyBank(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PiggyBank::class);
|
||||
}
|
||||
@@ -79,9 +74,9 @@ class PiggyBankEvent extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function transactionJournal(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
public function transactionJournal(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TransactionJournal::class);
|
||||
}
|
||||
|
Reference in New Issue
Block a user