mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various code cleanup.
This commit is contained in:
parent
3589c9f60f
commit
e829d79589
@ -95,8 +95,9 @@ class TransactionJournalFactory
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
* @throws FireflyException
|
|
||||||
* @throws DuplicateTransactionException
|
* @throws DuplicateTransactionException
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function create(array $data): Collection
|
public function create(array $data): Collection
|
||||||
{
|
{
|
||||||
@ -388,15 +389,11 @@ class TransactionJournalFactory
|
|||||||
private function getCurrencyByAccount(string $type, ?TransactionCurrency $currency, Account $source, Account $destination): TransactionCurrency
|
private function getCurrencyByAccount(string $type, ?TransactionCurrency $currency, Account $source, Account $destination): TransactionCurrency
|
||||||
{
|
{
|
||||||
Log::debug('Now ingetCurrencyByAccount()');
|
Log::debug('Now ingetCurrencyByAccount()');
|
||||||
switch ($type) {
|
|
||||||
default:
|
|
||||||
case TransactionType::WITHDRAWAL:
|
|
||||||
case TransactionType::TRANSFER:
|
|
||||||
return $this->getCurrency($currency, $source);
|
|
||||||
case TransactionType::DEPOSIT:
|
|
||||||
return $this->getCurrency($currency, $destination);
|
|
||||||
|
|
||||||
}
|
return match ($type) {
|
||||||
|
default => $this->getCurrency($currency, $source),
|
||||||
|
TransactionType::DEPOSIT => $this->getCurrency($currency, $destination),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,7 +48,6 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
* Generates the report.
|
* Generates the report.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* @throws FireflyException
|
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function generate(): string
|
public function generate(): string
|
||||||
@ -195,7 +194,8 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
#[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string",
|
#[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string",
|
||||||
'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array
|
'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Handlers\Events;
|
namespace FireflyIII\Handlers\Events;
|
||||||
|
|
||||||
|
|
||||||
use FireflyIII\Events\StoredAccount;
|
|
||||||
use FireflyIII\Events\UpdatedAccount;
|
use FireflyIII\Events\UpdatedAccount;
|
||||||
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
|
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class UserEventHandler
|
|||||||
* @param Login $event
|
* @param Login $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function demoUserBackToEnglish(Login $event): bool
|
public function demoUserBackToEnglish(Login $event): bool
|
||||||
{
|
{
|
||||||
@ -136,7 +136,7 @@ class UserEventHandler
|
|||||||
/**
|
/**
|
||||||
* @param DetectedNewIPAddress $event
|
* @param DetectedNewIPAddress $event
|
||||||
*
|
*
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function notifyNewIPAddress(DetectedNewIPAddress $event): void
|
public function notifyNewIPAddress(DetectedNewIPAddress $event): void
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ class UserEventHandler
|
|||||||
* @param UserChangedEmail $event
|
* @param UserChangedEmail $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool
|
public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool
|
||||||
{
|
{
|
||||||
@ -204,7 +204,7 @@ class UserEventHandler
|
|||||||
* @param UserChangedEmail $event
|
* @param UserChangedEmail $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function sendEmailChangeUndoMail(UserChangedEmail $event): bool
|
public function sendEmailChangeUndoMail(UserChangedEmail $event): bool
|
||||||
{
|
{
|
||||||
@ -286,7 +286,7 @@ class UserEventHandler
|
|||||||
* @param RegisteredUser $event
|
* @param RegisteredUser $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function sendRegistrationMail(RegisteredUser $event): bool
|
public function sendRegistrationMail(RegisteredUser $event): bool
|
||||||
{
|
{
|
||||||
@ -319,7 +319,7 @@ class UserEventHandler
|
|||||||
/**
|
/**
|
||||||
* @param Login $event
|
* @param Login $event
|
||||||
*
|
*
|
||||||
* @throws \FireflyIII\Exceptions\FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function storeUserIPAddress(Login $event): void
|
public function storeUserIPAddress(Login $event): void
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Helpers\Update\UpdateTrait;
|
use FireflyIII\Helpers\Update\UpdateTrait;
|
||||||
use FireflyIII\Models\Configuration;
|
use FireflyIII\Models\Configuration;
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use FireflyIII\User;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,6 +67,7 @@ class FiscalHelper implements FiscalHelperInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return Carbon date object
|
* @return Carbon date object
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function startOfFiscalYear(Carbon $date): Carbon
|
public function startOfFiscalYear(Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
|
@ -62,6 +62,7 @@ class NetWorth implements NetWorthInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array
|
public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array
|
||||||
{
|
{
|
||||||
|
@ -135,6 +135,7 @@ class CreateController extends Controller
|
|||||||
* @param AccountFormRequest $request
|
* @param AccountFormRequest $request
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function store(AccountFormRequest $request)
|
public function store(AccountFormRequest $request)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +72,7 @@ class IndexController extends Controller
|
|||||||
* @param string $objectType
|
* @param string $objectType
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function inactive(Request $request, string $objectType)
|
public function inactive(Request $request, string $objectType)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +53,7 @@ class HomeController extends Controller
|
|||||||
* Index of the admin.
|
* Index of the admin.
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
@ -31,8 +31,6 @@ use Illuminate\Http\RedirectResponse;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Routing\Redirector;
|
use Illuminate\Routing\Redirector;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class HomeController.
|
* Class HomeController.
|
||||||
|
@ -194,7 +194,7 @@ class LoginController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|Response|View
|
* @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Routing\Redirector|RedirectResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function showLoginForm(Request $request)
|
public function showLoginForm(Request $request)
|
||||||
|
@ -78,7 +78,7 @@ class RegisterController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|RedirectResponse|Redirector|View
|
* @return \Illuminate\Contracts\Foundation\Application|Redirector|RedirectResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
|
@ -29,11 +29,9 @@ use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
|||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Http\Requests\BillStoreRequest;
|
use FireflyIII\Http\Requests\BillStoreRequest;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\View\View;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,11 +29,9 @@ use FireflyIII\Http\Controllers\Controller;
|
|||||||
use FireflyIII\Http\Requests\BillUpdateRequest;
|
use FireflyIII\Http\Requests\BillUpdateRequest;
|
||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\View\View;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class EditController
|
* Class EditController
|
||||||
|
@ -24,10 +24,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers\Bill;
|
namespace FireflyIII\Http\Controllers\Bill;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\ObjectGroup\OrganisesObjectGroups;
|
use FireflyIII\Repositories\ObjectGroup\OrganisesObjectGroups;
|
||||||
use FireflyIII\Transformers\BillTransformer;
|
use FireflyIII\Transformers\BillTransformer;
|
||||||
@ -145,6 +143,7 @@ class IndexController extends Controller
|
|||||||
* @param array $bills
|
* @param array $bills
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
private function getSums(array $bills): array
|
private function getSums(array $bills): array
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Controllers\Bill;
|
namespace FireflyIII\Http\Controllers\Bill;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Attachment;
|
use FireflyIII\Models\Attachment;
|
||||||
@ -124,6 +123,7 @@ class ShowController extends Controller
|
|||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, Bill $bill)
|
public function show(Request $request, Bill $bill)
|
||||||
{
|
{
|
||||||
|
@ -133,7 +133,7 @@ class AvailableBudgetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AvailableBudget $availableBudget
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
*/
|
*/
|
||||||
|
@ -90,6 +90,7 @@ class IndexController extends Controller
|
|||||||
* @param Carbon|null $end
|
* @param Carbon|null $end
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(Request $request, Carbon $start = null, Carbon $end = null)
|
public function index(Request $request, Carbon $start = null, Carbon $end = null)
|
||||||
{
|
{
|
||||||
|
@ -78,6 +78,7 @@ class ShowController extends Controller
|
|||||||
* @param Carbon|null $end
|
* @param Carbon|null $end
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function noBudget(Request $request, Carbon $start = null, Carbon $end = null)
|
public function noBudget(Request $request, Carbon $start = null, Carbon $end = null)
|
||||||
{
|
{
|
||||||
@ -113,6 +114,7 @@ class ShowController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function noBudgetAll(Request $request)
|
public function noBudgetAll(Request $request)
|
||||||
{
|
{
|
||||||
@ -141,6 +143,7 @@ class ShowController extends Controller
|
|||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, Budget $budget)
|
public function show(Request $request, Budget $budget)
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,7 @@ class IndexController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -74,6 +74,7 @@ class NoCategoryController extends Controller
|
|||||||
* @param Carbon|null $end
|
* @param Carbon|null $end
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, Carbon $start = null, Carbon $end = null)
|
public function show(Request $request, Carbon $start = null, Carbon $end = null)
|
||||||
{
|
{
|
||||||
@ -111,6 +112,7 @@ class NoCategoryController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function showAll(Request $request)
|
public function showAll(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -76,6 +76,7 @@ class ShowController extends Controller
|
|||||||
* @param Carbon|null $end
|
* @param Carbon|null $end
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null)
|
public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null)
|
||||||
{
|
{
|
||||||
@ -115,6 +116,7 @@ class ShowController extends Controller
|
|||||||
* @param Category $category
|
* @param Category $category
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function showAll(Request $request, Category $category)
|
public function showAll(Request $request, Category $category)
|
||||||
{
|
{
|
||||||
|
@ -83,6 +83,7 @@ class AccountController extends Controller
|
|||||||
* This chart is (multi) currency aware.
|
* This chart is (multi) currency aware.
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseAccounts(): JsonResponse
|
public function expenseAccounts(): JsonResponse
|
||||||
{
|
{
|
||||||
@ -194,6 +195,7 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse
|
public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -268,6 +270,7 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -322,6 +325,7 @@ class AccountController extends Controller
|
|||||||
* @param AccountRepositoryInterface $repository
|
* @param AccountRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function frontpage(AccountRepositoryInterface $repository): JsonResponse
|
public function frontpage(AccountRepositoryInterface $repository): JsonResponse
|
||||||
{
|
{
|
||||||
@ -364,6 +368,7 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -421,6 +426,8 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
|
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -458,6 +465,8 @@ class AccountController extends Controller
|
|||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array
|
private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array
|
||||||
{
|
{
|
||||||
@ -528,6 +537,7 @@ class AccountController extends Controller
|
|||||||
* This chart is multi-currency aware.
|
* This chart is multi-currency aware.
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function revenueAccounts(): JsonResponse
|
public function revenueAccounts(): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,7 @@ class BillController extends Controller
|
|||||||
* @param BillRepositoryInterface $repository
|
* @param BillRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function frontpage(BillRepositoryInterface $repository): JsonResponse
|
public function frontpage(BillRepositoryInterface $repository): JsonResponse
|
||||||
{
|
{
|
||||||
@ -102,6 +103,7 @@ class BillController extends Controller
|
|||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function single(Bill $bill): JsonResponse
|
public function single(Bill $bill): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,7 @@ class BudgetController extends Controller
|
|||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function budget(Budget $budget): JsonResponse
|
public function budget(Budget $budget): JsonResponse
|
||||||
{
|
{
|
||||||
@ -152,6 +153,7 @@ class BudgetController extends Controller
|
|||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||||
{
|
{
|
||||||
@ -202,6 +204,7 @@ class BudgetController extends Controller
|
|||||||
* @param BudgetLimit|null $budgetLimit
|
* @param BudgetLimit|null $budgetLimit
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||||
{
|
{
|
||||||
@ -270,6 +273,7 @@ class BudgetController extends Controller
|
|||||||
* @param BudgetLimit|null $budgetLimit
|
* @param BudgetLimit|null $budgetLimit
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||||
{
|
{
|
||||||
@ -334,6 +338,7 @@ class BudgetController extends Controller
|
|||||||
* @param BudgetLimit|null $budgetLimit
|
* @param BudgetLimit|null $budgetLimit
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||||
{
|
{
|
||||||
@ -397,7 +402,7 @@ class BudgetController extends Controller
|
|||||||
* Shows a budget list with spent/left/overspent.
|
* Shows a budget list with spent/left/overspent.
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function frontpage(): JsonResponse
|
public function frontpage(): JsonResponse
|
||||||
{
|
{
|
||||||
@ -435,6 +440,7 @@ class BudgetController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -510,6 +516,7 @@ class BudgetController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -63,11 +63,13 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show an overview for a category for all time, per month/week/year.
|
* Show an overview for a category for all time, per month/week/year.
|
||||||
* See reference nr. 59
|
* See reference nr. 59
|
||||||
*
|
*
|
||||||
* @param Category $category
|
* @param Category $category
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function all(Category $category): JsonResponse
|
public function all(Category $category): JsonResponse
|
||||||
{
|
{
|
||||||
@ -111,9 +113,10 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the category chart on the front page.
|
* Shows the category chart on the front page.
|
||||||
* See reference nr. 60
|
* See reference nr. 60
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function frontPage(): JsonResponse
|
public function frontPage(): JsonResponse
|
||||||
{
|
{
|
||||||
@ -138,7 +141,7 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart report.
|
* Chart report.
|
||||||
* See reference nr. 61
|
* See reference nr. 61
|
||||||
*
|
*
|
||||||
* @param Category $category
|
* @param Category $category
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
@ -146,6 +149,7 @@ class CategoryController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -254,13 +258,14 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart for period for transactions without a category.
|
* Chart for period for transactions without a category.
|
||||||
* See reference nr. 62
|
* See reference nr. 62
|
||||||
*
|
*
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -281,12 +286,14 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart for a specific period.
|
* Chart for a specific period.
|
||||||
* See reference nr. 63
|
* See reference nr. 63
|
||||||
*
|
*
|
||||||
* @param Category $category
|
* @param Category $category
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function specificPeriod(Category $category, Carbon $date): JsonResponse
|
public function specificPeriod(Category $category, Carbon $date): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ class ExpenseReportController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Main chart that shows income and expense for a combination of expense/revenue accounts.
|
* Main chart that shows income and expense for a combination of expense/revenue accounts.
|
||||||
*
|
*
|
||||||
* See reference nr. 58
|
* See reference nr. 58
|
||||||
*
|
*
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
* @param Collection $expense
|
* @param Collection $expense
|
||||||
@ -77,7 +77,7 @@ class ExpenseReportController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse
|
public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,6 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
|||||||
use FireflyIII\Support\CacheProperties;
|
use FireflyIII\Support\CacheProperties;
|
||||||
use FireflyIII\Support\Http\Controllers\DateCalculation;
|
use FireflyIII\Support\Http\Controllers\DateCalculation;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PiggyBankController.
|
* Class PiggyBankController.
|
||||||
@ -58,13 +57,13 @@ class PiggyBankController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Shows the piggy bank history.
|
* Shows the piggy bank history.
|
||||||
*
|
*
|
||||||
* See reference nr. 53
|
* See reference nr. 53
|
||||||
*
|
*
|
||||||
* @param PiggyBankRepositoryInterface $repository
|
* @param PiggyBankRepositoryInterface $repository
|
||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
|
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -68,6 +68,7 @@ class ReportController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
@ -142,6 +143,7 @@ class ReportController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -56,6 +56,7 @@ class TransactionController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function budgets(Carbon $start, Carbon $end)
|
public function budgets(Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@ -100,6 +101,7 @@ class TransactionController extends Controller
|
|||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function categories(string $objectType, Carbon $start, Carbon $end)
|
public function categories(string $objectType, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@ -158,6 +160,7 @@ class TransactionController extends Controller
|
|||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
|
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@ -215,6 +218,7 @@ class TransactionController extends Controller
|
|||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
|
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -99,10 +99,10 @@ class CurrencyController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Make currency the default currency.
|
* Make currency the default currency.
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param TransactionCurrency $currency
|
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function defaultCurrency(Request $request)
|
public function defaultCurrency(Request $request)
|
||||||
{
|
{
|
||||||
@ -328,6 +328,7 @@ class CurrencyController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -67,9 +67,7 @@ class IndexController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LaravelResponse
|
* @return LaravelResponse
|
||||||
* @throws CannotInsertRecord
|
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
public function export(): LaravelResponse
|
public function export(): LaravelResponse
|
||||||
{
|
{
|
||||||
|
@ -35,6 +35,7 @@ class HelpController extends Controller
|
|||||||
* @param string $route
|
* @param string $route
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(string $route): JsonResponse
|
public function show(string $route): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -28,17 +28,12 @@ use FireflyIII\Events\RequestedVersionCheckStatus;
|
|||||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||||
use FireflyIII\Http\Middleware\Installer;
|
use FireflyIII\Http\Middleware\Installer;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\GroupMembership;
|
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Contracts\View\Factory;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\RedirectResponse;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Routing\Redirector;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\View\View;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,6 +46,7 @@ class JavascriptController extends Controller
|
|||||||
* @param CurrencyRepositoryInterface $currencyRepository
|
* @param CurrencyRepositoryInterface $currencyRepository
|
||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
|
public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
|
||||||
{
|
{
|
||||||
@ -128,6 +129,7 @@ class JavascriptController extends Controller
|
|||||||
* @param CurrencyRepositoryInterface $currencyRepository
|
* @param CurrencyRepositoryInterface $currencyRepository
|
||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
|
public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
|
||||||
{
|
{
|
||||||
|
@ -23,10 +23,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Controllers\Json;
|
namespace FireflyIII\Http\Controllers\Json;
|
||||||
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AutoCompleteController.
|
* Class AutoCompleteController.
|
||||||
|
@ -51,6 +51,7 @@ class BoxController extends Controller
|
|||||||
* 2) if the user has no available amount set this period: spent per day
|
* 2) if the user has no available amount set this period: spent per day
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function available(): JsonResponse
|
public function available(): JsonResponse
|
||||||
{
|
{
|
||||||
@ -129,6 +130,7 @@ class BoxController extends Controller
|
|||||||
* @param CurrencyRepositoryInterface $repository
|
* @param CurrencyRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function balance(CurrencyRepositoryInterface $repository): JsonResponse
|
public function balance(CurrencyRepositoryInterface $repository): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -103,6 +103,7 @@ class IntroController extends Controller
|
|||||||
* @param string|null $specialPage
|
* @param string|null $specialPage
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function postEnable(string $route, string $specialPage = null): JsonResponse
|
public function postEnable(string $route, string $specialPage = null): JsonResponse
|
||||||
{
|
{
|
||||||
@ -126,6 +127,7 @@ class IntroController extends Controller
|
|||||||
* @param string|null $specialPage
|
* @param string|null $specialPage
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function postFinished(string $route, string $specialPage = null): JsonResponse
|
public function postFinished(string $route, string $specialPage = null): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,8 @@ class ReconcileController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function transactions(Account $account, Carbon $start, Carbon $end)
|
public function transactions(Account $account, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +86,7 @@ class NewUserController extends Controller
|
|||||||
* @param CurrencyRepositoryInterface $currencyRepository
|
* @param CurrencyRepositoryInterface $currencyRepository
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function submit(NewUserFormRequest $request, CurrencyRepositoryInterface $currencyRepository)
|
public function submit(NewUserFormRequest $request, CurrencyRepositoryInterface $currencyRepository)
|
||||||
{
|
{
|
||||||
|
@ -27,11 +27,9 @@ namespace FireflyIII\Http\Controllers\ObjectGroup;
|
|||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\ObjectGroup;
|
use FireflyIII\Models\ObjectGroup;
|
||||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\View\View;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,26 +51,14 @@ class ReportController extends Controller
|
|||||||
app('view')->share('start', $attributes['startDate']);
|
app('view')->share('start', $attributes['startDate']);
|
||||||
app('view')->share('end', $attributes['endDate']);
|
app('view')->share('end', $attributes['endDate']);
|
||||||
|
|
||||||
switch ($attributes['location']) {
|
$html = match ($attributes['location']) {
|
||||||
default:
|
default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']),
|
||||||
$html = sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']);
|
'budget-spent-amount' => $this->budgetSpentAmount($attributes),
|
||||||
break;
|
'expense-entry' => $this->expenseEntry($attributes),
|
||||||
case 'budget-spent-amount':
|
'income-entry' => $this->incomeEntry($attributes),
|
||||||
$html = $this->budgetSpentAmount($attributes);
|
'category-entry' => $this->categoryEntry($attributes),
|
||||||
break;
|
'budget-entry' => $this->budgetEntry($attributes),
|
||||||
case 'expense-entry':
|
};
|
||||||
$html = $this->expenseEntry($attributes);
|
|
||||||
break;
|
|
||||||
case 'income-entry':
|
|
||||||
$html = $this->incomeEntry($attributes);
|
|
||||||
break;
|
|
||||||
case 'category-entry':
|
|
||||||
$html = $this->categoryEntry($attributes);
|
|
||||||
break;
|
|
||||||
case 'budget-entry':
|
|
||||||
$html = $this->budgetEntry($attributes);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return response()->json(['html' => $html]);
|
return response()->json(['html' => $html]);
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ class PreferencesController extends Controller
|
|||||||
* @param AccountRepositoryInterface $repository
|
* @param AccountRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(AccountRepositoryInterface $repository)
|
public function index(AccountRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
@ -144,7 +145,7 @@ class PreferencesController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
*
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function postIndex(Request $request)
|
public function postIndex(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -389,7 +389,10 @@ class ProfileController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function newBackupCodes(Request $request)
|
public function newBackupCodes(Request $request)
|
||||||
{
|
{
|
||||||
@ -506,6 +509,7 @@ class ProfileController extends Controller
|
|||||||
* @param TokenFormRequest $request
|
* @param TokenFormRequest $request
|
||||||
*
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function postCode(TokenFormRequest $request)
|
public function postCode(TokenFormRequest $request)
|
||||||
{
|
{
|
||||||
@ -657,9 +661,10 @@ class ProfileController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See reference nr. 64
|
* See reference nr. 64
|
||||||
*
|
*
|
||||||
* @param string $mfaCode
|
* @param string $mfaCode
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function addToMFAHistory(string $mfaCode): void
|
private function addToMFAHistory(string $mfaCode): void
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
*
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -307,6 +307,7 @@ class BudgetController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -488,6 +488,7 @@ class CategoryController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@ -568,6 +569,7 @@ class CategoryController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||||
{
|
{
|
||||||
@ -646,7 +648,7 @@ class CategoryController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
*
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@ -101,6 +102,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||||
{
|
{
|
||||||
@ -136,6 +138,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -260,6 +260,7 @@ class ReportController extends Controller
|
|||||||
* @param AccountRepositoryInterface $repository
|
* @param AccountRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(AccountRepositoryInterface $repository)
|
public function index(AccountRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
@ -305,23 +306,13 @@ class ReportController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function options(string $reportType)
|
public function options(string $reportType)
|
||||||
{
|
{
|
||||||
switch ($reportType) {
|
$result = match ($reportType) {
|
||||||
default:
|
default => $this->noReportOptions(),
|
||||||
$result = $this->noReportOptions();
|
'category' => $this->categoryReportOptions(),
|
||||||
break;
|
'budget' => $this->budgetReportOptions(),
|
||||||
case 'category':
|
'tag' => $this->tagReportOptions(),
|
||||||
$result = $this->categoryReportOptions();
|
'double' => $this->doubleReportOptions(),
|
||||||
break;
|
};
|
||||||
case 'budget':
|
|
||||||
$result = $this->budgetReportOptions();
|
|
||||||
break;
|
|
||||||
case 'tag':
|
|
||||||
$result = $this->tagReportOptions();
|
|
||||||
break;
|
|
||||||
case 'double':
|
|
||||||
$result = $this->doubleReportOptions();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return response()->json(['html' => $result]);
|
return response()->json(['html' => $result]);
|
||||||
}
|
}
|
||||||
@ -383,27 +374,14 @@ class ReportController extends Controller
|
|||||||
return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date'));
|
return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date'));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($reportType) {
|
$uri = match ($reportType) {
|
||||||
default:
|
default => route('reports.report.default', [$accounts, $start, $end]),
|
||||||
case 'default':
|
'category' => route('reports.report.category', [$accounts, $categories, $start, $end]),
|
||||||
$uri = route('reports.report.default', [$accounts, $start, $end]);
|
'audit' => route('reports.report.audit', [$accounts, $start, $end]),
|
||||||
break;
|
'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]),
|
||||||
case 'category':
|
'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]),
|
||||||
$uri = route('reports.report.category', [$accounts, $categories, $start, $end]);
|
'double' => route('reports.report.double', [$accounts, $double, $start, $end]),
|
||||||
break;
|
};
|
||||||
case 'audit':
|
|
||||||
$uri = route('reports.report.audit', [$accounts, $start, $end]);
|
|
||||||
break;
|
|
||||||
case 'budget':
|
|
||||||
$uri = route('reports.report.budget', [$accounts, $budgets, $start, $end]);
|
|
||||||
break;
|
|
||||||
case 'tag':
|
|
||||||
$uri = route('reports.report.tag', [$accounts, $tags, $start, $end]);
|
|
||||||
break;
|
|
||||||
case 'double':
|
|
||||||
$uri = route('reports.report.double', [$accounts, $double, $start, $end]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect($uri);
|
return redirect($uri);
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,12 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers\Rule;
|
namespace FireflyIII\Http\Controllers\Rule;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Rule;
|
use FireflyIII\Models\Rule;
|
||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Controllers\RuleManagement;
|
use FireflyIII\Support\Http\Controllers\RuleManagement;
|
||||||
use FireflyIII\User;
|
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
@ -272,7 +272,7 @@ class TagController extends Controller
|
|||||||
* @param Tag $tag
|
* @param Tag $tag
|
||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
*
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function showAll(Request $request, Tag $tag)
|
public function showAll(Request $request, Tag $tag)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,6 @@ use FireflyIII\Services\Internal\Update\GroupCloneService;
|
|||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Routing\Redirector;
|
use Illuminate\Routing\Redirector;
|
||||||
use Illuminate\View\View;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateController
|
* Class CreateController
|
||||||
@ -88,6 +87,7 @@ class CreateController extends Controller
|
|||||||
* @param string|null $objectType
|
* @param string|null $objectType
|
||||||
*
|
*
|
||||||
* @return Factory|\Illuminate\Contracts\View\View
|
* @return Factory|\Illuminate\Contracts\View\View
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function create(?string $objectType)
|
public function create(?string $objectType)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Middleware;
|
namespace FireflyIII\Http\Middleware;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Support\System\GeneratesInstallationId;
|
use FireflyIII\Support\System\GeneratesInstallationId;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
|
|
||||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||||
use Illuminate\Contracts\Config\Repository;
|
use Illuminate\Contracts\Config\Repository;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TrustProxies
|
* Class TrustProxies
|
||||||
|
@ -328,6 +328,8 @@ class CreateRecurringTransactions implements ShouldQueue
|
|||||||
* @param array $occurrences
|
* @param array $occurrences
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
|
* @throws DuplicateTransactionException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function handleOccurrences(Recurrence $recurrence, RecurrenceRepetition $repetition, array $occurrences): Collection
|
private function handleOccurrences(Recurrence $recurrence, RecurrenceRepetition $repetition, array $occurrences): Collection
|
||||||
{
|
{
|
||||||
|
@ -34,16 +34,16 @@ use Illuminate\Support\Carbon;
|
|||||||
/**
|
/**
|
||||||
* Class GroupMembership
|
* Class GroupMembership
|
||||||
*
|
*
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property Carbon|null $created_at
|
* @property Carbon|null $created_at
|
||||||
* @property Carbon|null $updated_at
|
* @property Carbon|null $updated_at
|
||||||
* @property string|null $deleted_at
|
* @property string|null $deleted_at
|
||||||
* @property int $user_id
|
* @property int $user_id
|
||||||
* @property int $user_group_id
|
* @property int $user_group_id
|
||||||
* @property int $user_role_id
|
* @property int $user_role_id
|
||||||
* @property-read User $user
|
* @property-read User $user
|
||||||
* @property-read \FireflyIII\Models\UserGroup $userGroup
|
* @property-read UserGroup $userGroup
|
||||||
* @property-read \FireflyIII\Models\UserRole $userRole
|
* @property-read UserRole $userRole
|
||||||
* @method static Builder|GroupMembership newModelQuery()
|
* @method static Builder|GroupMembership newModelQuery()
|
||||||
* @method static Builder|GroupMembership newQuery()
|
* @method static Builder|GroupMembership newQuery()
|
||||||
* @method static Builder|GroupMembership query()
|
* @method static Builder|GroupMembership query()
|
||||||
|
@ -156,7 +156,6 @@ class TransactionJournal extends Model
|
|||||||
* @param string $value
|
* @param string $value
|
||||||
*
|
*
|
||||||
* @return TransactionJournal
|
* @return TransactionJournal
|
||||||
* @throws FireflyException
|
|
||||||
* @throws NotFoundHttpException
|
* @throws NotFoundHttpException
|
||||||
*/
|
*/
|
||||||
public static function routeBinder(string $value): TransactionJournal
|
public static function routeBinder(string $value): TransactionJournal
|
||||||
|
@ -34,13 +34,13 @@ use Illuminate\Support\Carbon;
|
|||||||
/**
|
/**
|
||||||
* Class UserGroup
|
* Class UserGroup
|
||||||
*
|
*
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property Carbon|null $created_at
|
* @property Carbon|null $created_at
|
||||||
* @property Carbon|null $updated_at
|
* @property Carbon|null $updated_at
|
||||||
* @property string|null $deleted_at
|
* @property string|null $deleted_at
|
||||||
* @property string $title
|
* @property string $title
|
||||||
* @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships
|
* @property-read Collection|GroupMembership[] $groupMemberships
|
||||||
* @property-read int|null $group_memberships_count
|
* @property-read int|null $group_memberships_count
|
||||||
* @method static Builder|UserGroup newModelQuery()
|
* @method static Builder|UserGroup newModelQuery()
|
||||||
* @method static Builder|UserGroup newQuery()
|
* @method static Builder|UserGroup newQuery()
|
||||||
* @method static Builder|UserGroup query()
|
* @method static Builder|UserGroup query()
|
||||||
|
@ -34,13 +34,13 @@ use Illuminate\Support\Carbon;
|
|||||||
/**
|
/**
|
||||||
* Class UserRole
|
* Class UserRole
|
||||||
*
|
*
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property Carbon|null $created_at
|
* @property Carbon|null $created_at
|
||||||
* @property Carbon|null $updated_at
|
* @property Carbon|null $updated_at
|
||||||
* @property string|null $deleted_at
|
* @property string|null $deleted_at
|
||||||
* @property string $title
|
* @property string $title
|
||||||
* @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships
|
* @property-read Collection|GroupMembership[] $groupMemberships
|
||||||
* @property-read int|null $group_memberships_count
|
* @property-read int|null $group_memberships_count
|
||||||
* @method static Builder|UserRole newModelQuery()
|
* @method static Builder|UserRole newModelQuery()
|
||||||
* @method static Builder|UserRole newQuery()
|
* @method static Builder|UserRole newQuery()
|
||||||
* @method static Builder|UserRole query()
|
* @method static Builder|UserRole query()
|
||||||
|
@ -730,6 +730,8 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function update(Account $account, array $data): Account
|
public function update(Account $account, array $data): Account
|
||||||
{
|
{
|
||||||
|
@ -623,6 +623,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function nextDateMatch(Bill $bill, Carbon $date): Carbon
|
public function nextDateMatch(Bill $bill, Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
@ -651,6 +652,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon
|
public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,6 @@ use FireflyIII\Models\TransactionCurrency;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -309,6 +309,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return Category
|
* @return Category
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function update(Category $category, array $data): Category
|
public function update(Category $category, array $data): Category
|
||||||
{
|
{
|
||||||
|
@ -65,6 +65,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
|||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function currencyInUse(TransactionCurrency $currency): bool
|
public function currencyInUse(TransactionCurrency $currency): bool
|
||||||
{
|
{
|
||||||
|
@ -117,6 +117,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
|
|||||||
* @param string $field
|
* @param string $field
|
||||||
*
|
*
|
||||||
* @return null|Carbon
|
* @return null|Carbon
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getMetaDate(TransactionJournal $journal, string $field): ?Carbon
|
public function getMetaDate(TransactionJournal $journal, string $field): ?Carbon
|
||||||
{
|
{
|
||||||
@ -160,6 +161,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
|
|||||||
* @param string $field
|
* @param string $field
|
||||||
*
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getMetaField(TransactionJournal $journal, string $field): ?string
|
public function getMetaField(TransactionJournal $journal, string $field): ?string
|
||||||
{
|
{
|
||||||
|
@ -129,6 +129,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getJournalTotal(TransactionJournal $journal): string
|
public function getJournalTotal(TransactionJournal $journal): string
|
||||||
{
|
{
|
||||||
@ -185,6 +186,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param string $field
|
* @param string $field
|
||||||
*
|
*
|
||||||
* @return null|Carbon
|
* @return null|Carbon
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getMetaDateById(int $journalId, string $field): ?Carbon
|
public function getMetaDateById(int $journalId, string $field): ?Carbon
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Repositories\ObjectGroup;
|
namespace FireflyIII\Repositories\ObjectGroup;
|
||||||
|
|
||||||
use FireflyIII\Models\ObjectGroup;
|
use FireflyIII\Models\ObjectGroup;
|
||||||
use FireflyIII\User;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait CreatesObjectGroups
|
* Trait CreatesObjectGroups
|
||||||
|
@ -348,6 +348,7 @@ class UserRepository implements UserRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function update(User $user, array $data): User
|
public function update(User $user, array $data): User
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,8 @@ class IsValidBulkClause implements Rule
|
|||||||
/**
|
/**
|
||||||
* Does basic rule based validation.
|
* Does basic rule based validation.
|
||||||
*
|
*
|
||||||
|
* @param string $value
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function basicValidation(string $value): bool
|
private function basicValidation(string $value): bool
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Services\FireflyIIIOrg\Update;
|
namespace FireflyIII\Services\FireflyIIIOrg\Update;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Exception;
|
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
use JsonException;
|
use JsonException;
|
||||||
|
@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
|
|||||||
use DB;
|
use DB;
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BudgetDestroyService
|
* Class BudgetDestroyService
|
||||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
|
|||||||
use DB;
|
use DB;
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CategoryDestroyService
|
* Class CategoryDestroyService
|
||||||
|
@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CurrencyDestroyService
|
* Class CurrencyDestroyService
|
||||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Models\Recurrence;
|
use FireflyIII\Models\Recurrence;
|
||||||
use FireflyIII\Models\RecurrenceTransaction;
|
use FireflyIII\Models\RecurrenceTransaction;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
|
@ -39,7 +39,6 @@ use FireflyIII\Models\TransactionGroup;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
|
use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
|
||||||
use JsonException;
|
|
||||||
use Log;
|
use Log;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ use Exception;
|
|||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Models\Note;
|
use FireflyIII\Models\Note;
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -262,7 +262,7 @@ class CreditRecalculateService
|
|||||||
// if it's a credit, we don't care, because sending more money
|
// if it's a credit, we don't care, because sending more money
|
||||||
// to a credit-liability doesn't increase the amount (yet)
|
// to a credit-liability doesn't increase the amount (yet)
|
||||||
if (
|
if (
|
||||||
in_array($type, [TransactionType::WITHDRAWAL])
|
$type === TransactionType::WITHDRAWAL
|
||||||
&& (int)$account->id === (int)$transaction->account_id
|
&& (int)$account->id === (int)$transaction->account_id
|
||||||
&& 1 === bccomp($transaction->amount, '0')
|
&& 1 === bccomp($transaction->amount, '0')
|
||||||
&& 'credit' === $direction
|
&& 'credit' === $direction
|
||||||
@ -274,7 +274,7 @@ class CreditRecalculateService
|
|||||||
|
|
||||||
// likewise deposit into a credit debt does not change the amount
|
// likewise deposit into a credit debt does not change the amount
|
||||||
if (
|
if (
|
||||||
in_array($type, [TransactionType::DEPOSIT])
|
$type === TransactionType::DEPOSIT
|
||||||
&& (int)$account->id === (int)$transaction->account_id
|
&& (int)$account->id === (int)$transaction->account_id
|
||||||
&& -1 === bccomp($transaction->amount, '0')
|
&& -1 === bccomp($transaction->amount, '0')
|
||||||
&& 'credit' === $direction
|
&& 'credit' === $direction
|
||||||
|
@ -79,7 +79,6 @@ class AccountUpdateService
|
|||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
|
||||||
*/
|
*/
|
||||||
public function update(Account $account, array $data): Account
|
public function update(Account $account, array $data): Account
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,7 @@ class GroupUpdateService
|
|||||||
* @param array $transactions
|
* @param array $transactions
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws DuplicateTransactionException
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function updateTransactions(TransactionGroup $transactionGroup, array $transactions): array
|
private function updateTransactions(TransactionGroup $transactionGroup, array $transactions): array
|
||||||
|
@ -109,6 +109,8 @@ class Amount
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getCurrencyCode(): string
|
public function getCurrencyCode(): string
|
||||||
{
|
{
|
||||||
@ -145,6 +147,8 @@ class Amount
|
|||||||
* @param User $user
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @return TransactionCurrency
|
* @return TransactionCurrency
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
|
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
|
||||||
{
|
{
|
||||||
|
@ -44,8 +44,7 @@ class RemoteUserGuard implements Guard
|
|||||||
* Create a new authentication guard.
|
* Create a new authentication guard.
|
||||||
*
|
*
|
||||||
* @param UserProvider $provider
|
* @param UserProvider $provider
|
||||||
*
|
* @param Application $app
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
// @phpstan-ignore-next-line
|
// @phpstan-ignore-next-line
|
||||||
public function __construct(UserProvider $provider, Application $app) // @phpstan-ignore-line
|
public function __construct(UserProvider $provider, Application $app) // @phpstan-ignore-line
|
||||||
|
@ -74,7 +74,6 @@ class CacheProperties
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws JsonException
|
|
||||||
*/
|
*/
|
||||||
public function has(): bool
|
public function has(): bool
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Support\Cronjobs;
|
namespace FireflyIII\Support\Cronjobs;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Exception;
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AbstractCronjob
|
* Class AbstractCronjob
|
||||||
|
@ -190,6 +190,7 @@ trait AugumentData
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info
|
protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,8 @@ trait ChartGeneration
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method.
|
protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method.
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ trait GetConfigurationData
|
|||||||
* Get config for date range.
|
* Get config for date range.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
protected function getDateRangeConfig(): array // get configuration + get preferences.
|
protected function getDateRangeConfig(): array // get configuration + get preferences.
|
||||||
{
|
{
|
||||||
|
@ -78,6 +78,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array
|
protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
@ -269,6 +270,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array
|
protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
@ -347,6 +349,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array
|
protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
@ -400,6 +403,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
|
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
|
||||||
{
|
{
|
||||||
@ -480,6 +484,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags.
|
protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags.
|
||||||
{
|
{
|
||||||
@ -554,6 +559,7 @@ trait PeriodOverview
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \JsonException
|
||||||
*/
|
*/
|
||||||
protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array
|
protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
@ -162,6 +162,7 @@ trait RequestInformation
|
|||||||
* Returns if user has seen demo.
|
* Returns if user has seen demo.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
final protected function hasSeenDemo(): bool // get request info + get preference
|
final protected function hasSeenDemo(): bool // get request info + get preference
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support\Http\Controllers;
|
namespace FireflyIII\Support\Http\Controllers;
|
||||||
|
|
||||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
use FireflyIII\Support\Search\OperatorQuerySearch;
|
use FireflyIII\Support\Search\OperatorQuerySearch;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
@ -51,6 +51,7 @@ class ParseDateString
|
|||||||
* @param string $date
|
* @param string $date
|
||||||
*
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function parseDate(string $date): Carbon
|
public function parseDate(string $date): Carbon
|
||||||
{
|
{
|
||||||
@ -265,31 +266,20 @@ class ParseDateString
|
|||||||
protected function parseKeyword(string $keyword): Carbon
|
protected function parseKeyword(string $keyword): Carbon
|
||||||
{
|
{
|
||||||
$today = Carbon::today()->startOfDay();
|
$today = Carbon::today()->startOfDay();
|
||||||
switch ($keyword) {
|
|
||||||
default:
|
return match ($keyword) {
|
||||||
case 'today':
|
default => $today,
|
||||||
return $today;
|
'yesterday' => $today->subDay(),
|
||||||
case 'yesterday':
|
'tomorrow' => $today->addDay(),
|
||||||
return $today->subDay();
|
'start of this week' => $today->startOfWeek(),
|
||||||
case 'tomorrow':
|
'end of this week' => $today->endOfWeek(),
|
||||||
return $today->addDay();
|
'start of this month' => $today->startOfMonth(),
|
||||||
case 'start of this week':
|
'end of this month' => $today->endOfMonth(),
|
||||||
return $today->startOfWeek();
|
'start of this quarter' => $today->startOfQuarter(),
|
||||||
case 'end of this week':
|
'end of this quarter' => $today->endOfQuarter(),
|
||||||
return $today->endOfWeek();
|
'start of this year' => $today->startOfYear(),
|
||||||
case 'start of this month':
|
'end of this year' => $today->endOfYear(),
|
||||||
return $today->startOfMonth();
|
};
|
||||||
case 'end of this month':
|
|
||||||
return $today->endOfMonth();
|
|
||||||
case 'start of this quarter':
|
|
||||||
return $today->startOfQuarter();
|
|
||||||
case 'end of this quarter':
|
|
||||||
return $today->endOfQuarter();
|
|
||||||
case 'start of this year':
|
|
||||||
return $today->startOfYear();
|
|
||||||
case 'end of this year':
|
|
||||||
return $today->endOfYear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -371,7 +361,6 @@ class ParseDateString
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var string $part */
|
|
||||||
foreach ($parts as $part) {
|
foreach ($parts as $part) {
|
||||||
Log::debug(sprintf('Now parsing part "%s"', $part));
|
Log::debug(sprintf('Now parsing part "%s"', $part));
|
||||||
$part = trim($part);
|
$part = trim($part);
|
||||||
|
@ -28,7 +28,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\Preference;
|
use FireflyIII\Models\Preference;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
|
||||||
use PDOException;
|
use PDOException;
|
||||||
use Session;
|
use Session;
|
||||||
|
|
||||||
@ -107,6 +106,7 @@ class Preferences
|
|||||||
* @param mixed $default
|
* @param mixed $default
|
||||||
*
|
*
|
||||||
* @return Preference|null
|
* @return Preference|null
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getFresh(string $name, $default = null): ?Preference
|
public function getFresh(string $name, $default = null): ?Preference
|
||||||
{
|
{
|
||||||
@ -207,6 +207,7 @@ class Preferences
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function lastActivity(): string
|
public function lastActivity(): string
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,6 @@ namespace FireflyIII\Support\Request;
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Carbon\Exceptions\InvalidFormatException;
|
use Carbon\Exceptions\InvalidFormatException;
|
||||||
use Exception;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,6 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
public function searchTransactions(): LengthAwarePaginator
|
public function searchTransactions(): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,6 @@ class Steam
|
|||||||
* @param TransactionCurrency|null $currency
|
* @param TransactionCurrency|null $currency
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* @throws FireflyException
|
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string
|
public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string
|
||||||
@ -97,6 +96,7 @@ class Steam
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
|
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
|
||||||
{
|
{
|
||||||
@ -164,6 +164,8 @@ class Steam
|
|||||||
* @param TransactionCurrency|null $currency
|
* @param TransactionCurrency|null $currency
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balanceInRange(Account $account, Carbon $start, Carbon $end, ?TransactionCurrency $currency = null): array
|
public function balanceInRange(Account $account, Carbon $start, Carbon $end, ?TransactionCurrency $currency = null): array
|
||||||
{
|
{
|
||||||
@ -246,6 +248,7 @@ class Steam
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balancePerCurrency(Account $account, Carbon $date): array
|
public function balancePerCurrency(Account $account, Carbon $date): array
|
||||||
{
|
{
|
||||||
@ -279,6 +282,8 @@ class Steam
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balancesByAccounts(Collection $accounts, Carbon $date): array
|
public function balancesByAccounts(Collection $accounts, Carbon $date): array
|
||||||
{
|
{
|
||||||
@ -311,6 +316,7 @@ class Steam
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
public function balancesPerCurrencyByAccounts(Collection $accounts, Carbon $date): array
|
public function balancesPerCurrencyByAccounts(Collection $accounts, Carbon $date): array
|
||||||
{
|
{
|
||||||
@ -444,6 +450,7 @@ class Steam
|
|||||||
* Get user's language.
|
* Get user's language.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getLanguage(): string // get preference
|
public function getLanguage(): string // get preference
|
||||||
{
|
{
|
||||||
@ -454,6 +461,7 @@ class Steam
|
|||||||
* Get user's locale.
|
* Get user's locale.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getLocale(): string // get preference
|
public function getLocale(): string // get preference
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\TransactionRules\Actions;
|
namespace FireflyIII\TransactionRules\Actions;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use FireflyIII\Models\RuleAction;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\TransactionRules\Actions;
|
namespace FireflyIII\TransactionRules\Actions;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use FireflyIII\Models\RuleAction;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\TransactionRules\Actions;
|
namespace FireflyIII\TransactionRules\Actions;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use FireflyIII\Models\RuleAction;
|
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ namespace FireflyIII\TransactionRules\Actions;
|
|||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user