Clean up comments

This commit is contained in:
James Cole 2023-02-22 18:03:31 +01:00
parent 68f398f97c
commit e6dc881f56
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
119 changed files with 317 additions and 234 deletions

View File

@ -61,7 +61,9 @@ class ConfigurationController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/configuration/getConfiguration
*
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function index(): JsonResponse
{
@ -96,7 +98,6 @@ class ConfigurationController extends Controller
* Get all config values.
*
* @return array
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@ -136,7 +137,9 @@ class ConfigurationController extends Controller
* @param string $configKey
*
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function show(string $configKey): JsonResponse
{
@ -171,7 +174,9 @@ class ConfigurationController extends Controller
* @param string $name
*
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function update(UpdateRequest $request, string $name): JsonResponse
{

View File

@ -32,6 +32,8 @@ use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Http\Api\ConvertsExchangeRates;
use Illuminate\Http\JsonResponse;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AccountController
@ -62,6 +64,8 @@ class AccountController extends Controller
*
* @param DateRequest $request
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function dashboard(DateRequest $request): JsonResponse
{

View File

@ -37,8 +37,6 @@ class ShowController extends Controller
{
/**
* TODO this endpoint is not yet reachable.
* @param Account $account
* @return JsonResponse
*/
public function show(Request $request, Account $account): JsonResponse
{

View File

@ -57,8 +57,6 @@ class ShowController extends Controller
* This endpoint is documented at:
* TODO add URL
*
* @param DateRequest $request
* @return JsonResponse
*/
public function budgeted(DateRequest $request, Budget $budget): JsonResponse
{
@ -73,8 +71,6 @@ class ShowController extends Controller
* This endpoint is documented at:
* TODO add URL
*
* @param DateRequest $request
* @return JsonResponse
*/
public function spent(DateRequest $request, Budget $budget): JsonResponse
{

View File

@ -50,7 +50,6 @@ class ListController extends Controller
/**
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/listBudgetLimitByBudget
* @return JsonResponse
*/
public function index(DateRequest $request, Budget $budget): JsonResponse
{

View File

@ -94,6 +94,8 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param TransactionJournal $journal
*
* @return int
* @throws FireflyException
* @throws JsonException
*/
private function correctJournal(TransactionJournal $journal): int
{

View File

@ -166,6 +166,7 @@ class FixAccountTypes extends Command
* @param Transaction $dest
*
* @throws FireflyException
* @throws \JsonException
*/
private function fixJournal(TransactionJournal $journal, string $type, Transaction $source, Transaction $dest): void
{

View File

@ -90,6 +90,8 @@ class DecryptDatabase extends Command
/**
* @param string $table
* @param array $fields
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function decryptTable(string $table, array $fields): void
{

View File

@ -33,6 +33,8 @@ use FireflyIII\Support\Cronjobs\RecurringCronjob;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class Cron
@ -124,7 +126,6 @@ class Cron extends Command
/**
* @param bool $force
* @param Carbon|null $date
* @throws FireflyException
*/
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
{
@ -152,7 +153,9 @@ class Cron extends Command
* @param bool $force
* @param Carbon|null $date
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
private function recurringCronJob(bool $force, ?Carbon $date): void
{
@ -207,6 +210,8 @@ class Cron extends Command
* @param bool $force
* @param Carbon|null $date
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{

View File

@ -66,7 +66,9 @@ class AccountCurrencies extends Command
* Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -110,7 +112,6 @@ class AccountCurrencies extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -50,7 +50,9 @@ class AppendBudgetLimitPeriods extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -73,7 +75,6 @@ class AppendBudgetLimitPeriods extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -58,7 +58,9 @@ class BackToJournals extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -86,6 +88,8 @@ class BackToJournals extends Command
/**
* @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isMigrated(): bool
{
@ -96,7 +100,6 @@ class BackToJournals extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -53,8 +53,9 @@ class BudgetLimitCurrency extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws JsonException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -100,7 +101,6 @@ class BudgetLimitCurrency extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -54,7 +54,9 @@ class CCLiabilities extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -97,7 +99,6 @@ class CCLiabilities extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -54,7 +54,9 @@ class MigrateAttachments extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -106,7 +108,6 @@ class MigrateAttachments extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -55,7 +55,9 @@ class MigrateJournalNotes extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -102,7 +104,6 @@ class MigrateJournalNotes extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -56,8 +56,10 @@ class MigrateRecurrenceMeta extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws JsonException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -86,7 +88,6 @@ class MigrateRecurrenceMeta extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -55,7 +55,9 @@ class MigrateRecurrenceType extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -78,7 +80,6 @@ class MigrateRecurrenceType extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -54,7 +54,9 @@ class MigrateTagLocations extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -75,7 +77,6 @@ class MigrateTagLocations extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -72,7 +72,9 @@ class MigrateToGroups extends Command
* Execute the console command.
*
* @return int
* @throws Exception
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -130,7 +132,6 @@ class MigrateToGroups extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -68,7 +68,9 @@ class MigrateToRules extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -121,7 +123,6 @@ class MigrateToRules extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -67,7 +67,9 @@ class OtherCurrenciesCorrections extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -110,7 +112,6 @@ class OtherCurrenciesCorrections extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -52,7 +52,9 @@ class RenameAccountMeta extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -100,7 +102,6 @@ class RenameAccountMeta extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -68,7 +68,9 @@ class TransactionIdentifier extends Command
* think. So each set gets a number (1,2,3) to keep them apart.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -121,7 +123,6 @@ class TransactionIdentifier extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -138,7 +138,6 @@ class TransferCurrenciesCorrections extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -60,7 +60,9 @@ class UpgradeLiabilities extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -82,7 +84,6 @@ class UpgradeLiabilities extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -62,7 +62,9 @@ class UpgradeLiabilitiesEight extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@ -83,7 +85,6 @@ class UpgradeLiabilitiesEight extends Command
/**
* @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -253,6 +253,8 @@ class AccountFactory
* @param array $data
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
private function cleanMetaDataArray(Account $account, array $data): array
{

View File

@ -58,6 +58,7 @@ class RecurrenceFactory
*
* @return Recurrence
* @throws FireflyException
* @throws \JsonException
*/
public function create(array $data): Recurrence
{

View File

@ -450,6 +450,8 @@ class TransactionJournalFactory
* @param Account $destination
*
* @return TransactionCurrency
* @throws FireflyException
* @throws JsonException
*/
private function getCurrencyByAccount(string $type, ?TransactionCurrency $currency, Account $source, Account $destination): TransactionCurrency
{
@ -510,6 +512,8 @@ class TransactionJournalFactory
* @param Account $destination
*
* @return TransactionCurrency|null
* @throws FireflyException
* @throws JsonException
*/
private function getForeignByAccount(string $type, ?TransactionCurrency $foreignCurrency, Account $destination): ?TransactionCurrency
{

View File

@ -58,6 +58,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -60,6 +60,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -48,6 +48,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -48,6 +48,7 @@ class MultiYearReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -48,6 +48,7 @@ class YearReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -55,6 +55,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
* Generate the report.
*
* @return string
* @throws FireflyException
*/
public function generate(): string
{

View File

@ -103,6 +103,8 @@ class StandardMessageGenerator implements MessageGeneratorInterface
/**
* @param Webhook $webhook
* @throws FireflyException
* @throws JsonException
*/
private function runWebhook(Webhook $webhook): void
{

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\RequestedReportOnJournals;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\Notifications\User\TransactionCreation;
use FireflyIII\Repositories\User\UserRepositoryInterface;
@ -40,6 +41,7 @@ class AutomationHandler
* Respond to the creation of X journals.
*
* @param RequestedReportOnJournals $event
* @throws FireflyException
*/
public function reportJournals(RequestedReportOnJournals $event): void
{

View File

@ -287,6 +287,7 @@ class UserEventHandler
/**
* @param InvitationCreated $event
* @return void
* @throws FireflyException
*/
public function sendRegistrationInvite(InvitationCreated $event): void
{

View File

@ -504,6 +504,7 @@ class GroupCollector implements GroupCollectorInterface
* @param Collection $collection
*
* @return Collection
* @throws FireflyException
*/
private function parseArray(Collection $collection): Collection
{
@ -556,6 +557,7 @@ class GroupCollector implements GroupCollectorInterface
* @param TransactionJournal $augumentedJournal
*
* @return array
* @throws FireflyException
*/
private function parseAugmentedJournal(TransactionJournal $augumentedJournal): array
{

View File

@ -74,7 +74,6 @@ class FiscalHelper implements FiscalHelperInterface
* @param Carbon $date
*
* @return Carbon date object
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -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)
{

View File

@ -63,7 +63,6 @@ class UpdateController extends Controller
* Show page with update options.
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -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()
{

View File

@ -81,7 +81,6 @@ class LoginController extends Controller
/**
* Handle a login request to the application.
*
* @param Request $request
*
* @throws ValidationException
*/

View File

@ -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

View File

@ -126,7 +126,6 @@ class ShowController extends Controller
* @param Bill $bill
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -83,7 +83,6 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
* @throws JsonException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@ -121,7 +120,6 @@ class ShowController extends Controller
* @param Request $request
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@ -151,8 +149,6 @@ class ShowController extends Controller
* @param Budget $budget
*
* @return Factory|View
* @throws FireflyException
* @throws JsonException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@ -190,7 +186,6 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
* @throws JsonException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -69,7 +69,6 @@ class IndexController extends Controller
* @param Request $request
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -81,7 +81,6 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
* @throws JsonException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@ -126,7 +125,6 @@ class ShowController extends Controller
* @param Category $category
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -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
{

View File

@ -98,7 +98,6 @@ class TransactionController extends Controller
* @param Carbon $end
*
* @return JsonResponse
* @throws FireflyException
*/
public function categories(string $objectType, Carbon $start, Carbon $end)
{
@ -152,7 +151,6 @@ class TransactionController extends Controller
* @param Carbon $end
*
* @return JsonResponse
* @throws FireflyException
*/
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
{
@ -206,7 +204,6 @@ class TransactionController extends Controller
* @param Carbon $end
*
* @return JsonResponse
* @throws FireflyException
*/
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
{

View File

@ -326,7 +326,6 @@ class CurrencyController extends Controller
* @param Request $request
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -81,6 +81,7 @@ class DebugController extends Controller
* @param Request $request
*
* @return RedirectResponse|Redirector
* @throws FireflyException
*/
public function flush(Request $request)
{

View File

@ -51,7 +51,6 @@ class JavascriptController extends Controller
* @param CurrencyRepositoryInterface $currencyRepository
*
* @return Response
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -42,6 +42,7 @@ class FrontpageController extends Controller
* @param PiggyBankRepositoryInterface $repository
*
* @return JsonResponse
* @throws FireflyException
*/
public function piggyBanks(PiggyBankRepositoryInterface $repository): JsonResponse
{

View File

@ -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
{

View File

@ -25,6 +25,7 @@ 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;
@ -67,6 +68,8 @@ class ShowController extends Controller
* @param PiggyBank $piggyBank
*
* @return Factory|View
* @throws FireflyException
* @throws \JsonException
*/
public function show(PiggyBank $piggyBank)
{

View File

@ -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
{

View File

@ -216,7 +216,6 @@ class ProfileController extends Controller
/**
* Delete 2FA routine.
*
* @return RedirectResponse|Redirector
*/
public function deleteCode(Request $request): RedirectResponse|Redirector
{
@ -245,7 +244,6 @@ class ProfileController extends Controller
/**
* Enable 2FA screen.
*
* @return RedirectResponse|Redirector
*/
public function enable2FA(Request $request): RedirectResponse|Redirector
{
@ -643,7 +641,7 @@ class ProfileController extends Controller
* @param Request $request
*
* @return RedirectResponse|Redirector
* @throws FireflyException
* @throws \Exception
*/
public function regenerate(Request $request)
{

View File

@ -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)
{

View File

@ -67,6 +67,7 @@ class BalanceController extends Controller
* @param Carbon $end
*
* @return string
* @throws FireflyException
*/
public function general(Collection $accounts, Carbon $start, Carbon $end)
{

View File

@ -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:

View File

@ -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)
{

View File

@ -278,6 +278,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 +331,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 +493,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 +574,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 +652,7 @@ class CategoryController extends Controller
* @param Carbon $end
*
* @return string
* @throws FireflyException
*/
public function operations(Collection $accounts, Carbon $start, Carbon $end): string
{
@ -691,6 +694,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 +745,7 @@ class CategoryController extends Controller
* @param Carbon $end
*
* @return string
* @throws FireflyException
*/
public function topIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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
{

View File

@ -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
{

View File

@ -103,6 +103,7 @@ class SearchController extends Controller
* @param SearchInterface $searcher
*
* @return JsonResponse
* @throws FireflyException
*/
public function search(Request $request, SearchInterface $searcher): JsonResponse
{

View File

@ -280,7 +280,6 @@ class TagController extends Controller
* @param Tag $tag
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -134,7 +134,6 @@ class IndexController extends Controller
* @param string $objectType
*
* @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/

View File

@ -62,7 +62,7 @@ class DeleteController extends Controller
*
* @param Webhook $webhook
*
* @return Factory|RedirectResponse|Redirector|View
* @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View
*/
public function index(Webhook $webhook)
{

View File

@ -61,7 +61,7 @@ class EditController extends Controller
*
* @param Webhook $webhook
*
* @return Factory|RedirectResponse|Redirector|View
* @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View
*/
public function index(Webhook $webhook)
{

View File

@ -59,7 +59,6 @@ class IndexController extends Controller
* @param Request $request
*
* @return Factory|View
* @throws FireflyException
*/
public function index(Request $request)
{

View File

@ -61,7 +61,7 @@ class ShowController extends Controller
*
* @param Webhook $webhook
*
* @return Factory|RedirectResponse|Redirector|View
* @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View
*/
public function index(Webhook $webhook)
{

View File

@ -188,7 +188,6 @@ class RecurrenceFormRequest extends FormRequest
* The rules for this request.
*
* @return array
* @throws FireflyException
*
*/
public function rules(): array

View File

@ -29,6 +29,7 @@ use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -94,6 +95,7 @@ class DownloadExchangeRates implements ShouldQueue
/**
* @param TransactionCurrency $currency
* @return void
* @throws GuzzleException
*/
private function downloadRates(TransactionCurrency $currency): void
{
@ -117,11 +119,6 @@ class DownloadExchangeRates implements ShouldQueue
$this->saveRates($currency, $date, $json['rates']);
}
/**
* @param TransactionCurrency $currency
* @param array $rates
* @return void
*/
private function saveRates(TransactionCurrency $currency, Carbon $date, array $rates): void
{
foreach ($rates as $code => $rate) {

View File

@ -261,6 +261,7 @@ class AccountRepository implements AccountRepositoryInterface
* @return Account
*
* @throws FireflyException
* @throws JsonException
*/
public function getCashAccount(): Account
{

View File

@ -123,6 +123,8 @@ class AccountTasker implements AccountTaskerInterface
* @param Collection $accounts
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): array
{
@ -221,6 +223,8 @@ class AccountTasker implements AccountTaskerInterface
* @param Collection $accounts
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): array
{

View File

@ -188,6 +188,7 @@ class BillRepository implements BillRepositoryInterface
*
* @return Bill
* @throws FireflyException
* @throws JsonException
*/
public function store(array $data): Bill
{
@ -911,6 +912,8 @@ class BillRepository implements BillRepositoryInterface
* @param array $data
*
* @return Bill
* @throws FireflyException
* @throws JsonException
*/
public function update(Bill $bill, array $data): Bill
{

View File

@ -230,6 +230,8 @@ class BudgetRepository implements BudgetRepositoryInterface
* @param array $data
*
* @return Budget
* @throws FireflyException
* @throws JsonException
*/
public function update(Budget $budget, array $data): Budget
{

View File

@ -209,10 +209,7 @@ interface BudgetRepositoryInterface
/**
* Used in the v2 API to calculate the amount of money spent in a single budget..
*
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function spentInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array;

View File

@ -42,12 +42,6 @@ trait ModifiesPiggyBanks
{
use CreatesObjectGroups;
/**
* @param PiggyBankRepetition $repetition
* @param string $amount
*
* @return void
*/
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void
{
Log::debug(sprintf('addAmountToRepetition: %s', $amount));
@ -61,12 +55,6 @@ trait ModifiesPiggyBanks
}
}
/**
* @param PiggyBank $piggyBank
* @param string $amount
*
* @return bool
*/
public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool
{
$repetition = $this->getRepetition($piggyBank);
@ -109,6 +97,7 @@ trait ModifiesPiggyBanks
* @param string $amount
*
* @return bool
* @throws \JsonException
*/
public function canAddAmount(PiggyBank $piggyBank, string $amount): bool
{

View File

@ -45,10 +45,6 @@ interface PiggyBankRepositoryInterface
*/
public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool;
/**
* @param PiggyBankRepetition $repetition
* @param string $amount
*/
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void;
/**

View File

@ -53,6 +53,8 @@ class OperationsRepository implements OperationsRepositoryInterface
* @param Collection|null $tags
*
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function listExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $tags = null): array
{
@ -150,6 +152,8 @@ class OperationsRepository implements OperationsRepositoryInterface
* @param Collection|null $tags
*
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function listIncome(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $tags = null): array
{

View File

@ -470,6 +470,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
* @return TransactionGroup
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws JsonException
*/
public function store(array $data): TransactionGroup
{
@ -495,6 +496,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
*
* @return TransactionGroup
*
* @throws DuplicateTransactionException
* @throws FireflyException
*/
public function update(TransactionGroup $transactionGroup, array $data): TransactionGroup

View File

@ -218,6 +218,7 @@ trait AccountServiceTrait
*
* @return TransactionGroup
* @throws FireflyException
* @throws JsonException
* @deprecated
*/
protected function createOBGroup(Account $account, array $data): TransactionGroup
@ -396,11 +397,7 @@ trait AccountServiceTrait
/**
* Create the opposing "credit liability" transaction for credit liabilities.
*
* @param Account $account
* @param string $openingBalance
* @param Carbon $openingBalanceDate
*
* @return TransactionGroup
* @throws FireflyException
*/
protected function updateCreditTransaction(Account $account, string $direction, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup
@ -462,6 +459,7 @@ trait AccountServiceTrait
*
* @return TransactionGroup
* @throws FireflyException
* @throws JsonException
*/
protected function createCreditTransaction(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup
{
@ -674,6 +672,7 @@ trait AccountServiceTrait
*
* @return TransactionGroup
* @throws FireflyException
* @throws JsonException
*/
protected function createOBGroupV2(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup
{

View File

@ -186,6 +186,7 @@ trait RecurringTransactionTrait
* @param string|null $accountName
*
* @return Account
* @throws JsonException
*/
protected function findAccount(array $expectedTypes, ?int $accountId, ?string $accountName): Account
{

View File

@ -70,6 +70,7 @@ class AccountUpdateService
*
* @return Account
* @throws FireflyException
* @throws \JsonException
*/
public function update(Account $account, array $data): Account
{

View File

@ -141,6 +141,7 @@ class GroupUpdateService
* @return array
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws JsonException
*/
private function updateTransactions(TransactionGroup $transactionGroup, array $transactions): array
{

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Internal\Update;
use Exception;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\TransactionCurrencyFactory;
use FireflyIII\Models\Note;
@ -131,9 +130,7 @@ class RecurrenceUpdateService
return;
}
if (null !== $dbNote && '' === $text) {
$dbNote->delete();
}
$dbNote?->delete();
}
/**
@ -159,24 +156,22 @@ class RecurrenceUpdateService
return;
}
// loop all and try to match them:
if ($originalCount === count($repetitions)) {
Log::debug('Loop and find');
foreach ($repetitions as $current) {
$match = $this->matchRepetition($recurrence, $current);
if (null === $match) {
throw new FireflyException('Cannot match recurring repetition to existing repetition. Not sure what to do. Break.');
}
$fields = [
'type' => 'repetition_type',
'moment' => 'repetition_moment',
'skip' => 'repetition_skip',
'weekend' => 'weekend',
];
foreach ($fields as $field => $column) {
if (array_key_exists($field, $current)) {
$match->$column = $current[$field];
$match->save();
}
Log::debug('Loop and find');
foreach ($repetitions as $current) {
$match = $this->matchRepetition($recurrence, $current);
if (null === $match) {
throw new FireflyException('Cannot match recurring repetition to existing repetition. Not sure what to do. Break.');
}
$fields = [
'type' => 'repetition_type',
'moment' => 'repetition_moment',
'skip' => 'repetition_skip',
'weekend' => 'weekend',
];
foreach ($fields as $field => $column) {
if (array_key_exists($field, $current)) {
$match->$column = $current[$field];
$match->save();
}
}
}
@ -211,7 +206,7 @@ class RecurrenceUpdateService
$query->where($column, $data[$field]);
}
}
/** @var RecurrenceRepetition|null */
return $query->first();
}
@ -222,6 +217,7 @@ class RecurrenceUpdateService
* @param array $transactions
*
* @throws FireflyException
* @throws \JsonException
*/
private function updateTransactions(Recurrence $recurrence, array $transactions): void
{
@ -241,77 +237,75 @@ class RecurrenceUpdateService
}
$currencyFactory = app(TransactionCurrencyFactory::class);
// loop all and try to match them:
if ($originalCount === count($transactions)) {
Log::debug(sprintf('Count is equal (%d), update transactions.', $originalCount));
foreach ($transactions as $current) {
$match = $this->matchTransaction($recurrence, $current);
if (null === $match) {
throw new FireflyException('Cannot match recurring transaction to existing transaction. Not sure what to do. Break.');
}
// complex loop to find currency:
$currency = null;
$foreignCurrency = null;
if (array_key_exists('currency_id', $current) || array_key_exists('currency_code', $current)) {
$currency = $currencyFactory->find($current['currency_id'] ?? null, $currency['currency_code'] ?? null);
}
if (null === $currency) {
unset($current['currency_id'], $current['currency_code']);
}
if (null !== $currency) {
$current['currency_id'] = (int)$currency->id;
}
if (array_key_exists('foreign_currency_id', $current) || array_key_exists('foreign_currency_code', $current)) {
$foreignCurrency = $currencyFactory->find($current['foreign_currency_id'] ?? null, $currency['foreign_currency_code'] ?? null);
}
if (null === $foreignCurrency) {
unset($current['foreign_currency_id'], $currency['foreign_currency_code']);
}
if (null !== $foreignCurrency) {
$current['foreign_currency_id'] = (int)$foreignCurrency->id;
}
Log::debug(sprintf('Count is equal (%d), update transactions.', $originalCount));
foreach ($transactions as $current) {
$match = $this->matchTransaction($recurrence, $current);
if (null === $match) {
throw new FireflyException('Cannot match recurring transaction to existing transaction. Not sure what to do. Break.');
}
// complex loop to find currency:
$currency = null;
$foreignCurrency = null;
if (array_key_exists('currency_id', $current) || array_key_exists('currency_code', $current)) {
$currency = $currencyFactory->find($current['currency_id'] ?? null, $currency['currency_code'] ?? null);
}
if (null === $currency) {
unset($current['currency_id'], $current['currency_code']);
}
if (null !== $currency) {
$current['currency_id'] = (int)$currency->id;
}
if (array_key_exists('foreign_currency_id', $current) || array_key_exists('foreign_currency_code', $current)) {
$foreignCurrency = $currencyFactory->find($current['foreign_currency_id'] ?? null, $currency['foreign_currency_code'] ?? null);
}
if (null === $foreignCurrency) {
unset($current['foreign_currency_id'], $currency['foreign_currency_code']);
}
if (null !== $foreignCurrency) {
$current['foreign_currency_id'] = (int)$foreignCurrency->id;
}
// update fields that are part of the recurring transaction itself.
$fields = [
'source_id' => 'source_id',
'destination_id' => 'destination_id',
'amount' => 'amount',
'foreign_amount' => 'foreign_amount',
'description' => 'description',
'currency_id' => 'transaction_currency_id',
'foreign_currency_id' => 'foreign_currency_id',
];
foreach ($fields as $field => $column) {
if (array_key_exists($field, $current)) {
$match->$column = $current[$field];
$match->save();
}
}
// update meta data
if (array_key_exists('budget_id', $current)) {
$this->setBudget($match, (int)$current['budget_id']);
}
if (array_key_exists('bill_id', $current)) {
$this->setBill($match, (int)$current['bill_id']);
}
// reset category if name is set but empty:
// can be removed when v1 is retired.
if (array_key_exists('category_name', $current) && '' === (string)$current['category_name']) {
Log::debug('Category name is submitted but is empty. Set category to be empty.');
$current['category_name'] = null;
$current['category_id'] = 0;
// update fields that are part of the recurring transaction itself.
$fields = [
'source_id' => 'source_id',
'destination_id' => 'destination_id',
'amount' => 'amount',
'foreign_amount' => 'foreign_amount',
'description' => 'description',
'currency_id' => 'transaction_currency_id',
'foreign_currency_id' => 'foreign_currency_id',
];
foreach ($fields as $field => $column) {
if (array_key_exists($field, $current)) {
$match->$column = $current[$field];
$match->save();
}
}
// update meta data
if (array_key_exists('budget_id', $current)) {
$this->setBudget($match, (int)$current['budget_id']);
}
if (array_key_exists('bill_id', $current)) {
$this->setBill($match, (int)$current['bill_id']);
}
// reset category if name is set but empty:
// can be removed when v1 is retired.
if (array_key_exists('category_name', $current) && '' === (string)$current['category_name']) {
Log::debug('Category name is submitted but is empty. Set category to be empty.');
$current['category_name'] = null;
$current['category_id'] = 0;
}
if (array_key_exists('category_id', $current)) {
Log::debug(sprintf('Category ID is submitted, set category to be %d.', (int)$current['category_id']));
$this->setCategory($match, (int)$current['category_id']);
}
if (array_key_exists('category_id', $current)) {
Log::debug(sprintf('Category ID is submitted, set category to be %d.', (int)$current['category_id']));
$this->setCategory($match, (int)$current['category_id']);
}
if (array_key_exists('tags', $current) && is_array($current['tags'])) {
$this->updateTags($match, $current['tags']);
}
if (array_key_exists('piggy_bank_id', $current)) {
$this->updatePiggyBank($match, (int)$current['piggy_bank_id']);
}
if (array_key_exists('tags', $current) && is_array($current['tags'])) {
$this->updateTags($match, $current['tags']);
}
if (array_key_exists('piggy_bank_id', $current)) {
$this->updatePiggyBank($match, (int)$current['piggy_bank_id']);
}
}
}
@ -328,7 +322,7 @@ class RecurrenceUpdateService
$originalCount = $recurrence->recurrenceTransactions()->count();
if (1 === $originalCount) {
Log::debug('Return the first one.');
/** @var RecurrenceTransaction|null */
return $recurrence->recurrenceTransactions()->first();
}
// find it based on data
@ -348,7 +342,7 @@ class RecurrenceUpdateService
$query->where($column, $data[$field]);
}
}
/** @var RecurrenceTransaction|null */
return $query->first();
}
}

View File

@ -49,7 +49,7 @@ class Amount
* @param bool $coloured
*
* @return string
*
* @throws FireflyException
*/
public function formatAnything(TransactionCurrency $format, string $amount, bool $coloured = null): string
{
@ -204,6 +204,7 @@ class Amount
* Used only in one place.
*
* @return array
* @throws FireflyException
*/
public function getJsConfig(): array
{

View File

@ -32,6 +32,8 @@ use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class RemoteUserGuard
@ -47,6 +49,8 @@ class RemoteUserGuard implements Guard
*
* @param UserProvider $provider
* @param Application $app
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function __construct(UserProvider $provider, Application $app)
{

View File

@ -221,7 +221,6 @@ class FrontpageChartGenerator
* A basic setter for the user. Also updates the repositories with the right user.
*
* @param User $user
* @throws FireflyException
*/
public function setUser(User $user): void
{

View File

@ -48,6 +48,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function amountNoCurrency(string $name, $value = null, array $options = null): string
{
@ -81,6 +82,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function checkbox(string $name, int $value = null, $checked = null, array $options = null): string
{
@ -116,6 +118,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function date(string $name, $value = null, array $options = null): string
{
@ -140,6 +143,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function file(string $name, array $options = null): string
{
@ -164,6 +168,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function integer(string $name, $value = null, array $options = null): string
{
@ -190,6 +195,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function location(string $name, $value = null, array $options = null): string
{
@ -243,6 +249,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function nonSelectableAmount(string $name, $value = null, array $options = null): string
{
@ -275,6 +282,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function number(string $name, $value = null, array $options = null): string
{
@ -300,6 +308,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function objectGroup($value = null, array $options = null): string
{
@ -330,7 +339,7 @@ class ExpandedForm
* @param string $name
*
* @return string
*
* @throws FireflyException
*/
public function optionsList(string $type, string $name): string
{
@ -350,6 +359,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function password(string $name, array $options = null): string
{
@ -375,6 +385,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function percentage(string $name, $value = null, array $options = null): string
{
@ -401,6 +412,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function staticText(string $name, $value, array $options = null): string
{
@ -424,6 +436,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function text(string $name, $value = null, array $options = null): string
{
@ -448,6 +461,7 @@ class ExpandedForm
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function textarea(string $name, $value = null, array $options = null): string
{

View File

@ -102,7 +102,9 @@ class ExportDataGenerator
/**
* @return array
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function export(): array
{

Some files were not shown because too many files have changed in this diff Show More