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

@@ -157,7 +157,7 @@ class BillRepository implements BillRepositoryInterface
$currencyId = $bill->transaction_currency_id;
$average = bcdiv(bcadd($bill->amount_max, $bill->amount_min), '2');
$nativeAverage = $converter->convert($currency, $default, $start, $average);
$return[$currencyId] ??= [
$return[$currencyId] ??= [
'currency_id' => (string)$currency->id,
'currency_name' => $currency->name,
'currency_symbol' => $currency->symbol,

View File

@@ -35,13 +35,6 @@ use Illuminate\Support\Collection;
*/
interface BillRepositoryInterface
{
/**
* @param User $user
*
* @return void
*/
public function setUser(User $user): void;
/**
* TODO duplicate of other repos
* Add correct order to bills.
@@ -84,6 +77,13 @@ interface BillRepositoryInterface
*/
public function nextDateMatch(Bill $bill, Carbon $date): Carbon;
/**
* @param User $user
*
* @return void
*/
public function setUser(User $user): void;
/**
* Collect multi-currency of sum of bills already paid.
*