Code quality update.

This commit is contained in:
James Cole
2018-07-07 21:17:46 +02:00
parent cbe47a9dcc
commit e78a59a8a8
26 changed files with 236 additions and 185 deletions

View File

@@ -56,10 +56,11 @@ class ReportHelper implements ReportHelperInterface
* This method generates a full report for the given period on all
* the users bills and their payments.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly 5.
*
* Excludes bills which have not had a payment on the mentioned accounts.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
@@ -82,6 +83,7 @@ class ReportHelper implements ReportHelperInterface
foreach ($expectedDates as $payDate) {
$endOfPayPeriod = app('navigation')->endOfX($payDate, $bill->repeat_freq, null);
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
$collector->setAccounts($accounts)->setRange($payDate, $endOfPayPeriod)->setBills($bills);
$journals = $collector->getJournals();