mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Clean up code.
This commit is contained in:
@@ -160,7 +160,7 @@ class UpgradeLiabilitiesEight extends Command
|
||||
|
||||
/**
|
||||
* @param $account
|
||||
* @return void
|
||||
* @return int
|
||||
*/
|
||||
private function deleteTransactions($account): int
|
||||
{
|
||||
@@ -279,9 +279,9 @@ class UpgradeLiabilitiesEight extends Command
|
||||
->where('transactions.account_id', $account->id)
|
||||
->where('transaction_journals.transaction_type_id', $openingBalanceType->id)
|
||||
->first(['transaction_journals.*']);
|
||||
/** @var Transaction $source */
|
||||
/** @var Transaction|null $source */
|
||||
$source = $openingJournal->transactions()->where('amount', '<', 0)->first();
|
||||
/** @var Transaction $dest */
|
||||
/** @var Transaction|null $dest */
|
||||
$dest = $openingJournal->transactions()->where('amount', '>', 0)->first();
|
||||
if ($source && $dest) {
|
||||
$sourceId = $source->account_id;
|
||||
|
Reference in New Issue
Block a user