mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Merge pull request #7068 from firefly-iii/cleanup-comments
Cleanup comments
This commit is contained in:
@@ -209,7 +209,7 @@ class ReconcileController extends Controller
|
||||
*
|
||||
* @return RedirectResponse|Redirector|string
|
||||
* @throws DuplicateTransactionException
|
||||
*
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function createReconciliation(Account $account, Carbon $start, Carbon $end, string $difference)
|
||||
{
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Update\UpdateTrait;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
@@ -63,7 +62,6 @@ class UpdateController extends Controller
|
||||
* Show page with update options.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -36,6 +36,8 @@ use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class UserController.
|
||||
@@ -142,6 +144,8 @@ class UserController extends Controller
|
||||
* Show index of user manager.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
@@ -109,7 +109,6 @@ class ForgotPasswordController extends Controller
|
||||
/**
|
||||
* Show form for email recovery.
|
||||
*
|
||||
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
|
@@ -81,7 +81,6 @@ class LoginController extends Controller
|
||||
/**
|
||||
* Handle a login request to the application.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @throws ValidationException
|
||||
*/
|
||||
|
@@ -144,7 +144,6 @@ class RegisterController extends Controller
|
||||
/**
|
||||
* Show the application registration form if the invitation code is valid.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\Bill;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Attachment;
|
||||
@@ -126,7 +125,6 @@ class ShowController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -37,7 +37,6 @@ use FireflyIII\Support\Http\Controllers\PeriodOverview;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
@@ -83,7 +82,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -121,7 +119,6 @@ class ShowController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -151,8 +148,6 @@ class ShowController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -190,7 +185,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Category;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
@@ -69,7 +68,6 @@ class IndexController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -34,7 +34,6 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
@@ -81,7 +80,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -126,7 +124,6 @@ class ShowController extends Controller
|
||||
* @param Category $category
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -180,7 +180,6 @@ class AccountController extends Controller
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function expenseBudgetAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
|
||||
{
|
||||
@@ -255,7 +254,6 @@ class AccountController extends Controller
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function expenseCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
|
||||
{
|
||||
@@ -356,7 +354,6 @@ class AccountController extends Controller
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function incomeCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
|
||||
{
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Chart;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\Chart;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
@@ -98,7 +97,6 @@ class TransactionController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function categories(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -152,7 +150,6 @@ class TransactionController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -206,7 +203,6 @@ class TransactionController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -326,7 +326,6 @@ class CurrencyController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -81,6 +81,7 @@ class DebugController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function flush(Request $request)
|
||||
{
|
||||
|
@@ -51,7 +51,6 @@ class JavascriptController extends Controller
|
||||
* @param CurrencyRepositoryInterface $currencyRepository
|
||||
*
|
||||
* @return Response
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -42,6 +42,7 @@ class FrontpageController extends Controller
|
||||
* @param PiggyBankRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function piggyBanks(PiggyBankRepositoryInterface $repository): JsonResponse
|
||||
{
|
||||
|
@@ -31,8 +31,6 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -46,7 +44,7 @@ use Throwable;
|
||||
*/
|
||||
class ReconcileController extends Controller
|
||||
{
|
||||
private AccountRepositoryInterface $accountRepos;
|
||||
private AccountRepositoryInterface $accountRepos;
|
||||
|
||||
/**
|
||||
* ReconcileController constructor.
|
||||
@@ -62,7 +60,7 @@ class ReconcileController extends Controller
|
||||
function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-credit-card');
|
||||
app('view')->share('title', (string)trans('firefly.accounts'));
|
||||
$this->accountRepos = app(AccountRepositoryInterface::class);
|
||||
$this->accountRepos = app(AccountRepositoryInterface::class);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ class RecurrenceController extends Controller
|
||||
*/
|
||||
public function events(Request $request): JsonResponse
|
||||
{
|
||||
$occurrences = [];
|
||||
$occurrences = [];
|
||||
$return = [];
|
||||
$start = Carbon::createFromFormat('Y-m-d', $request->get('start'));
|
||||
$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
|
||||
|
@@ -41,6 +41,7 @@ class RuleController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function action(Request $request): JsonResponse
|
||||
{
|
||||
@@ -67,6 +68,7 @@ class RuleController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function trigger(Request $request): JsonResponse
|
||||
{
|
||||
|
@@ -25,12 +25,14 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\PiggyBank;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Transformers\PiggyBankTransformer;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,8 @@ class ShowController extends Controller
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function show(PiggyBank $piggyBank)
|
||||
{
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Popup;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Support\Http\Controllers\RenderPartialViews;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -42,7 +43,7 @@ class ReportController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function general(Request $request): JsonResponse
|
||||
{
|
||||
|
@@ -95,8 +95,8 @@ class PreferencesController extends Controller
|
||||
}
|
||||
ksort($groupedAccounts);
|
||||
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
$viewRange = app('navigation')->getViewRange(false);
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
$viewRange = app('navigation')->getViewRange(false);
|
||||
$frontPageAccounts = app('preferences')->get('frontPageAccounts', $accountIds);
|
||||
$language = app('steam')->getLanguage();
|
||||
$languages = config('firefly.languages');
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use DB;
|
||||
use Exception;
|
||||
use FireflyIII\Events\UserChangedEmail;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Exceptions\ValidationException;
|
||||
@@ -216,7 +217,6 @@ class ProfileController extends Controller
|
||||
/**
|
||||
* Delete 2FA routine.
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
*/
|
||||
public function deleteCode(Request $request): RedirectResponse|Redirector
|
||||
{
|
||||
@@ -245,7 +245,6 @@ class ProfileController extends Controller
|
||||
/**
|
||||
* Enable 2FA screen.
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
*/
|
||||
public function enable2FA(Request $request): RedirectResponse|Redirector
|
||||
{
|
||||
@@ -643,7 +642,7 @@ class ProfileController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
* @throws FireflyException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function regenerate(Request $request)
|
||||
{
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Recurring;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\TriggerRecurrenceRequest;
|
||||
use FireflyIII\Jobs\CreateRecurringTransactions;
|
||||
|
@@ -45,6 +45,7 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -67,6 +67,7 @@ class BalanceController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -43,6 +43,7 @@ class BillController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function overview(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{ // chart properties for cache:
|
||||
|
@@ -74,6 +74,8 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function accountPerBudget(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -155,6 +157,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgExpenses(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -276,6 +279,8 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -301,7 +306,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws JsonException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -365,6 +370,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topExpenses(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -36,7 +36,6 @@ use FireflyIII\Support\Report\Category\CategoryReportGenerator;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -278,6 +277,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgExpenses(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -330,6 +330,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -491,7 +492,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws JsonException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -572,7 +573,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws JsonException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
@@ -650,6 +651,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
@@ -691,6 +693,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topExpenses(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -741,6 +744,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -77,6 +77,7 @@ class DoubleController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgExpenses(Collection $accounts, Collection $doubles, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -129,6 +130,7 @@ class DoubleController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgIncome(Collection $accounts, Collection $doubles, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -425,6 +427,7 @@ class DoubleController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topExpenses(Collection $accounts, Collection $doubles, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -475,6 +478,7 @@ class DoubleController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topIncome(Collection $accounts, Collection $doubles, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -67,6 +67,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -102,6 +103,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
@@ -137,6 +139,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -270,6 +270,7 @@ class TagController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgExpenses(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -322,6 +323,7 @@ class TagController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function avgIncome(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -482,6 +484,7 @@ class TagController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topExpenses(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -532,6 +535,7 @@ class TagController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function topIncome(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -265,7 +265,6 @@ class ReportController extends Controller
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -309,7 +308,7 @@ class ReportController extends Controller
|
||||
* @param string $reportType
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function options(string $reportType)
|
||||
{
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Rule;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\RuleFormRequest;
|
||||
use FireflyIII\Models\Bill;
|
||||
@@ -77,6 +78,7 @@ class CreateController extends Controller
|
||||
* @param RuleGroup|null $ruleGroup
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function create(Request $request, RuleGroup $ruleGroup = null)
|
||||
{
|
||||
@@ -139,6 +141,7 @@ class CreateController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function createFromBill(Request $request, Bill $bill)
|
||||
{
|
||||
@@ -190,6 +193,7 @@ class CreateController extends Controller
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return Factory|\Illuminate\Contracts\View\View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function createFromJournal(Request $request, TransactionJournal $journal)
|
||||
{
|
||||
|
@@ -78,6 +78,7 @@ class EditController extends Controller
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function edit(Request $request, Rule $rule)
|
||||
{
|
||||
@@ -142,6 +143,7 @@ class EditController extends Controller
|
||||
* @param array $submittedOperators
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function parseFromOperators(array $submittedOperators): array
|
||||
{
|
||||
|
@@ -132,7 +132,7 @@ class SelectController extends Controller
|
||||
* @param TestRuleFormRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function testTriggers(TestRuleFormRequest $request): JsonResponse
|
||||
{
|
||||
@@ -194,7 +194,7 @@ class SelectController extends Controller
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function testTriggersByRule(Rule $rule): JsonResponse
|
||||
{
|
||||
|
@@ -103,6 +103,7 @@ class SearchController extends Controller
|
||||
* @param SearchInterface $searcher
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function search(Request $request, SearchInterface $searcher): JsonResponse
|
||||
{
|
||||
|
@@ -280,7 +280,6 @@ class TagController extends Controller
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -134,7 +134,6 @@ class IndexController extends Controller
|
||||
* @param string $objectType
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -108,7 +108,7 @@ class MassController extends Controller
|
||||
Log::debug(sprintf('Searching for ID #%d', $journalId));
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $this->repository->find((int)$journalId);
|
||||
if (null !== $journal && (int)$journalId === (int) $journal->id) {
|
||||
if (null !== $journal && (int)$journalId === (int)$journal->id) {
|
||||
$this->repository->destroyJournal($journal);
|
||||
++$count;
|
||||
Log::debug(sprintf('Deleted transaction journal #%d', $journalId));
|
||||
@@ -239,7 +239,6 @@ class MassController extends Controller
|
||||
* @param string $key
|
||||
*
|
||||
* @return Carbon|null
|
||||
|
||||
*/
|
||||
private function getDateFromRequest(MassEditJournalRequest $request, int $journalId, string $key): ?Carbon
|
||||
{
|
||||
@@ -267,7 +266,6 @@ class MassController extends Controller
|
||||
* @param string $string
|
||||
*
|
||||
* @return string|null
|
||||
|
||||
*/
|
||||
private function getStringFromRequest(MassEditJournalRequest $request, int $journalId, string $string): ?string
|
||||
{
|
||||
@@ -288,7 +286,6 @@ class MassController extends Controller
|
||||
* @param string $string
|
||||
*
|
||||
* @return int|null
|
||||
|
||||
*/
|
||||
private function getIntFromRequest(MassEditJournalRequest $request, int $journalId, string $string): ?int
|
||||
{
|
||||
|
@@ -25,10 +25,9 @@ namespace FireflyIII\Http\Controllers\Webhooks;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
/**
|
||||
* Class DeleteController
|
||||
@@ -62,7 +61,7 @@ class DeleteController extends Controller
|
||||
*
|
||||
* @param Webhook $webhook
|
||||
*
|
||||
* @return Factory|RedirectResponse|Redirector|View
|
||||
* @return Factory|Application|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
|
@@ -25,10 +25,9 @@ namespace FireflyIII\Http\Controllers\Webhooks;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
/**
|
||||
* Class EditController
|
||||
@@ -61,7 +60,7 @@ class EditController extends Controller
|
||||
*
|
||||
* @param Webhook $webhook
|
||||
*
|
||||
* @return Factory|RedirectResponse|Redirector|View
|
||||
* @return Factory|Application|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Webhooks;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -59,7 +58,6 @@ class IndexController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
@@ -25,10 +25,9 @@ namespace FireflyIII\Http\Controllers\Webhooks;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -61,7 +60,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* @param Webhook $webhook
|
||||
*
|
||||
* @return Factory|RedirectResponse|Redirector|View
|
||||
* @return Factory|Application|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
|
@@ -179,14 +179,14 @@ class Kernel extends HttpKernel
|
||||
],
|
||||
|
||||
// full API authentication
|
||||
'api' => [
|
||||
'api' => [
|
||||
AcceptHeaders::class,
|
||||
EnsureFrontendRequestsAreStateful::class,
|
||||
'auth:api,sanctum',
|
||||
'bindings',
|
||||
],
|
||||
// do only bindings, no auth
|
||||
'api_basic' => [
|
||||
'api_basic' => [
|
||||
AcceptHeaders::class,
|
||||
'bindings',
|
||||
],
|
||||
|
@@ -35,7 +35,6 @@ use Log;
|
||||
/**
|
||||
* Class Installer
|
||||
*
|
||||
|
||||
*
|
||||
*/
|
||||
class Installer
|
||||
|
@@ -139,6 +139,7 @@ class AccountFormRequest extends FormRequest
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the validator instance with special rules for after the basic validation rules.
|
||||
*
|
||||
|
@@ -30,7 +30,6 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
/**
|
||||
|
||||
* Class BudgetFormStoreRequest
|
||||
*/
|
||||
class BudgetFormStoreRequest extends FormRequest
|
||||
|
@@ -31,7 +31,6 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
/**
|
||||
|
||||
* Class BudgetFormUpdateRequest
|
||||
*/
|
||||
class BudgetFormUpdateRequest extends FormRequest
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\CategoryFactory;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
@@ -188,7 +187,6 @@ class RecurrenceFormRequest extends FormRequest
|
||||
* The rules for this request.
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*
|
||||
*/
|
||||
public function rules(): array
|
||||
@@ -313,20 +311,20 @@ class RecurrenceFormRequest extends FormRequest
|
||||
|
||||
// TODO typeOverrule: the account validator may have another opinion the transaction type.
|
||||
// TODO either use 'withdrawal' or the strtolower() variant, not both.
|
||||
$type = $this->convertString('transaction_type');
|
||||
$type = $this->convertString('transaction_type');
|
||||
$throwError = true;
|
||||
if ('withdrawal' === $type) {
|
||||
$throwError = false;
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['source_id'];
|
||||
$destinationId = (int)$data['withdrawal_destination_id'];
|
||||
}
|
||||
if ('deposit' === $type) {
|
||||
$throwError = false;
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['deposit_source_id'];
|
||||
$destinationId = (int)$data['destination_id'];
|
||||
}
|
||||
if ('transfer' === $type) {
|
||||
$throwError = false;
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['source_id'];
|
||||
$destinationId = (int)$data['destination_id'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user