mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-13 06:24:43 -05:00
Various code cleanup.
This commit is contained in:
@@ -84,6 +84,7 @@ class PiggyBank extends Model
|
||||
return $this->currentRep;
|
||||
}
|
||||
// repeating piggy banks are no longer supported.
|
||||
/** @var PiggyBankRepetition $rep */
|
||||
$rep = $this->piggyBankRepetitions()->first(['piggy_bank_repetitions.*']);
|
||||
if (is_null($rep)) {
|
||||
return new PiggyBankRepetition();
|
||||
|
||||
@@ -140,6 +140,14 @@ class TransactionJournal extends Model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function destinationJournalLinks(): HasMany
|
||||
{
|
||||
return $this->hasMany(TransactionJournalLink::class, 'destination_id');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param $value
|
||||
@@ -379,13 +387,6 @@ class TransactionJournal extends Model
|
||||
{
|
||||
return $this->hasMany(TransactionJournalLink::class, 'source_id');
|
||||
}
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function destinationJournalLinks(): HasMany
|
||||
{
|
||||
return $this->hasMany(TransactionJournalLink::class, 'destination_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
|
||||
Reference in New Issue
Block a user