Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -54,6 +54,16 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
$this->user->piggyBanks()->delete();
}
/**
* @param int $piggyBankId
*
* @return PiggyBank|null
*/
public function find(int $piggyBankId): ?PiggyBank
{
return $this->user->piggyBanks()->find($piggyBankId);
}
/**
* Find by name or return NULL.
*
@@ -66,16 +76,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
return $this->user->piggyBanks()->where('piggy_banks.name', $name)->first(['piggy_banks.*']);
}
/**
* @param int $piggyBankId
*
* @return PiggyBank|null
*/
public function find(int $piggyBankId): ?PiggyBank
{
return $this->user->piggyBanks()->find($piggyBankId);
}
/**
* @param int|null $piggyBankId
* @param string|null $piggyBankName
@@ -302,6 +302,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
$currentAmount = $this->getRepetition($piggy)->currentamount ?? '0';
$piggy->name = $piggy->name . ' (' . app('amount')->formatAnything($currency, $currentAmount, false) . ')';
}
return $set;
}