diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 71d80119a4..40b7b68eaf 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -103,31 +103,6 @@ class ReportHelper implements ReportHelperInterface return $collection; } - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return CategoryCollection - */ - public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection - { - $object = new CategoryCollection; - /** @var CategoryRepositoryInterface $repository */ - $repository = app(CategoryRepositoryInterface::class); - $categories = $repository->getCategories(); - - /** @var Category $category */ - foreach ($categories as $category) { - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); - // CategoryCollection expects the amount in $spent: - $category->spent = $spent; - $object->addCategory($category); - } - - return $object; - } - /** * @param Carbon $date * diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index 6e7343629d..9124821593 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -42,15 +42,6 @@ interface ReportHelperInterface */ public function getBillReport(Carbon $start, Carbon $end, Collection $accounts): BillCollection; - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return CategoryCollection - */ - public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection; - /** * @param Carbon $date *