Skip to content

Firefly III: a personal finances manager

Reformat various code.

James Cole123693096cae
diff --git a/app/Api/V1/Controllers/Autocomplete/AccountController.php b/app/Api/V1/Controllers/Autocomplete/AccountController.php
index 63efe2f28c..7e3e19a8be 100644
--- a/app/Api/V1/Controllers/Autocomplete/AccountController.php
+++ b/app/Api/V1/Controllers/Autocomplete/AccountController.php
@@ -70,7 +70,6 @@ class AccountController extends Controller
* @param AutocompleteRequest $request
*
* @return JsonResponse
- * @throws FireflyException
* @throws JsonException
*/
public function accounts(AutocompleteRequest $request): JsonResponse
diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php
index 251299d787..87a8a32127 100644
--- a/app/Api/V1/Controllers/Chart/AccountController.php
+++ b/app/Api/V1/Controllers/Chart/AccountController.php
@@ -77,6 +77,9 @@ class AccountController extends Controller
*
* @return JsonResponse
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function overview(DateRequest $request): JsonResponse
{
diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.php
index 12ac4e6550..ea8e4fcb02 100644
--- a/app/Api/V1/Controllers/Controller.php
+++ b/app/Api/V1/Controllers/Controller.php
@@ -74,6 +74,8 @@ abstract class Controller extends BaseController
* Method to grab all parameters from the URI.
*
* @return ParameterBag
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function getParameters(): ParameterBag
{
diff --git a/app/Api/V1/Controllers/Models/Budget/ListController.php b/app/Api/V1/Controllers/Models/Budget/ListController.php
index 70e84c2fe8..ca2f2fe078 100644
--- a/app/Api/V1/Controllers/Models/Budget/ListController.php
+++ b/app/Api/V1/Controllers/Models/Budget/ListController.php
@@ -209,8 +209,6 @@ class ListController extends Controller
*
* @param Request $request
*
- * @param Budget $budget
- *
* @return JsonResponse
* @throws FireflyException
* @codeCoverageIgnore
diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php
index 39e121c1ad..6145954662 100644
--- a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php
+++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php
@@ -72,6 +72,7 @@ class ShowController extends Controller
*
* @return JsonResponse
* @throws FireflyException
+ * @throws \JsonException
* @codeCoverageIgnore
*/
public function index(): JsonResponse
@@ -106,6 +107,8 @@ class ShowController extends Controller
* @param TransactionCurrency $currency
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws \JsonException
* @codeCoverageIgnore
*/
public function show(TransactionCurrency $currency): JsonResponse
@@ -130,6 +133,8 @@ class ShowController extends Controller
* Show a currency.
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws \JsonException
* @codeCoverageIgnore
*/
public function showDefault(): JsonResponse
diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php
index 8902cc47cb..40f8b60467 100644
--- a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php
+++ b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php
@@ -74,6 +74,7 @@ class StoreController extends Controller
*
* @return JsonResponse
* @throws FireflyException
+ * @throws \JsonException
*/
public function store(StoreRequest $request): JsonResponse
{
diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php
index 211b5cf964..d81fed2b5a 100644
--- a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php
+++ b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php
@@ -75,6 +75,8 @@ class UpdateController extends Controller
* @param TransactionCurrency $currency
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws JsonException
* @codeCoverageIgnore
*/
public function disable(TransactionCurrency $currency): JsonResponse
@@ -108,6 +110,8 @@ class UpdateController extends Controller
* @param TransactionCurrency $currency
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws JsonException
* @codeCoverageIgnore
*/
public function enable(TransactionCurrency $currency): JsonResponse
diff --git a/app/Api/V1/Controllers/Summary/BasicController.php b/app/Api/V1/Controllers/Summary/BasicController.php
index 2b9e9de2e4..725a17ab9c 100644
--- a/app/Api/V1/Controllers/Summary/BasicController.php
+++ b/app/Api/V1/Controllers/Summary/BasicController.php
@@ -113,7 +113,7 @@ class BasicController extends Controller
// give new keys
$return = [];
foreach ($total as $entry) {
- if (null === $code || (null !== $code && $code === $entry['currency_code'])) {
+ if (null === $code || ($code === $entry['currency_code'])) {
$return[$entry['key']] = $entry;
}
}
diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php
index f4e98f53f3..7238ed9a49 100644
--- a/app/Api/V1/Controllers/System/ConfigurationController.php
+++ b/app/Api/V1/Controllers/System/ConfigurationController.php
@@ -94,6 +94,8 @@ class ConfigurationController extends Controller
*
* @return array
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function getDynamicConfiguration(): array
{
diff --git a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
index 5a7551c361..6c5fba45c9 100644
--- a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
+++ b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
@@ -57,7 +57,6 @@ class CorrectOpeningBalanceCurrencies extends Command
* Execute the console command.
*
* @return int
- * @throws JsonException
*/
public function handle(): int
{
@@ -136,6 +135,8 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param Account $account
*
* @return TransactionCurrency
+ * @throws JsonException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function getCurrency(Account $account): TransactionCurrency
{
diff --git a/app/Console/Commands/DecryptDatabase.php b/app/Console/Commands/DecryptDatabase.php
index d61198110f..465bea2193 100644
--- a/app/Console/Commands/DecryptDatabase.php
+++ b/app/Console/Commands/DecryptDatabase.php
@@ -109,6 +109,8 @@ class DecryptDatabase extends Command
* @param string $table
*
* @return bool
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isDecrypted(string $table): bool
{
diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php
index 7c0744a36f..81cd65fe54 100644
--- a/app/Console/Commands/Tools/Cron.php
+++ b/app/Console/Commands/Tools/Cron.php
@@ -166,7 +166,7 @@ class Cron extends Command
/**
* @param bool $force
* @param Carbon|null $date
- *
+ * @throws FireflyException
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{
diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php
index aee591a266..617fe579ad 100644
--- a/app/Console/Commands/Upgrade/AccountCurrencies.php
+++ b/app/Console/Commands/Upgrade/AccountCurrencies.php
@@ -109,6 +109,8 @@ class AccountCurrencies extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
index be4064112c..0558fe99c4 100644
--- a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
+++ b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
@@ -72,6 +72,8 @@ class AppendBudgetLimitPeriods extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php
index 72e02734c3..f3b3c61b11 100644
--- a/app/Console/Commands/Upgrade/BackToJournals.php
+++ b/app/Console/Commands/Upgrade/BackToJournals.php
@@ -86,6 +86,8 @@ class BackToJournals extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isMigrated(): bool
{
@@ -97,6 +99,8 @@ class BackToJournals extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
index de1ae16a88..93b5ac95a1 100644
--- a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
+++ b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
@@ -99,6 +99,8 @@ class BudgetLimitCurrency extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/CCLiabilities.php b/app/Console/Commands/Upgrade/CCLiabilities.php
index b991ab7645..d28dc36860 100644
--- a/app/Console/Commands/Upgrade/CCLiabilities.php
+++ b/app/Console/Commands/Upgrade/CCLiabilities.php
@@ -96,6 +96,8 @@ class CCLiabilities extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/CreateGroupMemberships.php b/app/Console/Commands/Upgrade/CreateGroupMemberships.php
index 46df59312f..77bfa2c78a 100644
--- a/app/Console/Commands/Upgrade/CreateGroupMemberships.php
+++ b/app/Console/Commands/Upgrade/CreateGroupMemberships.php
@@ -77,6 +77,8 @@ class CreateGroupMemberships extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php
index b6528fdd39..da66743e5f 100644
--- a/app/Console/Commands/Upgrade/MigrateAttachments.php
+++ b/app/Console/Commands/Upgrade/MigrateAttachments.php
@@ -108,6 +108,8 @@ class MigrateAttachments extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php
index 3a66032342..8469fa7285 100644
--- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php
+++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php
@@ -106,6 +106,8 @@ class MigrateJournalNotes extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
index 3207539056..a1b3c2aa80 100644
--- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
+++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
@@ -84,6 +84,8 @@ class MigrateRecurrenceMeta extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
index 794e03ffe0..d86e719aea 100644
--- a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
+++ b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
@@ -77,6 +77,8 @@ class MigrateRecurrenceType extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php
index 07a615effb..ad36e4a605 100644
--- a/app/Console/Commands/Upgrade/MigrateTagLocations.php
+++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php
@@ -75,6 +75,8 @@ class MigrateTagLocations extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php
index d033b2c25e..7085092e7a 100644
--- a/app/Console/Commands/Upgrade/MigrateToGroups.php
+++ b/app/Console/Commands/Upgrade/MigrateToGroups.php
@@ -129,6 +129,8 @@ class MigrateToGroups extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isMigrated(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateToRules.php b/app/Console/Commands/Upgrade/MigrateToRules.php
index c7327c20c3..6f726a6ac8 100644
--- a/app/Console/Commands/Upgrade/MigrateToRules.php
+++ b/app/Console/Commands/Upgrade/MigrateToRules.php
@@ -120,6 +120,8 @@ class MigrateToRules extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
index ae12f18ca7..4dbe770611 100644
--- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
+++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
@@ -115,6 +115,8 @@ class OtherCurrenciesCorrections extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/RenameAccountMeta.php b/app/Console/Commands/Upgrade/RenameAccountMeta.php
index ee8ba18ddc..1591dbe898 100644
--- a/app/Console/Commands/Upgrade/RenameAccountMeta.php
+++ b/app/Console/Commands/Upgrade/RenameAccountMeta.php
@@ -99,6 +99,8 @@ class RenameAccountMeta extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php
index a9e1e0d307..752743716c 100644
--- a/app/Console/Commands/Upgrade/TransactionIdentifier.php
+++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php
@@ -123,6 +123,8 @@ class TransactionIdentifier extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
index 00e3bb5561..6113eb260b 100644
--- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
+++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
@@ -68,6 +68,9 @@ class TransferCurrenciesCorrections extends Command
* Execute the console command.
*
* @return int
+ * @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -134,6 +137,8 @@ class TransferCurrenciesCorrections extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php
index 558db391f9..7d971a12f1 100644
--- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php
+++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php
@@ -81,6 +81,8 @@ class UpgradeLiabilities extends Command
/**
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/VerifySecurityAlerts.php b/app/Console/Commands/VerifySecurityAlerts.php
index 96b6e84a80..4427f91a4d 100644
--- a/app/Console/Commands/VerifySecurityAlerts.php
+++ b/app/Console/Commands/VerifySecurityAlerts.php
@@ -50,6 +50,7 @@ class VerifySecurityAlerts extends Command
* Execute the console command.
*
* @return int
+ * @throws \League\Flysystem\FilesystemException
*/
public function handle(): int
{
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 1939ff84af..28fa63e7fb 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -42,7 +42,6 @@ class Kernel extends ConsoleKernel
{
$this->load(__DIR__ . '/Commands');
- /** @noinspection PhpIncludeInspection */
require base_path('routes/console.php');
}
diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php
index 44b639561f..2307f93b10 100644
--- a/app/Factory/AccountFactory.php
+++ b/app/Factory/AccountFactory.php
@@ -74,6 +74,7 @@ class AccountFactory
*
* @return Account
* @throws FireflyException
+ * @throws JsonException
*/
public function findOrCreate(string $accountName, string $accountType): Account
{
@@ -182,6 +183,7 @@ class AccountFactory
* @param array $data
*
* @return Account
+ * @throws FireflyException
* @throws JsonException
*/
private function createAccount(AccountType $type, array $data): Account
@@ -361,7 +363,6 @@ class AccountFactory
* @param array $data
*
* @throws FireflyException
- * @throws JsonException
*/
private function storeOrder(Account $account, array $data): void
{
diff --git a/app/Factory/AccountMetaFactory.php b/app/Factory/AccountMetaFactory.php
index 322d1ea144..9c48b74b82 100644
--- a/app/Factory/AccountMetaFactory.php
+++ b/app/Factory/AccountMetaFactory.php
@@ -58,11 +58,9 @@ class AccountMetaFactory
}
// if $data has field and $entry is not null, update $entry:
- if (null !== $entry) {
- $entry->data = $value;
- $entry->save();
- Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $value, $account->id, $account->name));
- }
+ $entry->data = $value;
+ $entry->save();
+ Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $value, $account->id, $account->name));
}
if ('' === $value && null !== $entry) {
try {
diff --git a/app/Factory/BillFactory.php b/app/Factory/BillFactory.php
index bf604b45c1..96ea82bd50 100644
--- a/app/Factory/BillFactory.php
+++ b/app/Factory/BillFactory.php
@@ -46,6 +46,7 @@ class BillFactory
*
* @return Bill|null
* @throws FireflyException
+ * @throws \JsonException
*/
public function create(array $data): ?Bill
{
diff --git a/app/Factory/TransactionGroupFactory.php b/app/Factory/TransactionGroupFactory.php
index edd1ef438d..970e4d7489 100644
--- a/app/Factory/TransactionGroupFactory.php
+++ b/app/Factory/TransactionGroupFactory.php
@@ -57,6 +57,7 @@ class TransactionGroupFactory
* @return TransactionGroup
* @throws DuplicateTransactionException
* @throws FireflyException
+ * @throws \JsonException
*/
public function create(array $data): TransactionGroup
{
diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php
index 47c97e7e17..d44a48bd66 100644
--- a/app/Factory/TransactionJournalFactory.php
+++ b/app/Factory/TransactionJournalFactory.php
@@ -417,6 +417,8 @@ class TransactionJournalFactory
* @param Account $account
*
* @return TransactionCurrency
+ * @throws FireflyException
+ * @throws JsonException
*/
private function getCurrency(?TransactionCurrency $currency, Account $account): TransactionCurrency
{
diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php
index 4c49b10204..7af6f426ca 100644
--- a/app/Generator/Report/Audit/MonthReportGenerator.php
+++ b/app/Generator/Report/Audit/MonthReportGenerator.php
@@ -49,6 +49,8 @@ class MonthReportGenerator implements ReportGeneratorInterface
* Generates the report.
*
* @return string
+ * @throws FireflyException
+ * @throws JsonException
* @codeCoverageIgnore
*/
public function generate(): string
diff --git a/app/Generator/Webhook/StandardMessageGenerator.php b/app/Generator/Webhook/StandardMessageGenerator.php
index 6fe6f10978..65ff06d706 100644
--- a/app/Generator/Webhook/StandardMessageGenerator.php
+++ b/app/Generator/Webhook/StandardMessageGenerator.php
@@ -102,6 +102,8 @@ class StandardMessageGenerator implements MessageGeneratorInterface
/**
* @param Webhook $webhook
* @param Model $model
+ * @throws FireflyException
+ * @throws \JsonException
*/
private function generateMessage(Webhook $webhook, Model $model): void
{
@@ -196,9 +198,9 @@ class StandardMessageGenerator implements MessageGeneratorInterface
* @param Webhook $webhook
* @param array $message
*
- * @return WebhookMessage
+ * @return void
*/
- private function storeMessage(Webhook $webhook, array $message): WebhookMessage
+ private function storeMessage(Webhook $webhook, array $message): void
{
$webhookMessage = new WebhookMessage;
$webhookMessage->webhook()->associate($webhook);
@@ -209,7 +211,6 @@ class StandardMessageGenerator implements MessageGeneratorInterface
$webhookMessage->save();
Log::debug(sprintf('Stored new webhook message #%d', $webhookMessage->id));
- return $webhookMessage;
}
/**
diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php
index b9cc1d4062..cd72404822 100644
--- a/app/Handlers/Events/AutomationHandler.php
+++ b/app/Handlers/Events/AutomationHandler.php
@@ -43,7 +43,6 @@ class AutomationHandler
* @param RequestedReportOnJournals $event
*
* @return bool
- * @throws FireflyException
*/
public function reportJournals(RequestedReportOnJournals $event): bool
{
diff --git a/app/Handlers/Events/BillEventHandler.php b/app/Handlers/Events/BillEventHandler.php
index 412243850e..21b04d7cce 100644
--- a/app/Handlers/Events/BillEventHandler.php
+++ b/app/Handlers/Events/BillEventHandler.php
@@ -37,6 +37,7 @@ class BillEventHandler
/**
* @param WarnUserAboutBill $event
* @return void
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function warnAboutBill(WarnUserAboutBill $event): void
{
diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php
index fb62f0fc6b..18994a20fa 100644
--- a/app/Handlers/Events/UserEventHandler.php
+++ b/app/Handlers/Events/UserEventHandler.php
@@ -332,11 +332,11 @@ class UserEventHandler
/**
* @param ActuallyLoggedIn $event
+ * @throws FireflyException
*/
public function storeUserIPAddress(ActuallyLoggedIn $event): void
{
Log::debug('Now in storeUserIPAddress');
- /** @var User $user */
$user = $event->user;
/** @var array $preference */
try {
diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php
index e7f4e0c9bf..6485f1d042 100644
--- a/app/Handlers/Events/VersionCheckEventHandler.php
+++ b/app/Handlers/Events/VersionCheckEventHandler.php
@@ -44,6 +44,8 @@ class VersionCheckEventHandler
* @param RequestedVersionCheckStatus $event
*
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function checkForUpdates(RequestedVersionCheckStatus $event): void
{
@@ -90,6 +92,8 @@ class VersionCheckEventHandler
* @param RequestedVersionCheckStatus $event
*
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void
{
diff --git a/app/Helpers/Fiscal/FiscalHelper.php b/app/Helpers/Fiscal/FiscalHelper.php
index 90f56c79d0..68af77a004 100644
--- a/app/Helpers/Fiscal/FiscalHelper.php
+++ b/app/Helpers/Fiscal/FiscalHelper.php
@@ -46,6 +46,9 @@ class FiscalHelper implements FiscalHelperInterface
* @param Carbon $date
*
* @return Carbon date object
+ * @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function endOfFiscalYear(Carbon $date): Carbon
{
@@ -69,6 +72,8 @@ class FiscalHelper implements FiscalHelperInterface
*
* @return Carbon date object
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function startOfFiscalYear(Carbon $date): Carbon
{
diff --git a/app/Helpers/Report/NetWorth.php b/app/Helpers/Report/NetWorth.php
index 380770988f..451b56ad08 100644
--- a/app/Helpers/Report/NetWorth.php
+++ b/app/Helpers/Report/NetWorth.php
@@ -63,6 +63,7 @@ class NetWorth implements NetWorthInterface
*
* @return array
* @throws JsonException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array
{
diff --git a/app/Helpers/Update/UpdateTrait.php b/app/Helpers/Update/UpdateTrait.php
index fc144807eb..49659e99f7 100644
--- a/app/Helpers/Update/UpdateTrait.php
+++ b/app/Helpers/Update/UpdateTrait.php
@@ -40,6 +40,8 @@ trait UpdateTrait
*
* @return array
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getLatestRelease(): array
{
diff --git a/app/Http/Controllers/Account/CreateController.php b/app/Http/Controllers/Account/CreateController.php
index fd922b6a86..5aed064c3e 100644
--- a/app/Http/Controllers/Account/CreateController.php
+++ b/app/Http/Controllers/Account/CreateController.php
@@ -137,6 +137,8 @@ class CreateController extends Controller
*
* @return RedirectResponse|Redirector
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function store(AccountFormRequest $request)
{
diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php
index bba0a3e2b0..2a23f4ee2a 100644
--- a/app/Http/Controllers/Account/IndexController.php
+++ b/app/Http/Controllers/Account/IndexController.php
@@ -74,6 +74,9 @@ class IndexController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function inactive(Request $request, string $objectType)
{
@@ -128,7 +131,10 @@ class IndexController extends Controller
* @param string $objectType
*
* @return Factory|View
- * @throws Exception
+ * @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request, string $objectType)
{
diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php
index 0d7a096d47..9b9cc02afe 100644
--- a/app/Http/Controllers/Account/ReconcileController.php
+++ b/app/Http/Controllers/Account/ReconcileController.php
@@ -86,7 +86,10 @@ class ReconcileController extends Controller
* @param Carbon|null $end
*
* @return Factory|RedirectResponse|Redirector|View
- * @throws Exception
+ * @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function reconcile(Account $account, Carbon $start = null, Carbon $end = null)
{
diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php
index 5058c9965f..e3823a4771 100644
--- a/app/Http/Controllers/Account/ShowController.php
+++ b/app/Http/Controllers/Account/ShowController.php
@@ -83,8 +83,10 @@ class ShowController extends Controller
* @param Carbon|null $end
*
* @return RedirectResponse|Redirector|Factory|View
- * @throws Exception
- *
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Account $account, Carbon $start = null, Carbon $end = null)
{
@@ -164,8 +166,10 @@ class ShowController extends Controller
* @param Account $account
*
* @return RedirectResponse|Redirector|Factory|View
- * @throws Exception
- *
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showAll(Request $request, Account $account)
{
diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php
index e2853e3416..0b15f2247b 100644
--- a/app/Http/Controllers/Admin/ConfigurationController.php
+++ b/app/Http/Controllers/Admin/ConfigurationController.php
@@ -61,6 +61,8 @@ class ConfigurationController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index()
{
diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php
index 664a12e4bb..c6527c210b 100644
--- a/app/Http/Controllers/Admin/HomeController.php
+++ b/app/Http/Controllers/Admin/HomeController.php
@@ -55,6 +55,8 @@ class HomeController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index()
{
diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.php
index 82f5cde8c7..e5444ba97d 100644
--- a/app/Http/Controllers/Admin/UpdateController.php
+++ b/app/Http/Controllers/Admin/UpdateController.php
@@ -61,6 +61,8 @@ class UpdateController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index()
{
diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php
index 73575412c9..dbdd2d7af3 100644
--- a/app/Http/Controllers/Auth/ForgotPasswordController.php
+++ b/app/Http/Controllers/Auth/ForgotPasswordController.php
@@ -110,6 +110,8 @@ class ForgotPasswordController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showLinkRequestForm()
{
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 446a0b83ae..38b86ca230 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -203,6 +203,8 @@ class LoginController extends Controller
*
* @return Factory|Application|View|Redirector|RedirectResponse
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showLoginForm(Request $request)
{
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index 5356343be8..c7a5511215 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -109,6 +109,7 @@ class RegisterController extends Controller
/**
* @return bool
+ * @throws FireflyException
*/
protected function allowedToRegister(): bool
{
@@ -136,7 +137,9 @@ class RegisterController extends Controller
* @param Request $request
*
* @return Factory|View
+ * @throws ContainerExceptionInterface
* @throws FireflyException
+ * @throws NotFoundExceptionInterface
*/
public function showRegistrationForm(Request $request)
{
diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php
index 13a338d177..7b28f677c2 100644
--- a/app/Http/Controllers/Auth/ResetPasswordController.php
+++ b/app/Http/Controllers/Auth/ResetPasswordController.php
@@ -123,6 +123,8 @@ class ResetPasswordController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showResetForm(Request $request, $token = null)
{
diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php
index ac098e7625..5fd72fa205 100644
--- a/app/Http/Controllers/Bill/IndexController.php
+++ b/app/Http/Controllers/Bill/IndexController.php
@@ -146,6 +146,8 @@ class IndexController extends Controller
*
* @return array
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function getSums(array $bills): array
{
diff --git a/app/Http/Controllers/Bill/ShowController.php b/app/Http/Controllers/Bill/ShowController.php
index a26e6051bf..dbcfb83502 100644
--- a/app/Http/Controllers/Bill/ShowController.php
+++ b/app/Http/Controllers/Bill/ShowController.php
@@ -123,7 +123,9 @@ class ShowController extends Controller
* @param Bill $bill
*
* @return Factory|View
- * @throws FireflyException
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Bill $bill)
{
diff --git a/app/Http/Controllers/Budget/AvailableBudgetController.php b/app/Http/Controllers/Budget/AvailableBudgetController.php
index 0052bbaa48..55e5bfbc19 100644
--- a/app/Http/Controllers/Budget/AvailableBudgetController.php
+++ b/app/Http/Controllers/Budget/AvailableBudgetController.php
@@ -171,6 +171,8 @@ class AvailableBudgetController extends Controller
* @param Request $request
*
* @return RedirectResponse|Redirector
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function store(Request $request)
{
diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php
index ed681e5565..6986b402d7 100644
--- a/app/Http/Controllers/Budget/IndexController.php
+++ b/app/Http/Controllers/Budget/IndexController.php
@@ -92,6 +92,9 @@ class IndexController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request, Carbon $start = null, Carbon $end = null)
{
diff --git a/app/Http/Controllers/Budget/ShowController.php b/app/Http/Controllers/Budget/ShowController.php
index 82e26a4590..a92989f85d 100644
--- a/app/Http/Controllers/Budget/ShowController.php
+++ b/app/Http/Controllers/Budget/ShowController.php
@@ -79,6 +79,9 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function noBudget(Request $request, Carbon $start = null, Carbon $end = null)
{
@@ -115,6 +118,8 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function noBudgetAll(Request $request)
{
@@ -144,6 +149,9 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Budget $budget)
{
@@ -179,6 +187,9 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showByBudgetLimit(Request $request, Budget $budget, BudgetLimit $budgetLimit)
{
diff --git a/app/Http/Controllers/Category/IndexController.php b/app/Http/Controllers/Category/IndexController.php
index aa56512388..ee07147caa 100644
--- a/app/Http/Controllers/Category/IndexController.php
+++ b/app/Http/Controllers/Category/IndexController.php
@@ -68,6 +68,8 @@ class IndexController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request)
{
diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php
index a2cf0dd97a..dcef802333 100644
--- a/app/Http/Controllers/Category/NoCategoryController.php
+++ b/app/Http/Controllers/Category/NoCategoryController.php
@@ -76,6 +76,9 @@ class NoCategoryController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Carbon $start = null, Carbon $end = null)
{
@@ -114,6 +117,8 @@ class NoCategoryController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showAll(Request $request)
{
diff --git a/app/Http/Controllers/Category/ShowController.php b/app/Http/Controllers/Category/ShowController.php
index 9fb0b8b391..a3eb24c391 100644
--- a/app/Http/Controllers/Category/ShowController.php
+++ b/app/Http/Controllers/Category/ShowController.php
@@ -78,6 +78,9 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null)
{
@@ -118,6 +121,8 @@ class ShowController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showAll(Request $request, Category $category)
{
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php
index c227cf8ba6..806b4b8a04 100644
--- a/app/Http/Controllers/Chart/AccountController.php
+++ b/app/Http/Controllers/Chart/AccountController.php
@@ -175,6 +175,7 @@ class AccountController extends Controller
* @param Account $account
*
* @return JsonResponse
+ * @throws JsonException
*/
public function expenseBudgetAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
@@ -192,7 +193,6 @@ class AccountController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse
{
@@ -250,6 +250,7 @@ class AccountController extends Controller
* @param Account $account
*
* @return JsonResponse
+ * @throws JsonException
*/
public function expenseCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
@@ -267,7 +268,6 @@ class AccountController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
{
@@ -323,6 +323,9 @@ class AccountController extends Controller
*
* @return JsonResponse
* @throws FireflyException
+ * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function frontpage(AccountRepositoryInterface $repository): JsonResponse
{
@@ -348,6 +351,7 @@ class AccountController extends Controller
* @param Account $account
*
* @return JsonResponse
+ * @throws JsonException
*/
public function incomeCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
@@ -365,7 +369,6 @@ class AccountController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
{
@@ -517,11 +520,13 @@ class AccountController extends Controller
*
* See reference nr. 55
*
- * @param Carbon $start
- * @param Carbon $end
* @param Collection $accounts
*
+ * @param Carbon $start
+ * @param Carbon $end
* @return JsonResponse
+ * @throws FireflyException
+ * @throws JsonException
*/
public function report(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php
index f47d748b71..6ba30c5dec 100644
--- a/app/Http/Controllers/Chart/BillController.php
+++ b/app/Http/Controllers/Chart/BillController.php
@@ -58,7 +58,6 @@ class BillController extends Controller
* @param BillRepositoryInterface $repository
*
* @return JsonResponse
- * @throws JsonException
*/
public function frontpage(BillRepositoryInterface $repository): JsonResponse
{
@@ -104,7 +103,7 @@ class BillController extends Controller
* @param Bill $bill
*
* @return JsonResponse
- * @throws JsonException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function single(Bill $bill): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php
index ba849883d0..58bb2ece98 100644
--- a/app/Http/Controllers/Chart/BudgetController.php
+++ b/app/Http/Controllers/Chart/BudgetController.php
@@ -85,7 +85,6 @@ class BudgetController extends Controller
* @param Budget $budget
*
* @return JsonResponse
- * @throws JsonException
*/
public function budget(Budget $budget): JsonResponse
{
@@ -154,7 +153,6 @@ class BudgetController extends Controller
* @return JsonResponse
*
* @throws FireflyException
- * @throws JsonException
*/
public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
{
@@ -205,7 +203,6 @@ class BudgetController extends Controller
* @param BudgetLimit|null $budgetLimit
*
* @return JsonResponse
- * @throws JsonException
*/
public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
{
@@ -274,7 +271,6 @@ class BudgetController extends Controller
* @param BudgetLimit|null $budgetLimit
*
* @return JsonResponse
- * @throws JsonException
*/
public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
{
@@ -339,7 +335,6 @@ class BudgetController extends Controller
* @param BudgetLimit|null $budgetLimit
*
* @return JsonResponse
- * @throws JsonException
*/
public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
{
@@ -403,7 +398,6 @@ class BudgetController extends Controller
* Shows a budget list with spent/left/overspent.
*
* @return JsonResponse
- * @throws JsonException
*/
public function frontpage(): JsonResponse
{
@@ -441,7 +435,6 @@ class BudgetController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
@@ -517,7 +510,6 @@ class BudgetController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php
index e6c44cba9f..ffe0194b98 100644
--- a/app/Http/Controllers/Chart/CategoryController.php
+++ b/app/Http/Controllers/Chart/CategoryController.php
@@ -71,7 +71,8 @@ class CategoryController extends Controller
*
* @return JsonResponse
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function all(Category $category): JsonResponse
{
@@ -118,7 +119,6 @@ class CategoryController extends Controller
* See reference nr. 60
*
* @return JsonResponse
- * @throws JsonException
*/
public function frontPage(): JsonResponse
{
@@ -151,7 +151,6 @@ class CategoryController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
@@ -267,7 +266,6 @@ class CategoryController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
@@ -295,7 +293,8 @@ class CategoryController extends Controller
*
* @return JsonResponse
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function specificPeriod(Category $category, Carbon $date): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php
index e69b24dd5a..7efc12d07a 100644
--- a/app/Http/Controllers/Chart/PiggyBankController.php
+++ b/app/Http/Controllers/Chart/PiggyBankController.php
@@ -64,7 +64,7 @@ class PiggyBankController extends Controller
* @param PiggyBank $piggyBank
*
* @return JsonResponse
- * @throws JsonException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php
index 7726766f1d..8eb910ac80 100644
--- a/app/Http/Controllers/Chart/ReportController.php
+++ b/app/Http/Controllers/Chart/ReportController.php
@@ -69,7 +69,7 @@ class ReportController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
diff --git a/app/Http/Controllers/Chart/TransactionController.php b/app/Http/Controllers/Chart/TransactionController.php
index 5fc3ac925f..6aae2bf3db 100644
--- a/app/Http/Controllers/Chart/TransactionController.php
+++ b/app/Http/Controllers/Chart/TransactionController.php
@@ -57,7 +57,6 @@ class TransactionController extends Controller
* @param Carbon $end
*
* @return JsonResponse
- * @throws JsonException
*/
public function budgets(Carbon $start, Carbon $end)
{
@@ -102,7 +101,6 @@ class TransactionController extends Controller
*
* @return JsonResponse
* @throws FireflyException
- * @throws JsonException
*/
public function categories(string $objectType, Carbon $start, Carbon $end)
{
@@ -161,7 +159,6 @@ class TransactionController extends Controller
*
* @return JsonResponse
* @throws FireflyException
- * @throws JsonException
*/
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
{
@@ -219,7 +216,6 @@ class TransactionController extends Controller
*
* @return JsonResponse
* @throws FireflyException
- * @throws JsonException
*/
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
{
diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php
index 0f60617e8e..82b03a8c3f 100644
--- a/app/Http/Controllers/CurrencyController.php
+++ b/app/Http/Controllers/CurrencyController.php
@@ -208,9 +208,8 @@ class CurrencyController extends Controller
}
/**
- * @param Request $request
- * @param TransactionCurrency $currency
- *
+ * @param Request $request
+ * @return JsonResponse
* @throws FireflyException
*/
public function disableCurrency(Request $request): JsonResponse
@@ -312,8 +311,7 @@ class CurrencyController extends Controller
}
/**
- * @param TransactionCurrency $currency
- *
+ * @param Request $request
* @return RedirectResponse|Redirector
*/
public function enableCurrency(Request $request)
@@ -341,6 +339,8 @@ class CurrencyController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request)
{
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 978bc5ee64..07e635b5d8 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -99,6 +99,7 @@ class HomeController extends Controller
* @param AccountRepositoryInterface $repository
*
* @return mixed
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function index(AccountRepositoryInterface $repository): mixed
{
diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php
index 15877d0b55..72d37453bd 100644
--- a/app/Http/Controllers/JavascriptController.php
+++ b/app/Http/Controllers/JavascriptController.php
@@ -48,6 +48,8 @@ class JavascriptController extends Controller
*
* @return Response
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
{
@@ -107,6 +109,9 @@ class JavascriptController extends Controller
*
* @return Response
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
{
diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php
index 9ad35980f5..9a8ac019e8 100644
--- a/app/Http/Controllers/Json/BoxController.php
+++ b/app/Http/Controllers/Json/BoxController.php
@@ -52,7 +52,6 @@ class BoxController extends Controller
* 2) if the user has no available amount set this period: spent per day
*
* @return JsonResponse
- * @throws JsonException
*/
public function available(): JsonResponse
{
@@ -131,7 +130,6 @@ class BoxController extends Controller
* @param CurrencyRepositoryInterface $repository
*
* @return JsonResponse
- * @throws JsonException
*/
public function balance(CurrencyRepositoryInterface $repository): JsonResponse
{
diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php
index 15947daaf9..6ff13ad21f 100644
--- a/app/Http/Controllers/Json/ReconcileController.php
+++ b/app/Http/Controllers/Json/ReconcileController.php
@@ -76,12 +76,14 @@ class ReconcileController extends Controller
/**
* Overview of reconciliation.
*
- * @param Request $request
- * @param Account $account
- * @param Carbon $start
- * @param Carbon $end
+ * @param Request $request
+ * @param Account|null $account
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws JsonException
*/
public function overview(Request $request, Account $account = null, Carbon $start = null, Carbon $end = null): JsonResponse
{
@@ -216,9 +218,9 @@ class ReconcileController extends Controller
/**
* Returns a list of transactions in a modal.
*
- * @param Account $account
- * @param Carbon $start
- * @param Carbon $end
+ * @param Account $account
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return JsonResponse
* @throws FireflyException
diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php
index 3d32f1bfb7..01b5e56212 100644
--- a/app/Http/Controllers/Json/RecurrenceController.php
+++ b/app/Http/Controllers/Json/RecurrenceController.php
@@ -143,6 +143,9 @@ class RecurrenceController extends Controller
* @param Request $request
*
* @return JsonResponse
+ * @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function suggest(Request $request): JsonResponse
{
diff --git a/app/Http/Controllers/PiggyBank/IndexController.php b/app/Http/Controllers/PiggyBank/IndexController.php
index 31f86b82d2..b512b16f3f 100644
--- a/app/Http/Controllers/PiggyBank/IndexController.php
+++ b/app/Http/Controllers/PiggyBank/IndexController.php
@@ -74,6 +74,8 @@ class IndexController extends Controller
* @param Request $request
*
* @return Factory|View
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function index(Request $request)
{
diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php
index 21d05746a7..737ad506bc 100644
--- a/app/Http/Controllers/PreferencesController.php
+++ b/app/Http/Controllers/PreferencesController.php
@@ -66,6 +66,8 @@ class PreferencesController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(AccountRepositoryInterface $repository)
{
@@ -147,6 +149,8 @@ class PreferencesController extends Controller
*
* @return RedirectResponse|Redirector
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function postIndex(Request $request)
{
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
index ea01d1bccc..9ec9402403 100644
--- a/app/Http/Controllers/ProfileController.php
+++ b/app/Http/Controllers/ProfileController.php
@@ -147,6 +147,8 @@ class ProfileController extends Controller
* @throws IncompatibleWithGoogleAuthenticatorException
* @throws InvalidCharactersException
* @throws SecretKeyTooShortException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function code(Request $request)
{
@@ -314,6 +316,8 @@ class ProfileController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index()
{
@@ -479,6 +483,8 @@ class ProfileController extends Controller
*
* @return RedirectResponse|Redirector
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function postCode(TokenFormRequest $request)
{
@@ -523,6 +529,8 @@ class ProfileController extends Controller
* @param string $mfaCode
*
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function addToMFAHistory(string $mfaCode): void
{
diff --git a/app/Http/Controllers/Recurring/IndexController.php b/app/Http/Controllers/Recurring/IndexController.php
index 6a53ff08ef..aad08bff71 100644
--- a/app/Http/Controllers/Recurring/IndexController.php
+++ b/app/Http/Controllers/Recurring/IndexController.php
@@ -75,7 +75,8 @@ class IndexController extends Controller
*
* @return Factory|View
* @throws FireflyException
- *
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request)
{
diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php
index bb773e54ba..b3485536c8 100644
--- a/app/Http/Controllers/Report/AccountController.php
+++ b/app/Http/Controllers/Report/AccountController.php
@@ -45,7 +45,6 @@ class AccountController extends Controller
* @param Carbon $end
*
* @return mixed|string
- * @throws JsonException
*/
public function general(Collection $accounts, Carbon $start, Carbon $end)
{
diff --git a/app/Http/Controllers/Report/BillController.php b/app/Http/Controllers/Report/BillController.php
index e248b12c33..d374020f13 100644
--- a/app/Http/Controllers/Report/BillController.php
+++ b/app/Http/Controllers/Report/BillController.php
@@ -43,7 +43,6 @@ class BillController extends Controller
* @param Carbon $end
*
* @return mixed|string
- * @throws JsonException
*/
public function overview(Collection $accounts, Carbon $start, Carbon $end)
{ // chart properties for cache:
diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php
index 9c0a0f1ca0..aba2fd000b 100644
--- a/app/Http/Controllers/Report/OperationsController.php
+++ b/app/Http/Controllers/Report/OperationsController.php
@@ -67,7 +67,6 @@ class OperationsController extends Controller
* @param Carbon $end
*
* @return mixed|string
- * @throws JsonException
*/
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
{
@@ -103,7 +102,6 @@ class OperationsController extends Controller
* @param Carbon $end
*
* @return string
- * @throws JsonException
*/
public function income(Collection $accounts, Carbon $start, Carbon $end): string
{
@@ -139,7 +137,6 @@ class OperationsController extends Controller
* @param Carbon $end
*
* @return mixed|string
- * @throws JsonException
*/
public function operations(Collection $accounts, Carbon $start, Carbon $end)
{
diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php
index e4744e4f79..49b5219120 100644
--- a/app/Http/Controllers/ReportController.php
+++ b/app/Http/Controllers/ReportController.php
@@ -262,6 +262,8 @@ class ReportController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(AccountRepositoryInterface $repository)
{
diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php
index c470b6af0d..f9f8be07a8 100644
--- a/app/Http/Controllers/Rule/CreateController.php
+++ b/app/Http/Controllers/Rule/CreateController.php
@@ -96,7 +96,7 @@ class CreateController extends Controller
$operators = $search->getOperators()->toArray();
if ('' !== $words) {
session()->flash('warning', trans('firefly.rule_from_search_words', ['string' => $words]));
- array_push($operators, ['type' => 'description_contains', 'value' => $words]);
+ $operators[] = ['type' => 'description_contains', 'value' => $words];
}
$oldTriggers = $this->parseFromOperators($operators);
}
@@ -236,8 +236,7 @@ class CreateController extends Controller
}
/**
- * @param Rule $rule
- *
+ * @param Request $request
* @return JsonResponse
*/
public function duplicate(Request $request): JsonResponse
diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php
index daf8cdbbe1..a7aeec0682 100644
--- a/app/Http/Controllers/Rule/EditController.php
+++ b/app/Http/Controllers/Rule/EditController.php
@@ -93,7 +93,7 @@ class EditController extends Controller
$operators = $search->getOperators()->toArray();
if ('' !== $words) {
session()->flash('warning', trans('firefly.rule_from_search_words', ['string' => $words]));
- array_push($operators, ['type' => 'description_contains', 'value' => $words]);
+ $operators[] = ['type' => 'description_contains', 'value' => $words];
}
$oldTriggers = $this->parseFromOperators($operators);
}
diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php
index 7d457b9db1..fc8e26e495 100644
--- a/app/Http/Controllers/TagController.php
+++ b/app/Http/Controllers/TagController.php
@@ -230,6 +230,8 @@ class TagController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function show(Request $request, Tag $tag, Carbon $start = null, Carbon $end = null)
{
@@ -273,6 +275,8 @@ class TagController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function showAll(Request $request, Tag $tag)
{
diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php
index b33530a838..cd8ae3c017 100644
--- a/app/Http/Controllers/Transaction/CreateController.php
+++ b/app/Http/Controllers/Transaction/CreateController.php
@@ -100,6 +100,9 @@ class CreateController extends Controller
*
* @return Factory|View
* @throws FireflyException
+ * @throws \JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function create(?string $objectType)
{
diff --git a/app/Http/Controllers/Transaction/IndexController.php b/app/Http/Controllers/Transaction/IndexController.php
index ac222205f0..77808e48dd 100644
--- a/app/Http/Controllers/Transaction/IndexController.php
+++ b/app/Http/Controllers/Transaction/IndexController.php
@@ -73,7 +73,9 @@ class IndexController extends Controller
* @param Carbon|null $end
*
* @return Factory|View
- * @throws Exception
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function index(Request $request, string $objectType, Carbon $start = null, Carbon $end = null)
{
@@ -130,7 +132,9 @@ class IndexController extends Controller
* @param string $objectType
*
* @return Factory|View
- * @throws Exception
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function indexAll(Request $request, string $objectType)
{
diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php
index 89ae0631c2..531dcc8c1c 100644
--- a/app/Http/Controllers/Transaction/LinkController.php
+++ b/app/Http/Controllers/Transaction/LinkController.php
@@ -153,8 +153,7 @@ class LinkController extends Controller
/**
* Switch link from A <> B to B <> A.
*
- * @param TransactionJournalLink $link
- *
+ * @param Request $request
* @return RedirectResponse|Redirector
*/
public function switchLink(Request $request)
diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php
index c278908e6c..f9ea125eab 100644
--- a/app/Jobs/CreateRecurringTransactions.php
+++ b/app/Jobs/CreateRecurringTransactions.php
@@ -291,6 +291,8 @@ class CreateRecurringTransactions implements ShouldQueue
* @param Recurrence $recurrence
*
* @return Collection
+ * @throws DuplicateTransactionException
+ * @throws FireflyException
*/
private function handleRepetitions(Recurrence $recurrence): Collection
{
diff --git a/app/Mail/ConfirmEmailChangeMail.php b/app/Mail/ConfirmEmailChangeMail.php
index 4181545de4..bdd6110ff7 100644
--- a/app/Mail/ConfirmEmailChangeMail.php
+++ b/app/Mail/ConfirmEmailChangeMail.php
@@ -47,7 +47,6 @@ class ConfirmEmailChangeMail extends Mailable
* @param string $newEmail
* @param string $oldEmail
* @param string $url
- * @param string $ipAddress
*/
public function __construct(string $newEmail, string $oldEmail, string $url)
{
diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php
index 86f8353db3..99b4a17e1f 100644
--- a/app/Providers/BroadcastServiceProvider.php
+++ b/app/Providers/BroadcastServiceProvider.php
@@ -38,7 +38,6 @@ class BroadcastServiceProvider extends ServiceProvider
{
Broadcast::routes();
- /** @noinspection PhpIncludeInspection */
require base_path('routes/channels.php');
}
}
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index cdc709d178..ad05157167 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -442,6 +442,7 @@ class AccountRepository implements AccountRepositoryInterface
* @return Account|null
*
* @throws FireflyException
+ * @throws JsonException
*/
public function getReconciliation(Account $account): ?Account
{
@@ -754,6 +755,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return Account
* @throws FireflyException
+ * @throws JsonException
*/
public function store(array $data): Account
{
@@ -770,7 +772,6 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return Account
* @throws FireflyException
- * @throws JsonException
*/
public function update(Account $account, array $data): Account
{
diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php
index c58ef0ed74..d57725ec61 100644
--- a/app/Repositories/Account/AccountTasker.php
+++ b/app/Repositories/Account/AccountTasker.php
@@ -45,6 +45,8 @@ class AccountTasker implements AccountTaskerInterface
* @param Carbon $end
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array
{
@@ -150,6 +152,8 @@ class AccountTasker implements AccountTaskerInterface
* @param array $array
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
private function groupExpenseByDestination(array $array): array
{
@@ -243,6 +247,8 @@ class AccountTasker implements AccountTaskerInterface
* @param array $array
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
private function groupIncomeBySource(array $array): array
{
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index e0ef3bd456..9fc2ac0ed5 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -358,6 +358,7 @@ class BillRepository implements BillRepositoryInterface
* @param Carbon $end
*
* @return Collection
+ * @throws JsonException
*/
public function getPayDatesInRange(Bill $bill, Carbon $start, Carbon $end): Collection
{
@@ -393,7 +394,6 @@ class BillRepository implements BillRepositoryInterface
* @param Carbon $date
*
* @return Carbon
- * @throws JsonException
*/
public function nextDateMatch(Bill $bill, Carbon $date): Carbon
{
diff --git a/app/Repositories/Budget/BudgetLimitRepository.php b/app/Repositories/Budget/BudgetLimitRepository.php
index 1881ab741e..423a7a5451 100644
--- a/app/Repositories/Budget/BudgetLimitRepository.php
+++ b/app/Repositories/Budget/BudgetLimitRepository.php
@@ -304,6 +304,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
*
* @return BudgetLimit
* @throws FireflyException
+ * @throws \JsonException
*/
public function store(array $data): BudgetLimit
{
@@ -352,6 +353,8 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
* @param array $data
*
* @return BudgetLimit
+ * @throws FireflyException
+ * @throws \JsonException
*/
public function update(BudgetLimit $budgetLimit, array $data): BudgetLimit
{
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index b2c7bef655..705d1ab03c 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -335,6 +335,7 @@ class BudgetRepository implements BudgetRepositoryInterface
*
* @return Budget
* @throws FireflyException
+ * @throws \JsonException
*/
public function store(array $data): Budget
{
@@ -549,6 +550,8 @@ class BudgetRepository implements BudgetRepositoryInterface
/**
* @param Budget $budget
* @param array $data
+ * @throws FireflyException
+ * @throws \JsonException
*/
private function updateAutoBudget(Budget $budget, array $data): void
{
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index 204aa9af0a..c93b81b22f 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -273,6 +273,8 @@ class CurrencyRepository implements CurrencyRepositoryInterface
* @param string|null $currencyCode
*
* @return TransactionCurrency
+ * @throws FireflyException
+ * @throws \JsonException
*/
public function findCurrency(?int $currencyId, ?string $currencyCode): TransactionCurrency
{
diff --git a/app/Repositories/Journal/JournalCLIRepository.php b/app/Repositories/Journal/JournalCLIRepository.php
index 70e8ac9850..28aa64bff2 100644
--- a/app/Repositories/Journal/JournalCLIRepository.php
+++ b/app/Repositories/Journal/JournalCLIRepository.php
@@ -118,7 +118,6 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
* @param string $field
*
* @return null|Carbon
- * @throws JsonException
*/
public function getMetaDate(TransactionJournal $journal, string $field): ?Carbon
{
@@ -162,7 +161,6 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
* @param string $field
*
* @return null|string
- * @throws JsonException
*/
public function getMetaField(TransactionJournal $journal, string $field): ?string
{
diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php
index c8bdf649ac..5e682539d6 100644
--- a/app/Repositories/Journal/JournalRepository.php
+++ b/app/Repositories/Journal/JournalRepository.php
@@ -130,7 +130,6 @@ class JournalRepository implements JournalRepositoryInterface
* @param TransactionJournal $journal
*
* @return string
- * @throws JsonException
*/
public function getJournalTotal(TransactionJournal $journal): string
{
@@ -187,7 +186,6 @@ class JournalRepository implements JournalRepositoryInterface
* @param string $field
*
* @return null|Carbon
- * @throws JsonException
*/
public function getMetaDateById(int $journalId, string $field): ?Carbon
{
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index dce7b7adc0..452f0b6f0a 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -173,7 +173,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
* @param TransactionJournal $journal
*
* @return string
- *
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function getExactAmount(PiggyBank $piggyBank, PiggyBankRepetition $repetition, TransactionJournal $journal): string
{
@@ -357,6 +358,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
* @param Carbon $date
*
* @return string
+ * @throws \JsonException
*/
public function leftOnAccount(PiggyBank $piggyBank, Carbon $date): string
{
diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php
index 60a3f579f0..7305677f64 100644
--- a/app/Repositories/Rule/RuleRepository.php
+++ b/app/Repositories/Rule/RuleRepository.php
@@ -416,9 +416,9 @@ class RuleRepository implements RuleRepositoryInterface
* @param Rule $rule
* @param array $data
*
- * @return bool
+ * @return void
*/
- private function storeTriggers(Rule $rule, array $data): bool
+ private function storeTriggers(Rule $rule, array $data): void
{
$order = 1;
foreach ($data['triggers'] as $trigger) {
@@ -437,7 +437,6 @@ class RuleRepository implements RuleRepositoryInterface
++$order;
}
- return true;
}
/**
@@ -464,9 +463,9 @@ class RuleRepository implements RuleRepositoryInterface
* @param Rule $rule
* @param array $data
*
- * @return bool
+ * @return void
*/
- private function storeActions(Rule $rule, array $data): bool
+ private function storeActions(Rule $rule, array $data): void
{
$order = 1;
foreach ($data['actions'] as $action) {
@@ -484,7 +483,6 @@ class RuleRepository implements RuleRepositoryInterface
++$order;
}
- return true;
}
/**
diff --git a/app/Repositories/Tag/OperationsRepository.php b/app/Repositories/Tag/OperationsRepository.php
index 76ba6fff8d..7b923bbc06 100644
--- a/app/Repositories/Tag/OperationsRepository.php
+++ b/app/Repositories/Tag/OperationsRepository.php
@@ -116,6 +116,8 @@ class OperationsRepository implements OperationsRepositoryInterface
/**
* @return Collection
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function getTags(): Collection
{
diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
index 938d6c0b07..47a8dfe4b2 100644
--- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php
+++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
@@ -384,6 +384,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
*
* @return array
* @throws FireflyException
+ * @throws \JsonException
*/
public function getPiggyEvents(TransactionGroup $group): array
{
diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php
index 1f19611704..1cea2563ff 100644
--- a/app/Services/Internal/Support/AccountServiceTrait.php
+++ b/app/Services/Internal/Support/AccountServiceTrait.php
@@ -367,6 +367,8 @@ trait AccountServiceTrait
* @param string $currencyCode
*
* @return TransactionCurrency
+ * @throws FireflyException
+ * @throws \JsonException
*/
protected function getCurrency(int $currencyId, string $currencyCode): TransactionCurrency
{
diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.php
index f08d099fd0..c78e035be8 100644
--- a/app/Services/Internal/Support/RecurringTransactionTrait.php
+++ b/app/Services/Internal/Support/RecurringTransactionTrait.php
@@ -108,6 +108,7 @@ trait RecurringTransactionTrait
* @param array $transactions
*
* @throws FireflyException
+ * @throws \JsonException
*/
protected function createTransactions(Recurrence $recurrence, array $transactions): void
{
diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php
index 0529a75430..2adaf3c1da 100644
--- a/app/Services/Internal/Update/AccountUpdateService.php
+++ b/app/Services/Internal/Update/AccountUpdateService.php
@@ -142,9 +142,7 @@ class AccountUpdateService
//$liabilityType = $data['liability_type'] ?? '';
if ($this->isLiability($account) && array_key_exists('liability_type', $data)) {
$type = $this->getAccountType($data['liability_type']);
- if (null !== $type) {
- $account->account_type_id = $type->id;
- }
+ $account->account_type_id = $type->id;
}
// set liability, alternative method used in v1 layout:
diff --git a/app/Services/Internal/Update/BillUpdateService.php b/app/Services/Internal/Update/BillUpdateService.php
index b90530a05e..500538cc44 100644
--- a/app/Services/Internal/Update/BillUpdateService.php
+++ b/app/Services/Internal/Update/BillUpdateService.php
@@ -49,6 +49,8 @@ class BillUpdateService
* @param array $data
*
* @return Bill
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function update(Bill $bill, array $data): Bill
{
diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.php
index 45b4cd2c32..c97f6daf78 100644
--- a/app/Services/Internal/Update/GroupUpdateService.php
+++ b/app/Services/Internal/Update/GroupUpdateService.php
@@ -43,6 +43,7 @@ class GroupUpdateService
* @param array $data
*
* @return TransactionGroup
+ * @throws DuplicateTransactionException
* @throws FireflyException
*/
public function update(TransactionGroup $transactionGroup, array $data): TransactionGroup
@@ -191,8 +192,9 @@ class GroupUpdateService
*
* @return TransactionJournal|null
*
- * @throws FireflyException
* @throws DuplicateTransactionException
+ * @throws FireflyException
+ * @throws \JsonException
*/
private function createTransactionJournal(TransactionGroup $transactionGroup, array $data): ?TransactionJournal
{
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index 4310a18924..4ef63ea5bc 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -65,6 +65,7 @@ class Amount
*
* @return string
*
+ * @throws FireflyException
* @noinspection MoreThanThreeArgumentsInspection
*/
public function formatFlat(string $symbol, int $decimalPlaces, string $amount, bool $coloured = null): string
@@ -112,7 +113,8 @@ class Amount
/**
* @return string
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getCurrencyCode(): string
{
@@ -136,6 +138,8 @@ class Amount
/**
* @return TransactionCurrency
+ * @throws FireflyException
+ * @throws JsonException
*/
public function getDefaultCurrency(): TransactionCurrency
{
@@ -150,7 +154,6 @@ class Amount
*
* @return TransactionCurrency
* @throws FireflyException
- * @throws JsonException
*/
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
{
@@ -221,6 +224,7 @@ class Amount
/**
* @return array
+ * @throws FireflyException
*/
private function getLocaleInfo(): array
{
diff --git a/app/Support/Chart/Budget/FrontpageChartGenerator.php b/app/Support/Chart/Budget/FrontpageChartGenerator.php
index 1315677027..0163a4b30d 100644
--- a/app/Support/Chart/Budget/FrontpageChartGenerator.php
+++ b/app/Support/Chart/Budget/FrontpageChartGenerator.php
@@ -220,6 +220,7 @@ class FrontpageChartGenerator
* A basic setter for the user. Also updates the repositories with the right user.
*
* @param User $user
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function setUser(User $user): void
{
diff --git a/app/Support/Cronjobs/BillWarningCronjob.php b/app/Support/Cronjobs/BillWarningCronjob.php
index b0238e7756..79ce30f5af 100644
--- a/app/Support/Cronjobs/BillWarningCronjob.php
+++ b/app/Support/Cronjobs/BillWarningCronjob.php
@@ -36,6 +36,8 @@ class BillWarningCronjob extends AbstractCronjob
{
/**
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function fire(): void
{
diff --git a/app/Support/Cronjobs/RecurringCronjob.php b/app/Support/Cronjobs/RecurringCronjob.php
index 18abc6347b..b71bdf4f3d 100644
--- a/app/Support/Cronjobs/RecurringCronjob.php
+++ b/app/Support/Cronjobs/RecurringCronjob.php
@@ -36,6 +36,8 @@ class RecurringCronjob extends AbstractCronjob
{
/**
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function fire(): void
{
diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php
index 08521111e0..683572f018 100644
--- a/app/Support/Export/ExportDataGenerator.php
+++ b/app/Support/Export/ExportDataGenerator.php
@@ -590,6 +590,8 @@ class ExportDataGenerator
/**
* @return string
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
private function exportTags(): string
{
diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php
index 9eb07bbe8f..8cf762f790 100644
--- a/app/Support/Http/Controllers/AugumentData.php
+++ b/app/Support/Http/Controllers/AugumentData.php
@@ -191,7 +191,6 @@ trait AugumentData
* @param Carbon $end
*
* @return Collection
- * @throws JsonException
*/
protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info
{
diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php
index c28110864f..dd931499cb 100644
--- a/app/Support/Http/Controllers/GetConfigurationData.php
+++ b/app/Support/Http/Controllers/GetConfigurationData.php
@@ -88,6 +88,8 @@ trait GetConfigurationData
*
* @return array
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getDateRangeConfig(): array // get configuration + get preferences.
{
diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php
index b15829ca0d..9ae5ce2700 100644
--- a/app/Support/Http/Controllers/PeriodOverview.php
+++ b/app/Support/Http/Controllers/PeriodOverview.php
@@ -79,7 +79,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array
{
@@ -271,7 +272,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array
{
@@ -350,7 +352,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array
{
@@ -404,7 +407,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
{
@@ -485,7 +489,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags.
{
@@ -560,7 +565,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
- * @throws JsonException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array
{
diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php
index 8a36067eda..a39eb32d21 100644
--- a/app/Support/Http/Controllers/RequestInformation.php
+++ b/app/Support/Http/Controllers/RequestInformation.php
@@ -86,6 +86,8 @@ trait RequestInformation
*
* @return bool
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
final protected function hasSeenDemo(): bool // get request info + get preference
{
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index 75905e221b..0e34b48f1d 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -333,6 +333,7 @@ class Navigation
* @param Carbon $end
*
* @return array
+ * @throws FireflyException
*/
public function listOfPeriods(Carbon $start, Carbon $end): array
{
@@ -436,6 +437,7 @@ class Navigation
* @param Carbon $end
*
* @return string
+ * @throws FireflyException
*/
public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string
{
diff --git a/app/Support/Report/Budget/BudgetReportGenerator.php b/app/Support/Report/Budget/BudgetReportGenerator.php
index cdf4c1226c..31f376b78e 100644
--- a/app/Support/Report/Budget/BudgetReportGenerator.php
+++ b/app/Support/Report/Budget/BudgetReportGenerator.php
@@ -363,6 +363,8 @@ class BudgetReportGenerator
/**
* @param User $user
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function setUser(User $user): void
{
diff --git a/app/Support/Search/AccountSearch.php b/app/Support/Search/AccountSearch.php
index 4fe9758d27..9ace498a2b 100644
--- a/app/Support/Search/AccountSearch.php
+++ b/app/Support/Search/AccountSearch.php
@@ -56,7 +56,6 @@ class AccountSearch implements GenericSearchInterface
/**
* @return Collection
- * @throws JsonException
*/
public function search(): Collection
{
diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php
index a5df8dbcdb..510d2b2c9f 100644
--- a/app/Support/Search/OperatorQuerySearch.php
+++ b/app/Support/Search/OperatorQuerySearch.php
@@ -1360,7 +1360,8 @@ class OperatorQuerySearch implements SearchInterface
}
/**
- * @param array $range
+ * @param string $field
+ * @param array $range
*
* @throws FireflyException
*/
@@ -1398,7 +1399,8 @@ class OperatorQuerySearch implements SearchInterface
}
/**
- * @param array $range
+ * @param string $field
+ * @param array $range
*
* @throws FireflyException
*/
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index baf71b7cc2..07af270627 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -48,7 +48,6 @@ class Steam
* @param Carbon $date
*
* @return string
- * @throws JsonException
*/
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
{
@@ -203,6 +202,7 @@ class Steam
* @param TransactionCurrency|null $currency
*
* @return string
+ * @throws FireflyException
* @throws JsonException
*/
public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string
@@ -252,7 +252,6 @@ class Steam
* @param Carbon $date
*
* @return array
- * @throws FireflyException
* @throws JsonException
*/
public function balancesByAccounts(Collection $accounts, Carbon $date): array
@@ -317,7 +316,6 @@ class Steam
* @param Carbon $date
*
* @return array
- * @throws JsonException
*/
public function balancePerCurrency(Account $account, Carbon $date): array
{
@@ -431,6 +429,8 @@ class Steam
*
* @return string
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getLocale(): string // get preference
{
@@ -452,6 +452,8 @@ class Steam
*
* @return string
* @throws FireflyException
+ * @throws \Psr\Container\ContainerExceptionInterface
+ * @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getLanguage(): string // get preference
{
@@ -547,6 +549,7 @@ class Steam
* Additionally fixed a problem with PHP <= 5.2.x with big integers
*
* @param string $value
+ * @return string
*/
public function floatalize(string $value): string
{
diff --git a/app/Support/System/OAuthKeys.php b/app/Support/System/OAuthKeys.php
index 76d75ee230..1eff32208e 100644
--- a/app/Support/System/OAuthKeys.php
+++ b/app/Support/System/OAuthKeys.php
@@ -119,6 +119,9 @@ class OAuthKeys
/**
* @return bool
+ * @throws ContainerExceptionInterface
+ * @throws FireflyException
+ * @throws NotFoundExceptionInterface
*/
public static function restoreKeysFromDB(): bool
{
diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.php
index bf6dfb0d75..8afcae7b81 100644
--- a/app/TransactionRules/Engine/SearchRuleEngine.php
+++ b/app/TransactionRules/Engine/SearchRuleEngine.php
@@ -482,10 +482,10 @@ class SearchRuleEngine implements RuleEngineInterface
/**
* @param RuleGroup $group
*
- * @return bool
+ * @return void
* @throws FireflyException
*/
- private function fireGroup(RuleGroup $group): bool
+ private function fireGroup(RuleGroup $group): void
{
$all = false;
Log::debug(sprintf('Going to fire group #%d with %d rule(s)', $group->id, $group->rules->count()));
@@ -499,11 +499,10 @@ class SearchRuleEngine implements RuleEngineInterface
if (true === $result && true === $rule->stop_processing) {
Log::debug(sprintf('The rule was triggered and rule->stop_processing = true, so group #%d will stop processing further rules.', $group->id));
- return true;
+ return;
}
}
- return $all;
}
/**
diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php
index d3cdbeb094..19649aaedb 100644
--- a/app/Transformers/AccountTransformer.php
+++ b/app/Transformers/AccountTransformer.php
@@ -53,7 +53,6 @@ class AccountTransformer extends AbstractTransformer
* @param Account $account
*
* @return array
- * @throws FireflyException
* @throws JsonException
*/
public function transform(Account $account): array
@@ -171,6 +170,8 @@ class AccountTransformer extends AbstractTransformer
* @param Account $account
*
* @return array
+ * @throws FireflyException
+ * @throws JsonException
*/
private function getCurrency(Account $account): array
{
diff --git a/app/Transformers/BillTransformer.php b/app/Transformers/BillTransformer.php
index f641fba83a..9885840f30 100644
--- a/app/Transformers/BillTransformer.php
+++ b/app/Transformers/BillTransformer.php
@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Transformers;
use Carbon\Carbon;
+use Carbon\CarbonInterface;
use FireflyIII\Models\Bill;
use FireflyIII\Models\ObjectGroup;
use FireflyIII\Models\TransactionJournal;
@@ -101,7 +102,7 @@ class BillTransformer extends AbstractTransformer
$current = $payDatesFormatted[0] ?? null;
if (null !== $current && !$temp->isToday()) {
$temp2 = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current);
- $nextExpectedMatchDiff = $temp2->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW);
+ $nextExpectedMatchDiff = $temp2->diffForHumans(today(), CarbonInterface::DIFF_RELATIVE_TO_NOW);
}
unset($temp, $temp2);
diff --git a/app/Transformers/PiggyBankEventTransformer.php b/app/Transformers/PiggyBankEventTransformer.php
index c31e6e4fd6..80da4595c1 100644
--- a/app/Transformers/PiggyBankEventTransformer.php
+++ b/app/Transformers/PiggyBankEventTransformer.php
@@ -55,6 +55,8 @@ class PiggyBankEventTransformer extends AbstractTransformer
* @param PiggyBankEvent $event
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function transform(PiggyBankEvent $event): array
{
diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php
index 39dd7932cd..7a66774b43 100644
--- a/app/Transformers/PiggyBankTransformer.php
+++ b/app/Transformers/PiggyBankTransformer.php
@@ -56,6 +56,8 @@ class PiggyBankTransformer extends AbstractTransformer
* @param PiggyBank $piggyBank
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
+ * @throws \JsonException
*/
public function transform(PiggyBank $piggyBank): array
{
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 76cb848a0d..5229b915d7 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -628,8 +628,9 @@ class FireflyValidator extends Validator
}
/**
- * @param $attribute
- * @param $value
+ * @param string $field
+ * @param string $attribute
+ * @param string $value
* @return bool
*/
public function validateUniqueCurrency(string $field, string $attribute, string $value): bool
diff --git a/config/twigbridge.php b/config/twigbridge.php
index a3f8c7a9d3..a56206bb83 100644
--- a/config/twigbridge.php
+++ b/config/twigbridge.php
@@ -23,26 +23,6 @@
declare(strict_types=1);
-/*
- * twigbridge.php
- * Copyright (c) 2022 [email protected]
- *
- * This file is part of Firefly III (https://github.com/firefly-iii).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
/**
* This file is part of the TwigBridge package.
*