mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Refactor phpstan errors.
This commit is contained in:
@@ -38,8 +38,6 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class ShowController extends Controller
|
||||
{
|
||||
use ConvertsExchangeRates;
|
||||
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
@@ -69,7 +67,6 @@ class ShowController extends Controller
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
//$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
@@ -83,7 +80,6 @@ class ShowController extends Controller
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
// $converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
@@ -36,8 +36,6 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class SumController extends Controller
|
||||
{
|
||||
use ConvertsExchangeRates;
|
||||
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
@@ -65,12 +63,10 @@ class SumController extends Controller
|
||||
*/
|
||||
public function budgeted(DateRequest $request): JsonResponse
|
||||
{
|
||||
throw new FireflyException('Needs refactoring, uses deprecated method.');
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->budgetedInPeriod($data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($converted);
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,11 +79,9 @@ class SumController extends Controller
|
||||
*/
|
||||
public function spent(DateRequest $request): JsonResponse
|
||||
{
|
||||
throw new FireflyException('Needs refactoring, uses deprecated method.');
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->spentInPeriod($data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($converted);
|
||||
return response()->json($result);
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@ use Illuminate\Http\JsonResponse;
|
||||
class NetWorthController extends Controller
|
||||
{
|
||||
use ValidatesUserGroupTrait;
|
||||
use ConvertsExchangeRates;
|
||||
|
||||
private NetWorthInterface $netWorth;
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
Reference in New Issue
Block a user