From 775504acb6b57c7964449ec59c527612044beb94 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 4 Jul 2023 13:29:19 +0200 Subject: [PATCH] Chore: Add phpdocs --- .../V1/Controllers/Data/DestroyController.php | 3 ++ .../Data/Export/ExportController.php | 4 ++ .../V1/Controllers/Data/PurgeController.php | 5 ++- .../TransactionLink/DestroyController.php | 3 ++ .../Models/TransactionLink/ShowController.php | 3 ++ .../TransactionLink/StoreController.php | 3 ++ .../TransactionLink/UpdateController.php | 3 ++ .../System/ConfigurationController.php | 1 - .../V1/Controllers/System/CronController.php | 6 ++- .../Controllers/Webhook/MessageController.php | 3 ++ .../V1/Requests/Data/Export/ExportRequest.php | 3 ++ .../Models/Transaction/UpdateRequest.php | 2 + .../Requests/User/PreferenceStoreRequest.php | 3 ++ .../Requests/User/PreferenceUpdateRequest.php | 3 ++ .../Model/Budget/ListController.php | 3 ++ .../Model/BudgetLimit/ListController.php | 3 ++ .../System/ConfigurationController.php | 3 ++ .../V2/Controllers/System/DebugController.php | 3 ++ .../Correction/DeleteEmptyJournals.php | 3 ++ .../Correction/DeleteOrphanedTransactions.php | 3 ++ .../Commands/Correction/FixAccountTypes.php | 1 + .../Correction/TriggerCreditCalculation.php | 3 ++ app/Console/Commands/Export/ExportData.php | 4 ++ .../Integrity/UpdateGroupInformation.php | 4 ++ .../Commands/System/ForceDecimalSize.php | 5 ++- .../Commands/System/ForceMigration.php | 6 +++ app/Console/Commands/Tools/Cron.php | 2 + .../Commands/Upgrade/AccountCurrencies.php | 4 ++ .../Upgrade/AppendBudgetLimitPeriods.php | 4 +- .../Commands/Upgrade/BackToJournals.php | 1 - .../Commands/Upgrade/DecryptDatabase.php | 2 + .../Commands/Upgrade/MigrateJournalNotes.php | 1 - .../Upgrade/MigrateRecurrenceMeta.php | 1 - .../Upgrade/MigrateRecurrenceType.php | 1 - .../Commands/Upgrade/MigrateTagLocations.php | 4 +- .../Commands/Upgrade/MigrateToGroups.php | 2 + .../Upgrade/OtherCurrenciesCorrections.php | 1 - .../Upgrade/TransferCurrenciesCorrections.php | 2 + .../Commands/Upgrade/UpgradeLiabilities.php | 1 - .../Upgrade/UpgradeLiabilitiesEight.php | 1 - app/Enums/RecurrenceRepetitionWeekend.php | 3 ++ app/Enums/UserRoleEnum.php | 3 ++ app/Enums/WebhookDelivery.php | 3 ++ app/Enums/WebhookResponse.php | 3 ++ app/Events/NewVersionAvailable.php | 3 ++ app/Events/RequestedSendWebhookMessages.php | 3 ++ app/Handlers/Events/APIEventHandler.php | 1 - app/Helpers/Collector/GroupCollector.php | 1 + app/Helpers/Fiscal/FiscalHelper.php | 1 - .../Account/ReconcileController.php | 7 ++-- .../Admin/ConfigurationController.php | 1 - app/Http/Controllers/Admin/HomeController.php | 5 ++- app/Http/Controllers/Admin/UserController.php | 2 +- .../Category/NoCategoryController.php | 2 - .../Controllers/Chart/ReportController.php | 1 - .../Controllers/Export/IndexController.php | 4 ++ .../Controllers/Json/RecurrenceController.php | 3 -- app/Http/Requests/InviteUserFormRequest.php | 3 ++ .../Requests/TriggerRecurrenceRequest.php | 3 ++ app/Jobs/DownloadExchangeRates.php | 13 ++++++ app/Mail/BillWarningMail.php | 3 ++ app/Mail/InvitationMail.php | 3 ++ app/Mail/ReportNewJournalsMail.php | 5 +++ app/Models/AvailableBudget.php | 3 ++ app/Models/InvitedUser.php | 3 +- app/Models/UserGroup.php | 20 ++++------ app/Notifications/User/NewAccessToken.php | 3 ++ .../User/TransactionCreation.php | 3 ++ app/Notifications/User/UserLogin.php | 3 ++ app/Notifications/User/UserNewPassword.php | 3 ++ app/Notifications/User/UserRegistration.php | 3 ++ .../Account/AccountRepository.php | 3 +- app/Repositories/Budget/BudgetRepository.php | 3 ++ .../LinkType/LinkTypeRepository.php | 5 +++ .../PiggyBank/ModifiesPiggyBanks.php | 12 ++++++ .../PiggyBankRepositoryInterface.php | 6 +++ .../Recurring/RecurringRepository.php | 1 + .../Internal/Support/AccountServiceTrait.php | 11 ++++- .../Support/CreditRecalculateService.php | 10 +++-- .../Internal/Update/AccountUpdateService.php | 4 ++ .../Internal/Update/GroupUpdateService.php | 3 +- .../Update/RecurrenceUpdateService.php | 4 +- app/Support/Calendar/Calculator.php | 22 +++++++++- .../Calendar/Exceptions/IntervalException.php | 15 ++++++- app/Support/Calendar/Periodicity.php | 5 +++ .../Calendar/Periodicity/Bimonthly.php | 7 +++- app/Support/Calendar/Periodicity/Daily.php | 10 +++++ .../Calendar/Periodicity/Fortnightly.php | 7 +++- .../Calendar/Periodicity/HalfYearly.php | 7 +++- .../Calendar/Periodicity/Interspacable.php | 10 +++++ app/Support/Calendar/Periodicity/Interval.php | 11 ++++- app/Support/Calendar/Periodicity/Monthly.php | 10 +++++ .../Calendar/Periodicity/Quarterly.php | 7 +++- app/Support/Calendar/Periodicity/Weekly.php | 10 +++++ app/Support/Calendar/Periodicity/Yearly.php | 10 +++++ app/Support/Export/ExportDataGenerator.php | 20 +++++++++- .../Http/Api/ConvertsExchangeRates.php | 7 ++++ app/Support/Navigation.php | 3 ++ .../Administration/AdministrationTrait.php | 5 +++ app/Support/Request/ConvertsDataTypes.php | 4 ++ app/Support/Twig/General.php | 3 ++ .../V2/TransactionGroupTransformer.php | 4 ++ app/Validation/GroupValidation.php | 1 + app/Validation/RecurrenceValidation.php | 5 +++ app/Validation/TransactionValidation.php | 3 +- composer.lock | 40 +++++++++---------- public/v1/js/ff/list/groups.js | 7 ++-- public/v1/js/ff/transactions/list.js | 2 + .../Support/Calendar/CalculatorProvider.php | 2 + .../unit/Support/Calendar/CalculatorTest.php | 2 + .../Calendar/Periodicity/BimonthlyTest.php | 2 + .../Calendar/Periodicity/DailyTest.php | 2 + .../Calendar/Periodicity/FortnightlyTest.php | 2 + .../Calendar/Periodicity/HalfYearlyTest.php | 2 + .../Calendar/Periodicity/IntervalProvider.php | 2 + .../Calendar/Periodicity/IntervalTestCase.php | 4 +- .../Calendar/Periodicity/MonthlyTest.php | 2 + .../Calendar/Periodicity/QuarterlyTest.php | 2 + .../Calendar/Periodicity/WeeklyTest.php | 2 + .../Calendar/Periodicity/YearlyTest.php | 2 + tests/unit/Support/NavigationTest.php | 2 + 121 files changed, 471 insertions(+), 84 deletions(-) diff --git a/app/Api/V1/Controllers/Data/DestroyController.php b/app/Api/V1/Controllers/Data/DestroyController.php index fa4ced9fb3..8b22e7c673 100644 --- a/app/Api/V1/Controllers/Data/DestroyController.php +++ b/app/Api/V1/Controllers/Data/DestroyController.php @@ -279,6 +279,9 @@ class DestroyController extends Controller $tagRepository->destroyAll(); } + /** + * @return void + */ private function destroyObjectGroups(): void { /** @var ObjectGroupRepositoryInterface $repository */ diff --git a/app/Api/V1/Controllers/Data/Export/ExportController.php b/app/Api/V1/Controllers/Data/Export/ExportController.php index ce36ca292f..c722088a2e 100644 --- a/app/Api/V1/Controllers/Data/Export/ExportController.php +++ b/app/Api/V1/Controllers/Data/Export/ExportController.php @@ -29,6 +29,8 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Support\Export\ExportDataGenerator; use Illuminate\Http\Response as LaravelResponse; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class ExportController @@ -74,6 +76,8 @@ class ExportController extends Controller * * @return LaravelResponse * @throws FireflyException + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ private function returnExport(string $key): LaravelResponse { diff --git a/app/Api/V1/Controllers/Data/PurgeController.php b/app/Api/V1/Controllers/Data/PurgeController.php index 9b4f8ae738..274de64963 100644 --- a/app/Api/V1/Controllers/Data/PurgeController.php +++ b/app/Api/V1/Controllers/Data/PurgeController.php @@ -37,6 +37,9 @@ use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; use Illuminate\Http\JsonResponse; +/** + * Class PurgeController + */ class PurgeController extends Controller { /** @@ -60,7 +63,7 @@ class PurgeController extends Controller // piggies $set = PiggyBank::leftJoin('accounts', 'accounts.id', 'piggy_banks.account_id') - ->where('accounts.user_id', $user->id)->onlyTrashed()->get(['piggy_banks.*']); + ->where('accounts.user_id', $user->id)->onlyTrashed()->get(['piggy_banks.*']); /** @var PiggyBank $piggy */ foreach ($set as $piggy) { $piggy->forceDelete(); diff --git a/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php b/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php index 2c0026e31a..1c9b1fc9a7 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php @@ -30,6 +30,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface; use FireflyIII\User; use Illuminate\Http\JsonResponse; +/** + * Class DestroyController + */ class DestroyController extends Controller { private LinkTypeRepositoryInterface $repository; diff --git a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php index 4efa2b7ede..bdf7af1407 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php @@ -37,6 +37,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Item; +/** + * Class ShowController + */ class ShowController extends Controller { private LinkTypeRepositoryInterface $repository; diff --git a/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php b/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php index ecae44f712..861dbbcc79 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php @@ -35,6 +35,9 @@ use FireflyIII\User; use Illuminate\Http\JsonResponse; use League\Fractal\Resource\Item; +/** + * Class StoreController + */ class StoreController extends Controller { use TransactionFilter; diff --git a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php index 34b20841be..f432b93c70 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php @@ -34,6 +34,9 @@ use FireflyIII\User; use Illuminate\Http\JsonResponse; use League\Fractal\Resource\Item; +/** + * Class UpdateController + */ class UpdateController extends Controller { private JournalRepositoryInterface $journalRepository; diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php index 475502620a..b91efd9360 100644 --- a/app/Api/V1/Controllers/System/ConfigurationController.php +++ b/app/Api/V1/Controllers/System/ConfigurationController.php @@ -138,7 +138,6 @@ class ConfigurationController extends Controller * * @return JsonResponse * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function show(string $configKey): JsonResponse diff --git a/app/Api/V1/Controllers/System/CronController.php b/app/Api/V1/Controllers/System/CronController.php index c75f2db102..cd5544630c 100644 --- a/app/Api/V1/Controllers/System/CronController.php +++ b/app/Api/V1/Controllers/System/CronController.php @@ -28,6 +28,8 @@ use FireflyIII\Api\V1\Requests\System\CronRequest; use FireflyIII\Support\Http\Controllers\CronRunner; use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Log; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class CronController @@ -41,9 +43,11 @@ class CronController extends Controller * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/about/getCron * * @param CronRequest $request - * @param string $token + * @param string $token * * @return JsonResponse + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function cron(CronRequest $request, string $token): JsonResponse { diff --git a/app/Api/V1/Controllers/Webhook/MessageController.php b/app/Api/V1/Controllers/Webhook/MessageController.php index 74aba2e64d..cdcefd9885 100644 --- a/app/Api/V1/Controllers/Webhook/MessageController.php +++ b/app/Api/V1/Controllers/Webhook/MessageController.php @@ -35,6 +35,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Item; +/** + * Class MessageController + */ class MessageController extends Controller { public const RESOURCE_KEY = 'webhook_messages'; diff --git a/app/Api/V1/Requests/Data/Export/ExportRequest.php b/app/Api/V1/Requests/Data/Export/ExportRequest.php index 6c6f80d3ba..bb74c60cdb 100644 --- a/app/Api/V1/Requests/Data/Export/ExportRequest.php +++ b/app/Api/V1/Requests/Data/Export/ExportRequest.php @@ -38,6 +38,9 @@ class ExportRequest extends FormRequest use ChecksLogin; use ConvertsDataTypes; + /** + * @return array + */ public function getAll(): array { $result = [ diff --git a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php index ca3ba78dc7..8ba781818e 100644 --- a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php @@ -59,6 +59,7 @@ class UpdateRequest extends FormRequest * Get all data. Is pretty complex because of all the ??-statements. * * @return array + * @throws FireflyException */ public function getAll(): array { @@ -152,6 +153,7 @@ class UpdateRequest extends FormRequest * Get transaction data. * * @return array + * @throws FireflyException */ private function getTransactionData(): array { diff --git a/app/Api/V1/Requests/User/PreferenceStoreRequest.php b/app/Api/V1/Requests/User/PreferenceStoreRequest.php index e1c9459ab4..9a4a896682 100644 --- a/app/Api/V1/Requests/User/PreferenceStoreRequest.php +++ b/app/Api/V1/Requests/User/PreferenceStoreRequest.php @@ -27,6 +27,9 @@ use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; +/** + * Class PreferenceStoreRequest + */ class PreferenceStoreRequest extends FormRequest { use ChecksLogin; diff --git a/app/Api/V1/Requests/User/PreferenceUpdateRequest.php b/app/Api/V1/Requests/User/PreferenceUpdateRequest.php index 42f0a36992..cac9397713 100644 --- a/app/Api/V1/Requests/User/PreferenceUpdateRequest.php +++ b/app/Api/V1/Requests/User/PreferenceUpdateRequest.php @@ -28,6 +28,9 @@ use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; +/** + * Class PreferenceUpdateRequest + */ class PreferenceUpdateRequest extends FormRequest { use ChecksLogin; diff --git a/app/Api/V2/Controllers/Model/Budget/ListController.php b/app/Api/V2/Controllers/Model/Budget/ListController.php index 37b1a92e38..f2f5645f30 100644 --- a/app/Api/V2/Controllers/Model/Budget/ListController.php +++ b/app/Api/V2/Controllers/Model/Budget/ListController.php @@ -31,6 +31,9 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; +/** + * Class ListController + */ class ListController extends Controller { private BudgetRepositoryInterface $repository; diff --git a/app/Api/V2/Controllers/Model/BudgetLimit/ListController.php b/app/Api/V2/Controllers/Model/BudgetLimit/ListController.php index 5c910ca77d..701f064b6d 100644 --- a/app/Api/V2/Controllers/Model/BudgetLimit/ListController.php +++ b/app/Api/V2/Controllers/Model/BudgetLimit/ListController.php @@ -32,6 +32,9 @@ use FireflyIII\Transformers\V2\BudgetLimitTransformer; use Illuminate\Http\JsonResponse; use Illuminate\Pagination\LengthAwarePaginator; +/** + * Class ListController + */ class ListController extends Controller { private BudgetLimitRepositoryInterface $repository; diff --git a/app/Api/V2/Controllers/System/ConfigurationController.php b/app/Api/V2/Controllers/System/ConfigurationController.php index 3945e0680a..0002de25a4 100644 --- a/app/Api/V2/Controllers/System/ConfigurationController.php +++ b/app/Api/V2/Controllers/System/ConfigurationController.php @@ -24,6 +24,9 @@ declare(strict_types=1); namespace FireflyIII\Api\V2\Controllers\System; +/** + * Class ConfigurationController + */ class ConfigurationController { } diff --git a/app/Api/V2/Controllers/System/DebugController.php b/app/Api/V2/Controllers/System/DebugController.php index f1c07c8163..5f9838c023 100644 --- a/app/Api/V2/Controllers/System/DebugController.php +++ b/app/Api/V2/Controllers/System/DebugController.php @@ -26,6 +26,9 @@ namespace FireflyIII\Api\V2\Controllers\System; use FireflyIII\Api\V2\Controllers\Controller; +/** + * Class DebugController + */ class DebugController extends Controller { } diff --git a/app/Console/Commands/Correction/DeleteEmptyJournals.php b/app/Console/Commands/Correction/DeleteEmptyJournals.php index bf10ef7ec2..887533667a 100644 --- a/app/Console/Commands/Correction/DeleteEmptyJournals.php +++ b/app/Console/Commands/Correction/DeleteEmptyJournals.php @@ -97,6 +97,9 @@ class DeleteEmptyJournals extends Command } } + /** + * @return void + */ private function deleteEmptyJournals(): void { $count = 0; diff --git a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php index e8e6a55f9e..802609decd 100644 --- a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php +++ b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php @@ -65,6 +65,9 @@ class DeleteOrphanedTransactions extends Command return 0; } + /** + * @return void + */ private function deleteOrphanedJournals(): void { $set = TransactionJournal::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id') diff --git a/app/Console/Commands/Correction/FixAccountTypes.php b/app/Console/Commands/Correction/FixAccountTypes.php index eadee90d4f..019cb655ee 100644 --- a/app/Console/Commands/Correction/FixAccountTypes.php +++ b/app/Console/Commands/Correction/FixAccountTypes.php @@ -89,6 +89,7 @@ class FixAccountTypes extends Command * @param TransactionJournal $journal * * @throws FireflyException + * @throws JsonException */ private function inspectJournal(TransactionJournal $journal): void { diff --git a/app/Console/Commands/Correction/TriggerCreditCalculation.php b/app/Console/Commands/Correction/TriggerCreditCalculation.php index 6b4ac9afd9..5bdef88135 100644 --- a/app/Console/Commands/Correction/TriggerCreditCalculation.php +++ b/app/Console/Commands/Correction/TriggerCreditCalculation.php @@ -29,6 +29,9 @@ class TriggerCreditCalculation extends Command return 0; } + /** + * @return void + */ private function processAccounts(): void { $accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php index a94dbd85bf..d3c03f1e8c 100644 --- a/app/Console/Commands/Export/ExportData.php +++ b/app/Console/Commands/Export/ExportData.php @@ -38,6 +38,8 @@ use Illuminate\Console\Command; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Log; use InvalidArgumentException; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class ExportData @@ -83,6 +85,8 @@ class ExportData extends Command * * @return int * @throws FireflyException + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function handle(): int { diff --git a/app/Console/Commands/Integrity/UpdateGroupInformation.php b/app/Console/Commands/Integrity/UpdateGroupInformation.php index b94c33b4b4..7f100e8797 100644 --- a/app/Console/Commands/Integrity/UpdateGroupInformation.php +++ b/app/Console/Commands/Integrity/UpdateGroupInformation.php @@ -73,6 +73,10 @@ class UpdateGroupInformation extends Command return 0; } + /** + * @param User $user + * @return void + */ private function updateGroupInfo(User $user): void { $group = $user->userGroup; diff --git a/app/Console/Commands/System/ForceDecimalSize.php b/app/Console/Commands/System/ForceDecimalSize.php index 3def35e188..70b2e7384d 100644 --- a/app/Console/Commands/System/ForceDecimalSize.php +++ b/app/Console/Commands/System/ForceDecimalSize.php @@ -92,7 +92,6 @@ class ForceDecimalSize extends Command /** * Execute the console command. * - * @throws FireflyException */ public function handle(): int { @@ -110,6 +109,9 @@ class ForceDecimalSize extends Command return 0; } + /** + * @return void + */ private function determineDatabaseType(): void { // switch stuff based on database connection: @@ -155,6 +157,7 @@ class ForceDecimalSize extends Command * This method loops all enabled currencies and then calls the method that will fix all objects in this currency. * * @return void + * @throws FireflyException */ private function correctAmountsByCurrency(): void { diff --git a/app/Console/Commands/System/ForceMigration.php b/app/Console/Commands/System/ForceMigration.php index 2125bf178e..f437fa9482 100644 --- a/app/Console/Commands/System/ForceMigration.php +++ b/app/Console/Commands/System/ForceMigration.php @@ -32,6 +32,9 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; +/** + * Class ForceMigration + */ class ForceMigration extends Command { use ShowsFriendlyMessages; @@ -79,6 +82,9 @@ class ForceMigration extends Command return 0; } + /** + * @return void + */ private function forceMigration(): void { DB::commit(); diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php index c4526d72fd..85743f456a 100644 --- a/app/Console/Commands/Tools/Cron.php +++ b/app/Console/Commands/Tools/Cron.php @@ -64,6 +64,8 @@ class Cron extends Command /** * @return int + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function handle(): int { diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php index c03d26b2f2..73b6ffdf62 100644 --- a/app/Console/Commands/Upgrade/AccountCurrencies.php +++ b/app/Console/Commands/Upgrade/AccountCurrencies.php @@ -35,6 +35,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Console\Command; use Illuminate\Support\Facades\Log; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class AccountCurrencies @@ -94,6 +96,8 @@ class AccountCurrencies extends Command /** * @return bool + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ private function isExecuted(): bool { diff --git a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php index 81727a9f1c..d275d408b4 100644 --- a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php +++ b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php @@ -31,6 +31,9 @@ use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; +/** + * Class AppendBudgetLimitPeriods + */ class AppendBudgetLimitPeriods extends Command { use ShowsFriendlyMessages; @@ -54,7 +57,6 @@ class AppendBudgetLimitPeriods extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php index 3cfbd6c7e4..d25de2e6f8 100644 --- a/app/Console/Commands/Upgrade/BackToJournals.php +++ b/app/Console/Commands/Upgrade/BackToJournals.php @@ -61,7 +61,6 @@ class BackToJournals extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/DecryptDatabase.php b/app/Console/Commands/Upgrade/DecryptDatabase.php index be6dd577f2..0f584f9296 100644 --- a/app/Console/Commands/Upgrade/DecryptDatabase.php +++ b/app/Console/Commands/Upgrade/DecryptDatabase.php @@ -51,6 +51,8 @@ class DecryptDatabase extends Command * Execute the console command. * * @return int + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function handle(): int { diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php index c56c52341a..d143507aff 100644 --- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php +++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php @@ -58,7 +58,6 @@ class MigrateJournalNotes extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php index 425383f7b1..871f85389f 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php @@ -60,7 +60,6 @@ class MigrateRecurrenceMeta extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws JsonException * @throws NotFoundExceptionInterface */ diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php index 9d2d4887c4..567243a47d 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php @@ -59,7 +59,6 @@ class MigrateRecurrenceType extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php index b91ab3822b..466ddc5708 100644 --- a/app/Console/Commands/Upgrade/MigrateTagLocations.php +++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php @@ -58,7 +58,6 @@ class MigrateTagLocations extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int @@ -89,6 +88,9 @@ class MigrateTagLocations extends Command return false; } + /** + * @return void + */ private function migrateTagLocations(): void { $tags = Tag::get(); diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index ca6fafa9f1..78a364b4a9 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -64,6 +64,8 @@ class MigrateToGroups extends Command * Execute the console command. * * @return int + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function handle(): int { diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php index 4d86755989..3d31d8fe22 100644 --- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php @@ -61,7 +61,6 @@ class OtherCurrenciesCorrections extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 26414d04a4..556994f292 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -62,6 +62,8 @@ class TransferCurrenciesCorrections extends Command * Execute the console command. * * @return int + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function handle(): int { diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php index 37c357e86d..ac49e44aae 100644 --- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php +++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php @@ -53,7 +53,6 @@ class UpgradeLiabilities extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilitiesEight.php b/app/Console/Commands/Upgrade/UpgradeLiabilitiesEight.php index 4e15e9cd02..3e9ec7b604 100644 --- a/app/Console/Commands/Upgrade/UpgradeLiabilitiesEight.php +++ b/app/Console/Commands/Upgrade/UpgradeLiabilitiesEight.php @@ -56,7 +56,6 @@ class UpgradeLiabilitiesEight extends Command * * @return int * @throws ContainerExceptionInterface - * @throws FireflyException * @throws NotFoundExceptionInterface */ public function handle(): int diff --git a/app/Enums/RecurrenceRepetitionWeekend.php b/app/Enums/RecurrenceRepetitionWeekend.php index d19d7e541b..78ad764e16 100644 --- a/app/Enums/RecurrenceRepetitionWeekend.php +++ b/app/Enums/RecurrenceRepetitionWeekend.php @@ -24,6 +24,9 @@ declare(strict_types=1); namespace FireflyIII\Enums; +/** + * Class RecurrenceRepetitionWeekend + */ enum RecurrenceRepetitionWeekend: int { case WEEKEND_DO_NOTHING = 1; diff --git a/app/Enums/UserRoleEnum.php b/app/Enums/UserRoleEnum.php index e1d6ceb228..93beb532f1 100644 --- a/app/Enums/UserRoleEnum.php +++ b/app/Enums/UserRoleEnum.php @@ -24,6 +24,9 @@ declare(strict_types=1); namespace FireflyIII\Enums; +/** + * Class UserRoleEnum + */ enum UserRoleEnum: string { case CHANGE_PIGGY_BANKS = 'change_piggies'; diff --git a/app/Enums/WebhookDelivery.php b/app/Enums/WebhookDelivery.php index 3544cf950a..c09f3b1b07 100644 --- a/app/Enums/WebhookDelivery.php +++ b/app/Enums/WebhookDelivery.php @@ -24,6 +24,9 @@ declare(strict_types=1); namespace FireflyIII\Enums; +/** + * Class WebhookDelivery + */ enum WebhookDelivery: int { //case XML = 200; diff --git a/app/Enums/WebhookResponse.php b/app/Enums/WebhookResponse.php index 6d47af0255..8cf03a2ac4 100644 --- a/app/Enums/WebhookResponse.php +++ b/app/Enums/WebhookResponse.php @@ -24,6 +24,9 @@ declare(strict_types=1); namespace FireflyIII\Enums; +/** + * Class WebhookResponse + */ enum WebhookResponse: int { case TRANSACTIONS = 200; diff --git a/app/Events/NewVersionAvailable.php b/app/Events/NewVersionAvailable.php index 28193ae6af..9051f76e9c 100644 --- a/app/Events/NewVersionAvailable.php +++ b/app/Events/NewVersionAvailable.php @@ -26,6 +26,9 @@ namespace FireflyIII\Events; use Illuminate\Queue\SerializesModels; +/** + * Class NewVersionAvailable + */ class NewVersionAvailable extends Event { use SerializesModels; diff --git a/app/Events/RequestedSendWebhookMessages.php b/app/Events/RequestedSendWebhookMessages.php index 86193440c5..25381062d1 100644 --- a/app/Events/RequestedSendWebhookMessages.php +++ b/app/Events/RequestedSendWebhookMessages.php @@ -25,6 +25,9 @@ namespace FireflyIII\Events; use Illuminate\Queue\SerializesModels; +/** + * Class RequestedSendWebhookMessages + */ class RequestedSendWebhookMessages extends Event { use SerializesModels; diff --git a/app/Handlers/Events/APIEventHandler.php b/app/Handlers/Events/APIEventHandler.php index 6545a6842d..b32406bb26 100644 --- a/app/Handlers/Events/APIEventHandler.php +++ b/app/Handlers/Events/APIEventHandler.php @@ -41,7 +41,6 @@ class APIEventHandler * * @param AccessTokenCreated $event * - * @throws FireflyException */ public function accessTokenCreated(AccessTokenCreated $event): void { diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php index 1e81ec92ae..257e5d0156 100644 --- a/app/Helpers/Collector/GroupCollector.php +++ b/app/Helpers/Collector/GroupCollector.php @@ -480,6 +480,7 @@ class GroupCollector implements GroupCollectorInterface * Return the groups. * * @return Collection + * @throws FireflyException */ public function getGroups(): Collection { diff --git a/app/Helpers/Fiscal/FiscalHelper.php b/app/Helpers/Fiscal/FiscalHelper.php index 3d88481c41..d388d6d24b 100644 --- a/app/Helpers/Fiscal/FiscalHelper.php +++ b/app/Helpers/Fiscal/FiscalHelper.php @@ -48,7 +48,6 @@ class FiscalHelper implements FiscalHelperInterface * @param Carbon $date * * @return Carbon date object - * @throws FireflyException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 7dfbdf1596..82520fa5e8 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -155,12 +155,13 @@ class ReconcileController extends Controller * Submit a new reconciliation. * * @param ReconciliationStoreRequest $request - * @param Account $account - * @param Carbon $start - * @param Carbon $end + * @param Account $account + * @param Carbon $start + * @param Carbon $end * * @return RedirectResponse|Redirector * @throws DuplicateTransactionException + * @throws JsonException */ public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index c1cad3b239..664f5fd996 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -63,7 +63,6 @@ class ConfigurationController extends Controller * Show configuration index. * * @return Factory|View - * @throws FireflyException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 73fea12c8e..c0467b3daa 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -58,7 +58,6 @@ class HomeController extends Controller * Index of the admin. * * @return Factory|View - * @throws FireflyException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ @@ -83,6 +82,10 @@ class HomeController extends Controller return view('admin.index', compact('title', 'mainTitleIcon', 'email', 'notifications', 'slackUrl')); } + /** + * @param Request $request + * @return RedirectResponse + */ public function notifications(Request $request): RedirectResponse { foreach (config('firefly.admin_notifications') as $item) { diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 06faaca447..724bf836fb 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -89,7 +89,7 @@ class UserController extends Controller /** * @param InvitedUser $invitedUser - * @return RedirectResponse + * @return JsonResponse */ public function deleteInvite(InvitedUser $invitedUser): JsonResponse { diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php index 7406a23a85..a9334ac117 100644 --- a/app/Http/Controllers/Category/NoCategoryController.php +++ b/app/Http/Controllers/Category/NoCategoryController.php @@ -79,7 +79,6 @@ class NoCategoryController extends Controller * * @return Factory|View * @throws FireflyException - * @throws JsonException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ @@ -119,7 +118,6 @@ class NoCategoryController extends Controller * @param Request $request * * @return Factory|View - * @throws FireflyException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 9565ef75e5..ef3a19d9f3 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -72,7 +72,6 @@ class ReportController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws FireflyException */ public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Export/IndexController.php b/app/Http/Controllers/Export/IndexController.php index ad0cb4b99a..0c1e84f4a3 100644 --- a/app/Http/Controllers/Export/IndexController.php +++ b/app/Http/Controllers/Export/IndexController.php @@ -32,6 +32,8 @@ use FireflyIII\Support\Export\ExportDataGenerator; use Illuminate\Contracts\View\Factory; use Illuminate\Http\Response as LaravelResponse; use Illuminate\View\View; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class IndexController @@ -65,6 +67,8 @@ class IndexController extends Controller /** * @return LaravelResponse * @throws FireflyException + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ public function export(): LaravelResponse { diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index 97d84bd088..d318c31f70 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -145,9 +145,6 @@ class RecurrenceController extends Controller * @param Request $request * * @return JsonResponse - * @throws FireflyException - * @throws ContainerExceptionInterface - * @throws NotFoundExceptionInterface */ public function suggest(Request $request): JsonResponse { diff --git a/app/Http/Requests/InviteUserFormRequest.php b/app/Http/Requests/InviteUserFormRequest.php index d094472aa3..d751e26f54 100644 --- a/app/Http/Requests/InviteUserFormRequest.php +++ b/app/Http/Requests/InviteUserFormRequest.php @@ -28,6 +28,9 @@ use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; +/** + * Class InviteUserFormRequest + */ class InviteUserFormRequest extends FormRequest { use ConvertsDataTypes; diff --git a/app/Http/Requests/TriggerRecurrenceRequest.php b/app/Http/Requests/TriggerRecurrenceRequest.php index 6add29444e..1f5174cb94 100644 --- a/app/Http/Requests/TriggerRecurrenceRequest.php +++ b/app/Http/Requests/TriggerRecurrenceRequest.php @@ -27,6 +27,9 @@ use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; +/** + * Class TriggerRecurrenceRequest + */ class TriggerRecurrenceRequest extends FormRequest { use ConvertsDataTypes; diff --git a/app/Jobs/DownloadExchangeRates.php b/app/Jobs/DownloadExchangeRates.php index 8519838eeb..d18c6837a1 100644 --- a/app/Jobs/DownloadExchangeRates.php +++ b/app/Jobs/DownloadExchangeRates.php @@ -124,6 +124,12 @@ class DownloadExchangeRates implements ShouldQueue $this->saveRates($currency, $date, $json['rates']); } + /** + * @param TransactionCurrency $currency + * @param Carbon $date + * @param array $rates + * @return void + */ private function saveRates(TransactionCurrency $currency, Carbon $date, array $rates): void { foreach ($rates as $code => $rate) { @@ -166,6 +172,13 @@ class DownloadExchangeRates implements ShouldQueue return $currency; } + /** + * @param TransactionCurrency $from + * @param TransactionCurrency $to + * @param Carbon $date + * @param float $rate + * @return void + */ private function saveRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date, float $rate): void { foreach ($this->users as $user) { diff --git a/app/Mail/BillWarningMail.php b/app/Mail/BillWarningMail.php index 7984a2bff9..e1811e9ebc 100644 --- a/app/Mail/BillWarningMail.php +++ b/app/Mail/BillWarningMail.php @@ -29,6 +29,9 @@ use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; +/** + * Class BillWarningMail + */ class BillWarningMail extends Mailable { use Queueable; diff --git a/app/Mail/InvitationMail.php b/app/Mail/InvitationMail.php index 6d87b56e64..faa1fa8582 100644 --- a/app/Mail/InvitationMail.php +++ b/app/Mail/InvitationMail.php @@ -28,6 +28,9 @@ use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; +/** + * Class InvitationMail + */ class InvitationMail extends Mailable { use Queueable; diff --git a/app/Mail/ReportNewJournalsMail.php b/app/Mail/ReportNewJournalsMail.php index 80ae173355..62e6a12cd4 100644 --- a/app/Mail/ReportNewJournalsMail.php +++ b/app/Mail/ReportNewJournalsMail.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Mail; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionGroup; use FireflyIII\Transformers\TransactionGroupTransformer; use Illuminate\Bus\Queueable; @@ -69,6 +70,10 @@ class ReportNewJournalsMail extends Mailable ->subject((string)trans_choice('email.new_journals_subject', $this->groups->count())); } + /** + * @return void + * @throws FireflyException + */ private function transform(): void { /** @var TransactionGroupTransformer $transformer */ diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php index 47419033c5..c3e114b436 100644 --- a/app/Models/AvailableBudget.php +++ b/app/Models/AvailableBudget.php @@ -126,6 +126,9 @@ class AvailableBudget extends Model return $this->belongsTo(TransactionCurrency::class); } + /** + * @return Attribute + */ protected function amount(): Attribute { return Attribute::make( diff --git a/app/Models/InvitedUser.php b/app/Models/InvitedUser.php index e7ea080af2..b0203f49f3 100644 --- a/app/Models/InvitedUser.php +++ b/app/Models/InvitedUser.php @@ -71,8 +71,7 @@ class InvitedUser extends Model * * @param string $value * - * @return WebhookAttempt - * @throws NotFoundHttpException + * @return InvitedUser */ public static function routeBinder(string $value): InvitedUser { diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.php index 11ce5c77b4..3ca2352bd6 100644 --- a/app/Models/UserGroup.php +++ b/app/Models/UserGroup.php @@ -34,13 +34,13 @@ use Illuminate\Support\Carbon; /** * Class UserGroup * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property string|null $deleted_at - * @property string $title + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $deleted_at + * @property string $title * @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 newQuery() * @method static Builder|UserGroup query() @@ -49,12 +49,8 @@ use Illuminate\Support\Carbon; * @method static Builder|UserGroup whereId($value) * @method static Builder|UserGroup whereTitle($value) * @method static Builder|UserGroup whereUpdatedAt($value) - * @property-read Collection $accounts - * @property-read int|null $accounts_count - * @property-read Collection $accounts - * @property-read Collection $accounts - * @property-read Collection $accounts - * @property-read Collection $accounts + * @property-read Collection $accounts + * @property-read int|null $accounts_count * @mixin Eloquent */ class UserGroup extends Model diff --git a/app/Notifications/User/NewAccessToken.php b/app/Notifications/User/NewAccessToken.php index 42e4745414..9f12bded2f 100644 --- a/app/Notifications/User/NewAccessToken.php +++ b/app/Notifications/User/NewAccessToken.php @@ -29,6 +29,9 @@ use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; +/** + * Class NewAccessToken + */ class NewAccessToken extends Notification { use Queueable; diff --git a/app/Notifications/User/TransactionCreation.php b/app/Notifications/User/TransactionCreation.php index 223c0b1766..6da707ed25 100644 --- a/app/Notifications/User/TransactionCreation.php +++ b/app/Notifications/User/TransactionCreation.php @@ -28,6 +28,9 @@ use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +/** + * Class TransactionCreation + */ class TransactionCreation extends Notification { use Queueable; diff --git a/app/Notifications/User/UserLogin.php b/app/Notifications/User/UserLogin.php index dd0b3aae2a..958918f198 100644 --- a/app/Notifications/User/UserLogin.php +++ b/app/Notifications/User/UserLogin.php @@ -31,6 +31,9 @@ use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Log; +/** + * Class UserLogin + */ class UserLogin extends Notification { use Queueable; diff --git a/app/Notifications/User/UserNewPassword.php b/app/Notifications/User/UserNewPassword.php index d3373697c6..85aa559b03 100644 --- a/app/Notifications/User/UserNewPassword.php +++ b/app/Notifications/User/UserNewPassword.php @@ -28,6 +28,9 @@ use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +/** + * Class UserNewPassword + */ class UserNewPassword extends Notification { use Queueable; diff --git a/app/Notifications/User/UserRegistration.php b/app/Notifications/User/UserRegistration.php index ed547fd267..fe5e8d058d 100644 --- a/app/Notifications/User/UserRegistration.php +++ b/app/Notifications/User/UserRegistration.php @@ -28,6 +28,9 @@ use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +/** + * Class UserRegistration + */ class UserRegistration extends Notification { use Queueable; diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 0eca49e48e..e8013b9bea 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -766,10 +766,11 @@ class AccountRepository implements AccountRepositoryInterface /** * @param Account $account - * @param array $data + * @param array $data * * @return Account * @throws FireflyException + * @throws JsonException */ public function update(Account $account, array $data): Account { diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 8be55d8617..db8934c87c 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -873,6 +873,9 @@ class BudgetRepository implements BudgetRepositoryInterface return $newBudget; } + /** + * @return int + */ public function getMaxOrder(): int { return (int)$this->user->budgets()->max('order'); diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index 0c0d43f725..c3dedca87b 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -169,6 +169,11 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface return $query->get(['journal_links.*']); } + /** + * @param TransactionJournal $one + * @param TransactionJournal $two + * @return TransactionJournalLink|null + */ public function getLink(TransactionJournal $one, TransactionJournal $two): ?TransactionJournalLink { $left = TransactionJournalLink::whereDestinationId($one->id)->whereSourceId($two->id)->first(); diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index 492213f307..0d09ea7225 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -43,6 +43,12 @@ trait ModifiesPiggyBanks { use CreatesObjectGroups; + /** + * @param PiggyBankRepetition $repetition + * @param string $amount + * @param TransactionJournal $journal + * @return void + */ public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void { Log::debug(sprintf('addAmountToRepetition: %s', $amount)); @@ -56,6 +62,12 @@ trait ModifiesPiggyBanks } } + /** + * @param PiggyBank $piggyBank + * @param string $amount + * @param TransactionJournal|null $journal + * @return bool + */ public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool { $repetition = $this->getRepetition($piggyBank); diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 81c55cce98..c07ca15671 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -45,6 +45,12 @@ interface PiggyBankRepositoryInterface */ public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool; + /** + * @param PiggyBankRepetition $repetition + * @param string $amount + * @param TransactionJournal $journal + * @return void + */ public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void; /** diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index 5b49d3b6fc..5687387227 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -567,6 +567,7 @@ class RecurringRepository implements RecurringRepositoryInterface * * @return Recurrence * @throws FireflyException + * @throws JsonException */ public function store(array $data): Recurrence { diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 5bb3c41703..4b700625fb 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -399,7 +399,13 @@ trait AccountServiceTrait * Create the opposing "credit liability" transaction for credit liabilities. * * + * @param Account $account + * @param string $direction + * @param string $openingBalance + * @param Carbon $openingBalanceDate + * @return TransactionGroup * @throws FireflyException + * @throws JsonException */ protected function updateCreditTransaction(Account $account, string $direction, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup { @@ -606,11 +612,12 @@ trait AccountServiceTrait * Since opening balance and date can still be empty strings, it may fail. * * @param Account $account - * @param string $openingBalance - * @param Carbon $openingBalanceDate + * @param string $openingBalance + * @param Carbon $openingBalanceDate * * @return TransactionGroup * @throws FireflyException + * @throws JsonException */ protected function updateOBGroupV2(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup { diff --git a/app/Services/Internal/Support/CreditRecalculateService.php b/app/Services/Internal/Support/CreditRecalculateService.php index a4bad60032..56cce8b8d9 100644 --- a/app/Services/Internal/Support/CreditRecalculateService.php +++ b/app/Services/Internal/Support/CreditRecalculateService.php @@ -34,6 +34,9 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Support\Facades\Log; +/** + * Class CreditRecalculateService + */ class CreditRecalculateService { private ?Account $account; @@ -203,11 +206,10 @@ class CreditRecalculateService } /** - * @param Account $account - * @param string $direction + * @param Account $account + * @param string $direction * @param Transaction $transaction - * @param string $amount - * + * @param string $leftOfDebt * @return string */ private function processTransaction(Account $account, string $direction, Transaction $transaction, string $leftOfDebt): string diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index 75fb2b9ea9..aa927e8dce 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -241,6 +241,10 @@ class AccountUpdateService return $account; } + /** + * @param array $array + * @return array + */ private function getTypeIds(array $array): array { $return = []; diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.php index 040138a74a..7032c167cb 100644 --- a/app/Services/Internal/Update/GroupUpdateService.php +++ b/app/Services/Internal/Update/GroupUpdateService.php @@ -42,11 +42,12 @@ class GroupUpdateService * Update a transaction group. * * @param TransactionGroup $transactionGroup - * @param array $data + * @param array $data * * @return TransactionGroup * @throws DuplicateTransactionException * @throws FireflyException + * @throws JsonException */ public function update(TransactionGroup $transactionGroup, array $data): TransactionGroup { diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php index 929cca6dc5..58ce142c37 100644 --- a/app/Services/Internal/Update/RecurrenceUpdateService.php +++ b/app/Services/Internal/Update/RecurrenceUpdateService.php @@ -211,7 +211,9 @@ class RecurrenceUpdateService * TODO this method is very complex. * * @param Recurrence $recurrence - * @param array $transactions + * @param array $transactions + * @throws FireflyException + * @throws \JsonException */ private function updateTransactions(Recurrence $recurrence, array $transactions): void { diff --git a/app/Support/Calendar/Calculator.php b/app/Support/Calendar/Calculator.php index b4475c7df7..f997f0a544 100644 --- a/app/Support/Calendar/Calculator.php +++ b/app/Support/Calendar/Calculator.php @@ -1,5 +1,7 @@ contains($periodicity); } + /** + * @param Periodicity $periodicity + * @return bool + */ public function isAvailablePeriodicity(Periodicity $periodicity): bool { return self::containsInterval($periodicity); } + /** + * @param int $skip + * @return int + */ private function skipInterval(int $skip): int { return self::DEFAULT_INTERVAL + $skip; diff --git a/app/Support/Calendar/Exceptions/IntervalException.php b/app/Support/Calendar/Exceptions/IntervalException.php index e30621f5a1..d645c8da34 100644 --- a/app/Support/Calendar/Exceptions/IntervalException.php +++ b/app/Support/Calendar/Exceptions/IntervalException.php @@ -1,5 +1,7 @@ name, diff --git a/app/Support/Calendar/Periodicity.php b/app/Support/Calendar/Periodicity.php index 83d5d449f9..7bb545d72b 100644 --- a/app/Support/Calendar/Periodicity.php +++ b/app/Support/Calendar/Periodicity.php @@ -1,5 +1,7 @@ * @@ -21,6 +23,9 @@ namespace FireflyIII\Support\Calendar; +/** + * Class Periodicity + */ enum Periodicity { case Daily; diff --git a/app/Support/Calendar/Periodicity/Bimonthly.php b/app/Support/Calendar/Periodicity/Bimonthly.php index b521813bc1..016f75c6a6 100644 --- a/app/Support/Calendar/Periodicity/Bimonthly.php +++ b/app/Support/Calendar/Periodicity/Bimonthly.php @@ -1,5 +1,7 @@ * @@ -21,7 +23,10 @@ namespace FireflyIII\Support\Calendar\Periodicity; +/** + * Class Bimonthly + */ final class Bimonthly extends Monthly { - const INTERVAL = 2; + public const INTERVAL = 2; } diff --git a/app/Support/Calendar/Periodicity/Daily.php b/app/Support/Calendar/Periodicity/Daily.php index 1ca47c983a..398bb178a8 100644 --- a/app/Support/Calendar/Periodicity/Daily.php +++ b/app/Support/Calendar/Periodicity/Daily.php @@ -1,5 +1,7 @@ * @@ -23,8 +25,16 @@ namespace FireflyIII\Support\Calendar\Periodicity; use Carbon\Carbon; +/** + * Class Daily + */ final class Daily extends Interval { + /** + * @param Carbon $date + * @param int $interval + * @return Carbon + */ public function nextDate(Carbon $date, int $interval = 1): Carbon { return ($date->clone())->addDays($this->skip($interval)); diff --git a/app/Support/Calendar/Periodicity/Fortnightly.php b/app/Support/Calendar/Periodicity/Fortnightly.php index cd9af54441..5698d46d80 100644 --- a/app/Support/Calendar/Periodicity/Fortnightly.php +++ b/app/Support/Calendar/Periodicity/Fortnightly.php @@ -1,5 +1,7 @@ * @@ -21,7 +23,10 @@ namespace FireflyIII\Support\Calendar\Periodicity; +/** + * Class Fortnightly + */ final class Fortnightly extends Weekly { - const INTERVAL = 2; + public const INTERVAL = 2; } diff --git a/app/Support/Calendar/Periodicity/HalfYearly.php b/app/Support/Calendar/Periodicity/HalfYearly.php index f5bb2f0308..0ceab46d40 100644 --- a/app/Support/Calendar/Periodicity/HalfYearly.php +++ b/app/Support/Calendar/Periodicity/HalfYearly.php @@ -1,5 +1,7 @@ * @@ -21,7 +23,10 @@ namespace FireflyIII\Support\Calendar\Periodicity; +/** + * Class HalfYearly + */ final class HalfYearly extends Monthly { - const INTERVAL = 6; + public const INTERVAL = 6; } diff --git a/app/Support/Calendar/Periodicity/Interspacable.php b/app/Support/Calendar/Periodicity/Interspacable.php index e61f360dff..41d1d03ea3 100644 --- a/app/Support/Calendar/Periodicity/Interspacable.php +++ b/app/Support/Calendar/Periodicity/Interspacable.php @@ -1,5 +1,7 @@ * @@ -23,7 +25,15 @@ namespace FireflyIII\Support\Calendar\Periodicity; use Carbon\Carbon; +/** + * Interface Interspacable + */ interface Interspacable { + /** + * @param Carbon $date + * @param int $interval + * @return Carbon + */ public function nextDate(Carbon $date, int $interval = 1): Carbon; } diff --git a/app/Support/Calendar/Periodicity/Interval.php b/app/Support/Calendar/Periodicity/Interval.php index 1e40ef27b8..e10e71584f 100644 --- a/app/Support/Calendar/Periodicity/Interval.php +++ b/app/Support/Calendar/Periodicity/Interval.php @@ -1,5 +1,7 @@ * @@ -21,10 +23,17 @@ namespace FireflyIII\Support\Calendar\Periodicity; +/** + * Class Interval + */ abstract class Interval implements Interspacable { - const INTERVAL = 1; + public const INTERVAL = 1; + /** + * @param int $skip + * @return int + */ public function skip(int $skip): int { return static::INTERVAL * $skip; diff --git a/app/Support/Calendar/Periodicity/Monthly.php b/app/Support/Calendar/Periodicity/Monthly.php index e1739a643a..d179daa0d6 100644 --- a/app/Support/Calendar/Periodicity/Monthly.php +++ b/app/Support/Calendar/Periodicity/Monthly.php @@ -1,5 +1,7 @@ * @@ -23,8 +25,16 @@ namespace FireflyIII\Support\Calendar\Periodicity; use Carbon\Carbon; +/** + * Class Monthly + */ class Monthly extends Interval { + /** + * @param Carbon $date + * @param int $interval + * @return Carbon + */ public function nextDate(Carbon $date, int $interval = 1): Carbon { return ($date->clone())->addMonthsNoOverflow($this->skip($interval)); diff --git a/app/Support/Calendar/Periodicity/Quarterly.php b/app/Support/Calendar/Periodicity/Quarterly.php index 46bac74728..c7bd595e68 100644 --- a/app/Support/Calendar/Periodicity/Quarterly.php +++ b/app/Support/Calendar/Periodicity/Quarterly.php @@ -1,5 +1,7 @@ * @@ -21,7 +23,10 @@ namespace FireflyIII\Support\Calendar\Periodicity; +/** + * Class Quarterly + */ final class Quarterly extends Monthly { - const INTERVAL = 3; + public const INTERVAL = 3; } diff --git a/app/Support/Calendar/Periodicity/Weekly.php b/app/Support/Calendar/Periodicity/Weekly.php index fa0724cefc..3d36e6b2f7 100644 --- a/app/Support/Calendar/Periodicity/Weekly.php +++ b/app/Support/Calendar/Periodicity/Weekly.php @@ -1,5 +1,7 @@ * @@ -23,8 +25,16 @@ namespace FireflyIII\Support\Calendar\Periodicity; use Carbon\Carbon; +/** + * Class Weekly + */ class Weekly extends Interval { + /** + * @param Carbon $date + * @param int $interval + * @return Carbon + */ public function nextDate(Carbon $date, int $interval = 1): Carbon { return ($date->clone())->addWeeks($this->skip($interval)); diff --git a/app/Support/Calendar/Periodicity/Yearly.php b/app/Support/Calendar/Periodicity/Yearly.php index 466cb19640..55aa749c23 100644 --- a/app/Support/Calendar/Periodicity/Yearly.php +++ b/app/Support/Calendar/Periodicity/Yearly.php @@ -1,5 +1,7 @@ * @@ -23,8 +25,16 @@ namespace FireflyIII\Support\Calendar\Periodicity; use Carbon\Carbon; +/** + * Class Yearly + */ final class Yearly extends Interval { + /** + * @param Carbon $date + * @param int $interval + * @return Carbon + */ public function nextDate(Carbon $date, int $interval = 1): Carbon { return ($date->clone())->addYearsNoOverflow($this->skip($interval)); diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php index e9ab02ec68..393ec30f08 100644 --- a/app/Support/Export/ExportDataGenerator.php +++ b/app/Support/Export/ExportDataGenerator.php @@ -142,6 +142,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportAccounts(): string @@ -227,6 +229,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportBills(): string @@ -294,6 +298,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportBudgets(): string @@ -359,6 +365,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportCategories(): string @@ -408,6 +416,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportPiggies(): string @@ -486,6 +496,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportRecurring(): string @@ -648,6 +660,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportRules(): string @@ -777,8 +791,10 @@ class ExportDataGenerator /** * @return string - * @throws FireflyException + * @throws CannotInsertRecord * @throws ContainerExceptionInterface + * @throws Exception + * @throws FireflyException * @throws NotFoundExceptionInterface */ private function exportTags(): string @@ -838,6 +854,8 @@ class ExportDataGenerator /** * @return string + * @throws CannotInsertRecord + * @throws Exception * @throws FireflyException */ private function exportTransactions(): string diff --git a/app/Support/Http/Api/ConvertsExchangeRates.php b/app/Support/Http/Api/ConvertsExchangeRates.php index 74bf39a2d1..ac3d631941 100644 --- a/app/Support/Http/Api/ConvertsExchangeRates.php +++ b/app/Support/Http/Api/ConvertsExchangeRates.php @@ -253,6 +253,13 @@ trait ConvertsExchangeRates return $return; } + /** + * @param string $amount + * @param TransactionCurrency $from + * @param TransactionCurrency $to + * @param Carbon|null $date + * @return string + */ private function convertAmount(string $amount, TransactionCurrency $from, TransactionCurrency $to, ?Carbon $date = null): string { Log::debug(sprintf('Converting %s from %s to %s', $amount, $from->code, $to->code)); diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index f8e435c675..05200c3c83 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -40,6 +40,9 @@ class Navigation { private Calculator $calculator; + /** + * @param Calculator|null $calculator + */ public function __construct(Calculator $calculator = null) { $this->calculator = ($calculator instanceof Calculator) ?: new Calculator(); diff --git a/app/Support/Repositories/Administration/AdministrationTrait.php b/app/Support/Repositories/Administration/AdministrationTrait.php index 7121da6a41..1476435434 100644 --- a/app/Support/Repositories/Administration/AdministrationTrait.php +++ b/app/Support/Repositories/Administration/AdministrationTrait.php @@ -58,6 +58,7 @@ trait AdministrationTrait /** * @return void + * @throws FireflyException */ private function refreshAdministration(): void { @@ -74,6 +75,10 @@ trait AdministrationTrait throw new FireflyException(sprintf('Cannot validate administration for user #%d', $this->user->id)); } + /** + * @param Authenticatable|User|null $user + * @return void + */ public function setUser(Authenticatable | User | null $user): void { if (null !== $user) { diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php index 94a2fd29f0..967fb7a986 100644 --- a/app/Support/Request/ConvertsDataTypes.php +++ b/app/Support/Request/ConvertsDataTypes.php @@ -210,6 +210,10 @@ trait ConvertsDataTypes return false; } + /** + * @param string|null $string + * @return Carbon|null + */ protected function convertDateTime(?string $string): ?Carbon { $value = $this->get($string); diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index d8ea9dfd13..4281ff1539 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -406,6 +406,9 @@ class General extends AbstractExtension ); } + /** + * @return TwigFunction + */ protected function getRootSearchOperator(): TwigFunction { return new TwigFunction( diff --git a/app/Transformers/V2/TransactionGroupTransformer.php b/app/Transformers/V2/TransactionGroupTransformer.php index c06a9d4b23..dce940425e 100644 --- a/app/Transformers/V2/TransactionGroupTransformer.php +++ b/app/Transformers/V2/TransactionGroupTransformer.php @@ -117,6 +117,10 @@ class TransactionGroupTransformer extends AbstractTransformer return $return; } + /** + * @param array $transaction + * @return array + */ private function transformTransaction(array $transaction): array { $transaction = new NullArrayObject($transaction); diff --git a/app/Validation/GroupValidation.php b/app/Validation/GroupValidation.php index c9747fdec2..d2ccd7bdcd 100644 --- a/app/Validation/GroupValidation.php +++ b/app/Validation/GroupValidation.php @@ -38,6 +38,7 @@ trait GroupValidation { /** * @param Validator $validator + * @throws FireflyException */ protected function preventNoAccountInfo(Validator $validator): void { diff --git a/app/Validation/RecurrenceValidation.php b/app/Validation/RecurrenceValidation.php index 2f5b35dd1a..a3223480d0 100644 --- a/app/Validation/RecurrenceValidation.php +++ b/app/Validation/RecurrenceValidation.php @@ -167,6 +167,10 @@ trait RecurrenceValidation } } + /** + * @param Validator $validator + * @return void + */ public function validateRecurringConfig(Validator $validator) { $data = $validator->getData(); @@ -322,6 +326,7 @@ trait RecurrenceValidation } /** + * @param Recurrence $recurrence * @param Validator $validator * @return void */ diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.php index 6d087944a1..4a636d1bfa 100644 --- a/app/Validation/TransactionValidation.php +++ b/app/Validation/TransactionValidation.php @@ -347,8 +347,9 @@ trait TransactionValidation /** * Validates the given account information. Switches on given transaction type. * - * @param Validator $validator + * @param Validator $validator * @param TransactionGroup $transactionGroup + * @throws FireflyException */ public function validateAccountInformationUpdate(Validator $validator, TransactionGroup $transactionGroup): void { diff --git a/composer.lock b/composer.lock index 5f024d53d1..7d8c639488 100644 --- a/composer.lock +++ b/composer.lock @@ -9001,22 +9001,22 @@ }, { "name": "composer/class-map-generator", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9", + "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9", "shasum": "" }, "require": { - "composer/pcre": "^2 || ^3", + "composer/pcre": "^2.1 || ^3.1", "php": "^7.2 || ^8.0", - "symfony/finder": "^4.4 || ^5.3 || ^6" + "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" }, "require-dev": { "phpstan/phpstan": "^1.6", @@ -9054,7 +9054,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + "source": "https://github.com/composer/class-map-generator/tree/1.1.0" }, "funding": [ { @@ -9070,7 +9070,7 @@ "type": "tidelift" } ], - "time": "2022-06-19T11:31:27+00:00" + "time": "2023-06-30T13:58:57+00:00" }, { "name": "composer/pcre", @@ -9933,16 +9933,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.0", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", "shasum": "" }, "require": { @@ -9974,9 +9974,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" }, - "time": "2023-06-01T12:35:21+00:00" + "time": "2023-06-29T20:46:06+00:00" }, { "name": "phpstan/phpstan", @@ -10459,16 +10459,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.2.2", + "version": "10.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95" + "reference": "35c8cac1734ede2ae354a6644f7088356ff5b08e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ab521b24b88b88310c40c26c0cc4a94ba40ff95", - "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35c8cac1734ede2ae354a6644f7088356ff5b08e", + "reference": "35c8cac1734ede2ae354a6644f7088356ff5b08e", "shasum": "" }, "require": { @@ -10540,7 +10540,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.3" }, "funding": [ { @@ -10556,7 +10556,7 @@ "type": "tidelift" } ], - "time": "2023-06-11T06:15:20+00:00" + "time": "2023-06-30T06:17:38+00:00" }, { "name": "sebastian/cli-parser", diff --git a/public/v1/js/ff/list/groups.js b/public/v1/js/ff/list/groups.js index 7ae1bcd98b..f29eaa1023 100644 --- a/public/v1/js/ff/list/groups.js +++ b/public/v1/js/ff/list/groups.js @@ -147,19 +147,19 @@ function updateListButtons() { * @returns {boolean} */ function goToMassEdit() { - console.log(mass_edit_url + '/' + getCheckboxes()); + console.log('Mass edit URL is ' + mass_edit_url + '/' + getCheckboxes()); window.location.href = mass_edit_url + '/' + getCheckboxes(); return false; } function goToBulkEdit() { - console.log(bulk_edit_url + '/' + getCheckboxes()); + console.log('Mass edit URL is ' + bulk_edit_url + '/' + getCheckboxes()); window.location.href = bulk_edit_url + '/' + getCheckboxes(); return false; } function goToMassDelete() { - console.log(mass_delete_url + '/' + getCheckboxes()); + console.log('Mass delete URL is ' + mass_delete_url + '/' + getCheckboxes()); window.location.href = mass_delete_url + '/' + getCheckboxes(); return false; } @@ -208,6 +208,7 @@ function updateActionButtons() { $('.action-menu').hide(); } } + function cloneTransaction(e) { var button = $(e.currentTarget); var groupId = parseInt(button.data('id')); diff --git a/public/v1/js/ff/transactions/list.js b/public/v1/js/ff/transactions/list.js index aec0630d3c..bb0588befc 100644 --- a/public/v1/js/ff/transactions/list.js +++ b/public/v1/js/ff/transactions/list.js @@ -66,6 +66,7 @@ function goToMassEdit() { if (bases.length > 0) { baseHref = bases[0].href; } + console.log('baseHref for mass edit is "' + baseHref + '".'); window.location.href = baseHref + 'transactions/mass/edit/' + checkedArray; return false; @@ -86,6 +87,7 @@ function goToBulkEdit() { if (bases.length > 0) { baseHref = bases[0].href; } + console.log('baseHref for bulk edit is "' + baseHref + '".'); window.location.href = baseHref + 'transactions/bulk/edit/' + checkedArray; return false; diff --git a/tests/unit/Support/Calendar/CalculatorProvider.php b/tests/unit/Support/Calendar/CalculatorProvider.php index 800adb15b0..493f625c0e 100644 --- a/tests/unit/Support/Calendar/CalculatorProvider.php +++ b/tests/unit/Support/Calendar/CalculatorProvider.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/CalculatorTest.php b/tests/unit/Support/Calendar/CalculatorTest.php index 29662db573..3149041eeb 100644 --- a/tests/unit/Support/Calendar/CalculatorTest.php +++ b/tests/unit/Support/Calendar/CalculatorTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/BimonthlyTest.php b/tests/unit/Support/Calendar/Periodicity/BimonthlyTest.php index 3bcd6977c5..c5066cdb7c 100644 --- a/tests/unit/Support/Calendar/Periodicity/BimonthlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/BimonthlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/DailyTest.php b/tests/unit/Support/Calendar/Periodicity/DailyTest.php index c1175891d1..e79df439ae 100644 --- a/tests/unit/Support/Calendar/Periodicity/DailyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/DailyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/FortnightlyTest.php b/tests/unit/Support/Calendar/Periodicity/FortnightlyTest.php index 3c2977074c..77aa33fd2f 100644 --- a/tests/unit/Support/Calendar/Periodicity/FortnightlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/FortnightlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/HalfYearlyTest.php b/tests/unit/Support/Calendar/Periodicity/HalfYearlyTest.php index b12d6410e5..80864cf15f 100644 --- a/tests/unit/Support/Calendar/Periodicity/HalfYearlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/HalfYearlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/IntervalProvider.php b/tests/unit/Support/Calendar/Periodicity/IntervalProvider.php index 88e3cd63ae..d8dd21e6a9 100644 --- a/tests/unit/Support/Calendar/Periodicity/IntervalProvider.php +++ b/tests/unit/Support/Calendar/Periodicity/IntervalProvider.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php b/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php index de3a640fd9..2254c11b63 100644 --- a/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php +++ b/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php @@ -1,5 +1,7 @@ * @@ -28,7 +30,7 @@ abstract class IntervalTestCase extends TestCase { abstract public static function factory(): Interval; - public abstract static function provideIntervals(): array; + abstract public static function provideIntervals(): array; public static function provider(): \Generator { diff --git a/tests/unit/Support/Calendar/Periodicity/MonthlyTest.php b/tests/unit/Support/Calendar/Periodicity/MonthlyTest.php index c7235729c3..35d13ac0aa 100644 --- a/tests/unit/Support/Calendar/Periodicity/MonthlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/MonthlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/QuarterlyTest.php b/tests/unit/Support/Calendar/Periodicity/QuarterlyTest.php index 60e6eba15c..6ddc3c7c08 100644 --- a/tests/unit/Support/Calendar/Periodicity/QuarterlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/QuarterlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/WeeklyTest.php b/tests/unit/Support/Calendar/Periodicity/WeeklyTest.php index 598886b52a..bad0104dbf 100644 --- a/tests/unit/Support/Calendar/Periodicity/WeeklyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/WeeklyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/Calendar/Periodicity/YearlyTest.php b/tests/unit/Support/Calendar/Periodicity/YearlyTest.php index 462f4ceaaa..3b49fc3e6a 100644 --- a/tests/unit/Support/Calendar/Periodicity/YearlyTest.php +++ b/tests/unit/Support/Calendar/Periodicity/YearlyTest.php @@ -1,5 +1,7 @@ * diff --git a/tests/unit/Support/NavigationTest.php b/tests/unit/Support/NavigationTest.php index 6ad2a395dd..29f8b9938a 100644 --- a/tests/unit/Support/NavigationTest.php +++ b/tests/unit/Support/NavigationTest.php @@ -1,5 +1,7 @@