mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Some code cleanup [skip ci]
This commit is contained in:
parent
48b169c026
commit
89ac27ad10
@ -115,7 +115,7 @@ class CategoryController extends Controller
|
||||
*/
|
||||
public function index(CRI $repository, SCRI $singleRepository)
|
||||
{
|
||||
$categories = $repository->listCategories();
|
||||
$categories = $repository->getCategories();
|
||||
|
||||
$categories->each(
|
||||
function (Category $category) use ($singleRepository) {
|
||||
|
@ -165,7 +165,7 @@ class JsonController extends Controller
|
||||
*/
|
||||
public function categories(CRI $repository)
|
||||
{
|
||||
$list = $repository->listCategories();
|
||||
$list = $repository->getCategories();
|
||||
$return = [];
|
||||
foreach ($list as $entry) {
|
||||
$return[] = $entry->name;
|
||||
|
@ -9,6 +9,8 @@ use FireflyIII\Helpers\Report\ReportHelperInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Preferences;
|
||||
@ -132,10 +134,6 @@ class ReportController extends Controller
|
||||
case 'audit':
|
||||
// always default
|
||||
return $this->auditReport($start, $end, $accounts);
|
||||
case 'meta-history':
|
||||
// always default
|
||||
return $this->metaHistoryReport($start, $end, $accounts);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -274,7 +272,7 @@ class ReportController extends Controller
|
||||
$expenseTopLength = 8;
|
||||
// list of users stuff:
|
||||
$budgets = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface')->getActiveBudgets();
|
||||
$categories = app('FireflyIII\Repositories\Category\CategoryRepositoryInterface')->listCategories();
|
||||
$categories = app('FireflyIII\Repositories\Category\CategoryRepositoryInterface')->getCategories();
|
||||
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts);
|
||||
$incomes = $this->helper->getIncomeReport($start, $end, $accounts);
|
||||
$expenses = $this->helper->getExpenseReport($start, $end, $accounts);
|
||||
@ -335,6 +333,4 @@ class ReportController extends Controller
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function listCategories(): Collection
|
||||
public function getCategories(): Collection
|
||||
{
|
||||
/** @var Collection $set */
|
||||
$set = $this->user->categories()->orderBy('name', 'ASC')->get();
|
||||
|
@ -33,7 +33,7 @@ interface CategoryRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function listCategories(): Collection;
|
||||
public function getCategories(): Collection;
|
||||
|
||||
/**
|
||||
* This method returns a very special collection for each category:
|
||||
|
@ -24,7 +24,6 @@
|
||||
<select name="report_type" class="form-control" id="inputReportType">
|
||||
<option selected label="{{ 'report_type_default'|_ }}" value="default">{{ 'report_type_default'|_ }}</option>
|
||||
<option label="{{ 'report_type_audit'|_ }}" value="audit">{{ 'report_type_audit'|_ }}</option>
|
||||
<option label="{{ 'report_type_meta-history'|_ }}" value="meta-history">{{ 'report_type_meta-history'|_ }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user