chore: code cleanup.

This commit is contained in:
James Cole
2023-05-29 13:56:55 +02:00
parent 7f7644c92f
commit 1b52147a05
295 changed files with 12418 additions and 12324 deletions

View File

@@ -71,6 +71,28 @@ class ExchangeRateSeeder extends Seeder
}
}
/**
* @param User $user
* @param TransactionCurrency $from
* @param TransactionCurrency $to
* @param string $date
* @param float $rate
* @return void
*/
private function addRate(User $user, TransactionCurrency $from, TransactionCurrency $to, string $date, float $rate): void
{
/** @var User $user */
CurrencyExchangeRate::create(
[
'user_id' => $user->id,
'from_currency_id' => $from->id,
'to_currency_id' => $to->id,
'date' => $date,
'rate' => $rate,
]
);
}
/**
* @param string $code
* @return TransactionCurrency|null
@@ -95,26 +117,4 @@ class ExchangeRateSeeder extends Seeder
->where('date', $date)
->count() > 0;
}
/**
* @param User $user
* @param TransactionCurrency $from
* @param TransactionCurrency $to
* @param string $date
* @param float $rate
* @return void
*/
private function addRate(User $user, TransactionCurrency $from, TransactionCurrency $to, string $date, float $rate): void
{
/** @var User $user */
CurrencyExchangeRate::create(
[
'user_id' => $user->id,
'from_currency_id' => $from->id,
'to_currency_id' => $to->id,
'date' => $date,
'rate' => $rate,
]
);
}
}