Code clean up.

This commit is contained in:
James Cole
2017-11-15 10:52:29 +01:00
parent aee17221eb
commit 649dca77f5
305 changed files with 1200 additions and 1600 deletions

View File

@@ -114,7 +114,10 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$balanceEntry = new BalanceEntry;
$balanceEntry->setAccount($account);
$spent = $this->budgetRepository->spentInPeriod(
new Collection([$budgetLimit->budget]), new Collection([$account]), $budgetLimit->start_date, $budgetLimit->end_date
new Collection([$budgetLimit->budget]),
new Collection([$account]),
$budgetLimit->start_date,
$budgetLimit->end_date
);
$balanceEntry->setSpent($spent);
$line->addBalanceEntry($balanceEntry);
@@ -142,7 +145,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$budgetEntry->setAccount($account);
$budgetEntry->setSpent($spent);
$empty->addBalanceEntry($budgetEntry);
}
return $empty;
@@ -176,7 +178,5 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$balance->setBalanceLines($newSet);
return $balance;
}
}

View File

@@ -27,7 +27,6 @@ use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Balance;
use Illuminate\Support\Collection;
/**
* Interface BalanceReportHelperInterface
*

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
@@ -163,6 +162,5 @@ class BudgetReportHelper implements BudgetReportHelperInterface
$array['expenses'] = $expenses;
return $array;
}
}

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use Illuminate\Support\Collection;
@@ -52,5 +51,4 @@ interface BudgetReportHelperInterface
* @return Collection
*/
public function getBudgetsWithExpenses(Carbon $start, Carbon $end, Collection $accounts): Collection;
}

View File

@@ -153,5 +153,4 @@ class ReportHelper implements ReportHelperInterface
return $months;
}
}

View File

@@ -57,5 +57,4 @@ interface ReportHelperInterface
* @return array
*/
public function listOfMonths(Carbon $date): array;
}