diff --git a/app/Console/Commands/Correction/CreateLinkTypes.php b/app/Console/Commands/Correction/CreateLinkTypes.php index 73fcf9dc1d..7d93025e2a 100644 --- a/app/Console/Commands/Correction/CreateLinkTypes.php +++ b/app/Console/Commands/Correction/CreateLinkTypes.php @@ -47,7 +47,7 @@ class CreateLinkTypes extends Command /** * Execute the console command. * - * @return mixed + * @return int */ public function handle(): int { diff --git a/app/Console/Commands/Correction/DeleteEmptyGroups.php b/app/Console/Commands/Correction/DeleteEmptyGroups.php index f59e250023..083266a65e 100644 --- a/app/Console/Commands/Correction/DeleteEmptyGroups.php +++ b/app/Console/Commands/Correction/DeleteEmptyGroups.php @@ -50,7 +50,8 @@ class DeleteEmptyGroups extends Command * Execute the console command. * * @throws Exception; - * @return mixed + * + * @return int */ public function handle(): int { diff --git a/app/Console/Commands/Correction/EnableCurrencies.php b/app/Console/Commands/Correction/EnableCurrencies.php index b44306f3f5..4b85bc8cb9 100644 --- a/app/Console/Commands/Correction/EnableCurrencies.php +++ b/app/Console/Commands/Correction/EnableCurrencies.php @@ -52,7 +52,7 @@ class EnableCurrencies extends Command /** * Execute the console command. * - * @return mixed + * @return int */ public function handle(): int { diff --git a/app/Console/Commands/Correction/FixPiggies.php b/app/Console/Commands/Correction/FixPiggies.php index f13c52c868..faf61a361a 100644 --- a/app/Console/Commands/Correction/FixPiggies.php +++ b/app/Console/Commands/Correction/FixPiggies.php @@ -54,7 +54,7 @@ class FixPiggies extends Command /** * Execute the console command. * - * @return mixed + * @return int */ public function handle(): int { diff --git a/app/Console/Commands/Correction/RemoveBills.php b/app/Console/Commands/Correction/RemoveBills.php index 292bcd5e50..862d4bd851 100644 --- a/app/Console/Commands/Correction/RemoveBills.php +++ b/app/Console/Commands/Correction/RemoveBills.php @@ -48,7 +48,7 @@ class RemoveBills extends Command /** * Execute the console command. * - * @return mixed + * @return int */ public function handle(): int { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index e079322857..ce558d2858 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -116,8 +116,8 @@ class Handler extends ExceptionHandler * @param Exception $exception * * @throws Exception - * @return mixed|void * + * @return void */ public function report(Exception $exception) { diff --git a/app/Http/Controllers/Account/DeleteController.php b/app/Http/Controllers/Account/DeleteController.php index 2823266223..96d99582f6 100644 --- a/app/Http/Controllers/Account/DeleteController.php +++ b/app/Http/Controllers/Account/DeleteController.php @@ -71,7 +71,7 @@ class DeleteController extends Controller * * @param Account $account * - * @return Factory|View + * @return Factory|RedirectResponse|Redirector|View */ public function delete(Account $account) { diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 19ea840809..007f3ec1f2 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -81,8 +81,7 @@ class EditController extends Controller * @param Account $account * @param AccountRepositoryInterface $repository * - * @return Factory|View - * + * @return Factory|RedirectResponse|Redirector|View */ public function edit(Request $request, Account $account, AccountRepositoryInterface $repository) { diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 6e5106194f..c16ce9facd 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -216,7 +216,8 @@ class ReconcileController extends Controller * @param string $difference * * @throws DuplicateTransactionException - * @return string + * + * @return RedirectResponse|Redirector|string */ private function createReconciliation(Account $account, Carbon $start, Carbon $end, string $difference) { diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index c026325cdc..b2f5f973ff 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -86,7 +86,8 @@ class ShowController extends Controller * @param Carbon|null $end * * @throws Exception - * @return RedirectResponse|Redirector|View + * + * @return RedirectResponse|Redirector|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function show(Request $request, Account $account, Carbon $start = null, Carbon $end = null) { @@ -158,7 +159,8 @@ class ShowController extends Controller * @param Account $account * * @throws Exception - * @return RedirectResponse|Redirector|View + * + * @return RedirectResponse|Redirector|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function showAll(Request $request, Account $account) { diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index 134943c4e1..1ef1cc5d20 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -90,7 +90,7 @@ class LinkController extends Controller * @param Request $request * @param LinkType $linkType * - * @return RedirectResponse|Redirector|View + * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View */ public function delete(Request $request, LinkType $linkType) { diff --git a/app/Http/Controllers/Admin/TelemetryController.php b/app/Http/Controllers/Admin/TelemetryController.php index ec8dcddbad..74ec3c8058 100644 --- a/app/Http/Controllers/Admin/TelemetryController.php +++ b/app/Http/Controllers/Admin/TelemetryController.php @@ -55,7 +55,7 @@ class TelemetryController extends Controller } /** - * @return string + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function deleteSubmitted() { @@ -67,7 +67,7 @@ class TelemetryController extends Controller } /** - * @return string + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function deleteAll() { diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index d45cb00d97..a325c9181a 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -57,10 +57,9 @@ class ForgotPasswordController extends Controller * Send a reset link to the given user. * * @param Request $request - * * @param UserRepositoryInterface $repository * - * @return RedirectResponse|JsonResponse + * @return Factory|RedirectResponse|View */ public function sendResetLinkEmail(Request $request, UserRepositoryInterface $repository) { diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index da141ca67b..bd7149a1e2 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -68,7 +68,8 @@ class ResetPasswordController extends Controller * @param Request $request * * @throws \Illuminate\Validation\ValidationException - * @return RedirectResponse|JsonResponse + * + * @return Factory|JsonResponse|RedirectResponse|View */ public function reset(Request $request) { diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index eea45f4b80..9bd40ac1e7 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -75,7 +75,7 @@ class CurrencyController extends Controller * * @param Request $request * - * @return RedirectResponse|Redirector|View + * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View */ public function create(Request $request) { @@ -128,7 +128,7 @@ class CurrencyController extends Controller * @param Request $request * @param TransactionCurrency $currency * - * @return RedirectResponse|Redirector|View + * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View */ public function delete(Request $request, TransactionCurrency $currency) { @@ -266,7 +266,7 @@ class CurrencyController extends Controller * @param Request $request * @param TransactionCurrency $currency * - * @return RedirectResponse|Redirector|View + * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View */ public function edit(Request $request, TransactionCurrency $currency) { diff --git a/app/Http/Controllers/Import/PrerequisitesController.php b/app/Http/Controllers/Import/PrerequisitesController.php index e0c1fea936..e2f361c5ba 100644 --- a/app/Http/Controllers/Import/PrerequisitesController.php +++ b/app/Http/Controllers/Import/PrerequisitesController.php @@ -73,7 +73,7 @@ class PrerequisitesController extends Controller * @param string $importProvider * @param ImportJob $importJob * - * @return Factory|View + * @return Factory|RedirectResponse|Redirector|View */ public function index(string $importProvider, ImportJob $importJob = null) { diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index 6735072772..8f1f8149ab 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -58,7 +58,7 @@ class NewUserController extends Controller /** * Form the user gets when he has no data in the system. * - * @return RedirectResponse|Redirector|View + * @return RedirectResponse|Redirector|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index() { diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index ac640b2115..32da7e878c 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -88,7 +88,7 @@ class ProfileController extends Controller * * @param Request $request * - * @return Factory|View + * @return Factory|RedirectResponse|Redirector|View */ public function changeEmail(Request $request) { @@ -114,7 +114,7 @@ class ProfileController extends Controller * * @param Request $request * - * @return Factory|View + * @return Factory|RedirectResponse|Redirector|View */ public function changePassword(Request $request) { diff --git a/app/Http/Controllers/System/InstallController.php b/app/Http/Controllers/System/InstallController.php index 725fa72a80..25fb247719 100644 --- a/app/Http/Controllers/System/InstallController.php +++ b/app/Http/Controllers/System/InstallController.php @@ -115,7 +115,7 @@ class InstallController extends Controller /** * Show index. * - * @return RedirectResponse|Redirector + * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index() { diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 9a526b44fa..5646532911 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -68,7 +68,7 @@ class BulkController extends Controller * * TODO user wont be able to tell if journal is part of split. * - * @param Collection $journals + * @param array $journals * * @return Factory|View */ diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index ea21ca6376..3befc15d74 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -87,7 +87,8 @@ class ConvertController extends Controller * @param TransactionGroup $group * * @throws Exception - * @return RedirectResponse|Redirector|View + * + * @return RedirectResponse|Redirector|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index(TransactionType $destinationType, TransactionGroup $group) { diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php index c1e776e658..9c78da80b7 100644 --- a/app/Http/Controllers/Transaction/EditController.php +++ b/app/Http/Controllers/Transaction/EditController.php @@ -63,7 +63,7 @@ class EditController extends Controller /** * @param TransactionGroup $transactionGroup * - * @return Factory|View + * @return Factory|View|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function edit(TransactionGroup $transactionGroup) { diff --git a/app/Import/Converter/BankDebitCredit.php b/app/Import/Converter/BankDebitCredit.php index 4c5278ab5f..dcaa1d08f2 100644 --- a/app/Import/Converter/BankDebitCredit.php +++ b/app/Import/Converter/BankDebitCredit.php @@ -41,8 +41,7 @@ class BankDebitCredit implements ConverterInterface * * @param $value * - * @return mixed - * + * @return int */ public function convert($value): int { diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index 01b27a77c1..92c3f8e19b 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -320,7 +320,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * @param int|null $currencyId * @param string|null $currencyCode * - * @return TransactionCurrency|null + * @return TransactionCurrency */ public function findCurrency(?int $currencyId, ?string $currencyCode): TransactionCurrency { diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php index 7ce4e7a623..5a37050ecc 100644 --- a/app/Repositories/Currency/CurrencyRepositoryInterface.php +++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php @@ -156,7 +156,7 @@ interface CurrencyRepositoryInterface * @param int|null $currencyId * @param string|null $currencyCode * - * @return TransactionCurrency|null + * @return TransactionCurrency */ public function findCurrency(?int $currencyId, ?string $currencyCode): TransactionCurrency; diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index 7b063968dd..7fac389191 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -118,7 +118,7 @@ interface TagRepositoryInterface /** * @param int|null $year * - * @return Collection + * @return array */ public function getTagsInYear(?int $year): array; diff --git a/app/Rules/IsTransferAccount.php b/app/Rules/IsTransferAccount.php index 2ded593904..aee892cae3 100644 --- a/app/Rules/IsTransferAccount.php +++ b/app/Rules/IsTransferAccount.php @@ -35,7 +35,7 @@ class IsTransferAccount implements Rule /** * Get the validation error message. * - * @return string|array + * @return string */ public function message(): string { diff --git a/app/Services/Currency/FixerIOv2.php b/app/Services/Currency/FixerIOv2.php index 2b6d04c5a5..9d90712f38 100644 --- a/app/Services/Currency/FixerIOv2.php +++ b/app/Services/Currency/FixerIOv2.php @@ -128,7 +128,7 @@ class FixerIOv2 implements ExchangeRateInterface /** * @param User $user * - * @return mixed|void + * @return void */ public function setUser(User $user) { diff --git a/app/Services/Currency/RatesApiIOv1.php b/app/Services/Currency/RatesApiIOv1.php index f399b5f3ca..e3d6c565c4 100644 --- a/app/Services/Currency/RatesApiIOv1.php +++ b/app/Services/Currency/RatesApiIOv1.php @@ -117,7 +117,7 @@ class RatesApiIOv1 implements ExchangeRateInterface /** * @param User $user * - * @return mixed|void + * @return void */ public function setUser(User $user) { diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 6b10c6a627..0d8a905742 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -253,7 +253,7 @@ class Amount } /** - * @param User|Authenticatable $user + * @param User $user * * @return \FireflyIII\Models\TransactionCurrency */ diff --git a/app/Support/Binder/ImportProvider.php b/app/Support/Binder/ImportProvider.php index 9682f4b04a..b2b57cbf98 100644 --- a/app/Support/Binder/ImportProvider.php +++ b/app/Support/Binder/ImportProvider.php @@ -96,7 +96,8 @@ class ImportProvider implements BinderInterface * @param string $value * @param Route $route * - * @return Carbon + * @return string + * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): string diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php index 6047fb709e..fa3b0d118d 100644 --- a/app/Support/Binder/JournalList.php +++ b/app/Support/Binder/JournalList.php @@ -36,7 +36,8 @@ class JournalList implements BinderInterface * @param string $value * @param Route $route * - * @return mixed + * @return array + * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): array diff --git a/app/Support/CacheProperties.php b/app/Support/CacheProperties.php index dde4c3c874..4ae5edef1b 100644 --- a/app/Support/CacheProperties.php +++ b/app/Support/CacheProperties.php @@ -50,6 +50,7 @@ class CacheProperties /** * @param $property + * @param Collection|\Carbon\Carbon|\FireflyIII\Models\Category|array|int|string $property */ public function addProperty($property): void { @@ -87,6 +88,7 @@ class CacheProperties /** * @param $data + * @param (array|mixed)[]|Collection|\Carbon\Carbon|string $data */ public function store($data): void { diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index 808ecbec91..ecc7ae508e 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -136,7 +136,8 @@ class FireflyConfig /** * @param string $name - * @param $value + * @param $value + * @param int|string|true $value * * @return Configuration */ diff --git a/app/Support/Form/FormSupport.php b/app/Support/Form/FormSupport.php index 232983e452..5979411b9d 100644 --- a/app/Support/Form/FormSupport.php +++ b/app/Support/Form/FormSupport.php @@ -159,7 +159,7 @@ trait FormSupport * @param $name * @param $options * - * @return mixed + * @return string */ protected function label(string $name, array $options = null): string { diff --git a/app/Support/Http/Controllers/ModelInformation.php b/app/Support/Http/Controllers/ModelInformation.php index ee2a1d841a..2c0df9b44b 100644 --- a/app/Support/Http/Controllers/ModelInformation.php +++ b/app/Support/Http/Controllers/ModelInformation.php @@ -70,8 +70,11 @@ trait ModelInformation } /** - * @codeCoverageIgnore - * @return array + * @codeCoverageIgnore + * + * @return string[] + * + * @psalm-return array */ protected function getLiabilityTypes(): array { diff --git a/app/Support/Http/Controllers/TransactionCalculation.php b/app/Support/Http/Controllers/TransactionCalculation.php index d7bbc6873f..782b715d91 100644 --- a/app/Support/Http/Controllers/TransactionCalculation.php +++ b/app/Support/Http/Controllers/TransactionCalculation.php @@ -172,7 +172,7 @@ trait TransactionCalculation * @param Carbon $start * @param Carbon $end * - * @return Collection + * @return array */ protected function getIncomeForTags(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): array { diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index ece9291364..f3d017b64d 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -142,7 +142,7 @@ class Preferences } /** - * @param \FireflyIII\User|Authenticatable $user + * @param User $user * @param string $name * @param null|string $default * diff --git a/app/TransactionRules/Engine/RuleEngine.php b/app/TransactionRules/Engine/RuleEngine.php index bc881de0f7..cc60d89d8d 100644 --- a/app/TransactionRules/Engine/RuleEngine.php +++ b/app/TransactionRules/Engine/RuleEngine.php @@ -206,7 +206,7 @@ class RuleEngine } /** - * @param User|Authenticatable $user + * @param User $user */ public function setUser(User $user): void { diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.php index 5289fae876..765be07afb 100644 --- a/app/TransactionRules/Factory/TriggerFactory.php +++ b/app/TransactionRules/Factory/TriggerFactory.php @@ -115,7 +115,7 @@ class TriggerFactory * * @param string $triggerType * - * @return TriggerInterface|string + * @return string * * @throws FireflyException */ diff --git a/app/Validation/AccountValidator.php b/app/Validation/AccountValidator.php index 1d5f8e19d6..9683921adb 100644 --- a/app/Validation/AccountValidator.php +++ b/app/Validation/AccountValidator.php @@ -196,8 +196,8 @@ class AccountValidator /** * @param array $validTypes - * @param int|null $accountId - * @param string|null $accountName + * @param int $accountId + * @param string $accountName * * @return Account|null */