This should remove some issues from scrutinizer.

This commit is contained in:
James Cole
2016-12-06 16:55:13 +01:00
parent 6a58dbb207
commit cca2de9f1b
2 changed files with 19 additions and 19 deletions

View File

@@ -34,25 +34,25 @@ class BudgetEventHandler
/** /**
* This method creates a new budget limit repetition when a new budget limit has been created. * This method creates a new budget limit repetition when a new budget limit has been created.
* *
* @param StoredBudgetLimit $event * @param StoredBudgetLimit $budgetLimitEvent
* *
* @return bool * @return bool
*/ */
public function storeRepetition(StoredBudgetLimit $event):bool public function storeRepetition(StoredBudgetLimit $budgetLimitEvent):bool
{ {
return $this->processRepetitionChange($event->budgetLimit, $event->end); return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end);
} }
/** /**
* Updates, if present the budget limit repetition part of a budget limit. * Updates, if present the budget limit repetition part of a budget limit.
* *
* @param UpdatedBudgetLimit $event * @param UpdatedBudgetLimit $budgetLimitEvent
* *
* @return bool * @return bool
*/ */
public function updateRepetition(UpdatedBudgetLimit $event): bool public function updateRepetition(UpdatedBudgetLimit $budgetLimitEvent): bool
{ {
return $this->processRepetitionChange($event->budgetLimit, $event->end); return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end);
} }
/** /**

View File

@@ -33,15 +33,15 @@ class StoredJournalEventHandler
/** /**
* This method connects a new transfer to a piggy bank. * This method connects a new transfer to a piggy bank.
* *
* @param StoredTransactionJournal $event * @param StoredTransactionJournal $storedJournalEvent
* *
* @return bool * @return bool
*/ */
public function connectToPiggyBank(StoredTransactionJournal $event): bool public function connectToPiggyBank(StoredTransactionJournal $storedJournalEvent): bool
{ {
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = $event->journal; $journal = $storedJournalEvent->journal;
$piggyBankId = $event->piggyBankId; $piggyBankId = $storedJournalEvent->piggyBankId;
Log::debug(sprintf('Trying to connect journal %d to piggy bank %d.', $journal->id, $piggyBankId)); Log::debug(sprintf('Trying to connect journal %d to piggy bank %d.', $journal->id, $piggyBankId));
@@ -101,11 +101,11 @@ class StoredJournalEventHandler
$repetition->currentamount = bcadd($repetition->currentamount, $amount); $repetition->currentamount = bcadd($repetition->currentamount, $amount);
$repetition->save(); $repetition->save();
/** @var PiggyBankEvent $event */ /** @var PiggyBankEvent $storedJournalEvent */
$event = PiggyBankEvent::create( $storedJournalEvent = PiggyBankEvent::create(
['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount] ['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount]
); );
Log::debug(sprintf('Created piggy bank event #%d', $event->id)); Log::debug(sprintf('Created piggy bank event #%d', $storedJournalEvent->id));
return true; return true;
} }
@@ -113,14 +113,14 @@ class StoredJournalEventHandler
/** /**
* This method grabs all the users rules and processes them. * This method grabs all the users rules and processes them.
* *
* @param StoredTransactionJournal $event * @param StoredTransactionJournal $storedJournalEvent
* *
* @return bool * @return bool
*/ */
public function processRules(StoredTransactionJournal $event): bool public function processRules(StoredTransactionJournal $storedJournalEvent): bool
{ {
// get all the user's rule groups, with the rules, order by 'order'. // get all the user's rule groups, with the rules, order by 'order'.
$journal = $event->journal; $journal = $storedJournalEvent->journal;
$groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get(); $groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
// //
/** @var RuleGroup $group */ /** @var RuleGroup $group */
@@ -150,13 +150,13 @@ class StoredJournalEventHandler
/** /**
* This method calls a special bill scanner that will check if the stored journal is part of a bill. * This method calls a special bill scanner that will check if the stored journal is part of a bill.
* *
* @param StoredTransactionJournal $event * @param StoredTransactionJournal $storedJournalEvent
* *
* @return bool * @return bool
*/ */
public function scanBills(StoredTransactionJournal $event): bool public function scanBills(StoredTransactionJournal $storedJournalEvent): bool
{ {
$journal = $event->journal; $journal = $storedJournalEvent->journal;
BillScanner::scan($journal); BillScanner::scan($journal);
return true; return true;