Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:54:58 +02:00
parent 815fd5ff6b
commit d60650cff2
63 changed files with 134 additions and 88 deletions

View File

@@ -275,7 +275,6 @@ trait AccountServiceTrait
* @param string $currencyCode
*
* @return TransactionCurrency
* @throws JsonException
*/
protected function getCurrency(int $currencyId, string $currencyCode): TransactionCurrency
{

View File

@@ -49,7 +49,6 @@ trait BillServiceTrait
return;
}
$ruleIds = $bill->user->rules()->get(['id'])->pluck('id')->toArray();
/** @var Collection $set */
$set = RuleAction::whereIn('rule_id', $ruleIds)
->where('action_type', 'link_to_bill')
->where('action_value', $oldName)->get();

View File

@@ -194,7 +194,7 @@ trait JournalServiceTrait
* @param array $data
* @param string $preferredType
*
* @return Account
* @return Account|null
* @throws FireflyException
*/
private function createAccount(?Account $account, array $data, string $preferredType): ?Account
@@ -302,7 +302,7 @@ trait JournalServiceTrait
/**
* @param string|null $amount
*
* @return string
* @return string|null
* @codeCoverageIgnore
*/
protected function getForeignAmount(?string $amount): ?string
@@ -372,7 +372,7 @@ trait JournalServiceTrait
/**
* @param TransactionJournal $journal
* @param string $notes
* @param string|null $notes
*
* @codeCoverageIgnore
*/
@@ -405,7 +405,7 @@ trait JournalServiceTrait
* Link tags to journal.
*
* @param TransactionJournal $journal
* @param array $tags
* @param array|null $tags
*
* @codeCoverageIgnore
*/

View File

@@ -257,6 +257,8 @@ trait RecurringTransactionTrait
/**
* @param RecurrenceTransaction $transaction
* @param int $categoryId
*
* @throws FireflyException
*/
private function setCategory(RecurrenceTransaction $transaction, int $categoryId): void
{