Clean up code and comments.

This commit is contained in:
James Cole
2023-02-22 18:14:14 +01:00
parent e6dc881f56
commit e421b29b01
249 changed files with 647 additions and 1044 deletions

View File

@@ -39,7 +39,7 @@ use Validator;
class DestroyController extends Controller
{
private CurrencyRepositoryInterface $repository;
private UserRepositoryInterface $userRepository;
private UserRepositoryInterface $userRepository;
/**
* CurrencyRepository constructor.
@@ -51,7 +51,7 @@ class DestroyController extends Controller
parent::__construct();
$this->middleware(
function ($request, $next) {
$this->repository = app(CurrencyRepositoryInterface::class);
$this->repository = app(CurrencyRepositoryInterface::class);
$this->userRepository = app(UserRepositoryInterface::class);
$this->repository->setUser(auth()->user());
@@ -70,7 +70,6 @@ class DestroyController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function destroy(TransactionCurrency $currency): JsonResponse
{

View File

@@ -41,7 +41,6 @@ use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\AccountTransformer;
@@ -67,6 +66,7 @@ class ListController extends Controller
use TransactionFilter;
private CurrencyRepositoryInterface $repository;
/**
* CurrencyRepository constructor.
*
@@ -77,7 +77,7 @@ class ListController extends Controller
parent::__construct();
$this->middleware(
function ($request, $next) {
$this->repository = app(CurrencyRepositoryInterface::class);
$this->repository = app(CurrencyRepositoryInterface::class);
$this->repository->setUser(auth()->user());
return $next($request);
@@ -95,7 +95,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function accounts(Request $request, TransactionCurrency $currency): JsonResponse
{
@@ -149,7 +148,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function availableBudgets(TransactionCurrency $currency): JsonResponse
{
@@ -188,7 +186,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function bills(TransactionCurrency $currency): JsonResponse
{
@@ -232,7 +229,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function budgetLimits(TransactionCurrency $currency): JsonResponse
{
@@ -267,7 +263,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function recurrences(TransactionCurrency $currency): JsonResponse
{
@@ -320,7 +315,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function rules(TransactionCurrency $currency): JsonResponse
{
@@ -374,7 +368,6 @@ class ListController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
{

View File

@@ -75,7 +75,6 @@ class ShowController extends Controller
* @return JsonResponse
* @throws FireflyException
* @throws JsonException
*/
public function index(): JsonResponse
{
@@ -111,7 +110,6 @@ class ShowController extends Controller
* @return JsonResponse
* @throws FireflyException
* @throws JsonException
*/
public function show(TransactionCurrency $currency): JsonResponse
{
@@ -137,7 +135,6 @@ class ShowController extends Controller
* @return JsonResponse
* @throws FireflyException
* @throws JsonException
*/
public function showDefault(): JsonResponse
{

View File

@@ -29,7 +29,6 @@ use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\UpdateRequest;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\CurrencyTransformer;
@@ -76,7 +75,6 @@ class UpdateController extends Controller
* @return JsonResponse
* @throws FireflyException
* @throws JsonException
*/
public function disable(TransactionCurrency $currency): JsonResponse
{
@@ -109,7 +107,6 @@ class UpdateController extends Controller
*
* @return JsonResponse
* @throws FireflyException
*/
public function makeDefault(TransactionCurrency $currency): JsonResponse
{
@@ -142,7 +139,6 @@ class UpdateController extends Controller
* @return JsonResponse
* @throws FireflyException
* @throws JsonException
*/
public function enable(TransactionCurrency $currency): JsonResponse
{