mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-06 01:45:22 +00:00
Various code cleanup.
This commit is contained in:
@@ -457,7 +457,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$name = $data['name'];
|
||||
$opposing = $this->storeOpposingAccount($name);
|
||||
$transactionType = TransactionType::whereType(TransactionType::OPENING_BALANCE)->first();
|
||||
$journal = TransactionJournal::create(
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = TransactionJournal::create(
|
||||
[
|
||||
'user_id' => $this->user->id,
|
||||
'transaction_type_id' => $transactionType->id,
|
||||
|
||||
@@ -525,8 +525,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
*/
|
||||
public function store(array $data): Bill
|
||||
{
|
||||
|
||||
|
||||
/** @var Bill $bill */
|
||||
$bill = Bill::create(
|
||||
[
|
||||
'name' => $data['name'],
|
||||
|
||||
@@ -193,6 +193,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
*/
|
||||
public function store(array $data): TransactionCurrency
|
||||
{
|
||||
/** @var TransactionCurrency $currency */
|
||||
$currency = TransactionCurrency::create(
|
||||
[
|
||||
'name' => $data['name'],
|
||||
|
||||
@@ -40,6 +40,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*/
|
||||
public function createEvent(PiggyBank $piggyBank, string $amount): PiggyBankEvent
|
||||
{
|
||||
/** @var PiggyBankEvent $event */
|
||||
$event = PiggyBankEvent::create(['date' => Carbon::now(), 'amount' => $amount, 'piggy_bank_id' => $piggyBank->id]);
|
||||
|
||||
return $event;
|
||||
@@ -173,7 +174,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
public function store(array $data): PiggyBank
|
||||
{
|
||||
$data['order'] = $this->getMaxOrder() + 1;
|
||||
$piggyBank = PiggyBank::create($data);
|
||||
/** @var PiggyBank $piggyBank */
|
||||
$piggyBank = PiggyBank::create($data);
|
||||
|
||||
$this->updateNote($piggyBank, $data['note']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user