diff --git a/app/Api/V1/Controllers/System/UserController.php b/app/Api/V1/Controllers/System/UserController.php
index 62d48cfddf..96574b45f1 100644
--- a/app/Api/V1/Controllers/System/UserController.php
+++ b/app/Api/V1/Controllers/System/UserController.php
@@ -90,6 +90,7 @@ class UserController extends Controller
* Display a listing of the resource.
*
* @return JsonResponse
+ * @throws FireflyException
* @codeCoverageIgnore
*/
public function index(): JsonResponse
diff --git a/app/Api/V1/Controllers/User/PreferencesController.php b/app/Api/V1/Controllers/User/PreferencesController.php
index 39e26e0994..32d7921130 100644
--- a/app/Api/V1/Controllers/User/PreferencesController.php
+++ b/app/Api/V1/Controllers/User/PreferencesController.php
@@ -47,6 +47,7 @@ class PreferencesController extends Controller
* List all of them.
*
* @return JsonResponse
+ * @throws \FireflyIII\Exceptions\FireflyException
* @codeCoverageIgnore
*/
public function index(): JsonResponse
@@ -115,8 +116,10 @@ class PreferencesController extends Controller
/**
* @param PreferenceUpdateRequest $request
+ * @param Preference $preference
*
* @return JsonResponse
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function update(PreferenceUpdateRequest $request, Preference $preference): JsonResponse
{
diff --git a/app/Api/V1/Controllers/Webhook/AttemptController.php b/app/Api/V1/Controllers/Webhook/AttemptController.php
index 118480a407..24797c6b38 100644
--- a/app/Api/V1/Controllers/Webhook/AttemptController.php
+++ b/app/Api/V1/Controllers/Webhook/AttemptController.php
@@ -62,9 +62,11 @@ class AttemptController extends Controller
}
/**
- * @param Webhook $webhook
+ * @param Webhook $webhook
+ * @param WebhookMessage $message
*
* @return JsonResponse
+ * @throws FireflyException
*/
public function index(Webhook $webhook, WebhookMessage $message): JsonResponse
{
diff --git a/app/Api/V1/Controllers/Webhook/DestroyController.php b/app/Api/V1/Controllers/Webhook/DestroyController.php
index bb41507ede..f989821351 100644
--- a/app/Api/V1/Controllers/Webhook/DestroyController.php
+++ b/app/Api/V1/Controllers/Webhook/DestroyController.php
@@ -74,9 +74,12 @@ class DestroyController extends Controller
/**
* Remove the specified resource from storage.
*
- * @param Webhook $webhook
+ * @param Webhook $webhook
+ * @param WebhookMessage $message
+ * @param WebhookAttempt $attempt
*
* @return JsonResponse
+ * @throws FireflyException
* @codeCoverageIgnore
*/
public function destroyAttempt(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse
@@ -97,9 +100,11 @@ class DestroyController extends Controller
/**
* Remove the specified resource from storage.
*
- * @param Webhook $webhook
+ * @param Webhook $webhook
+ * @param WebhookMessage $message
*
* @return JsonResponse
+ * @throws FireflyException
* @codeCoverageIgnore
*/
public function destroyMessage(Webhook $webhook, WebhookMessage $message): JsonResponse
diff --git a/app/Api/V1/Controllers/Webhook/MessageController.php b/app/Api/V1/Controllers/Webhook/MessageController.php
index a863ad1778..68d1df03f8 100644
--- a/app/Api/V1/Controllers/Webhook/MessageController.php
+++ b/app/Api/V1/Controllers/Webhook/MessageController.php
@@ -61,6 +61,7 @@ class MessageController extends Controller
* @param Webhook $webhook
*
* @return JsonResponse
+ * @throws FireflyException
*/
public function index(Webhook $webhook): JsonResponse
{
diff --git a/app/Api/V1/Controllers/Webhook/ShowController.php b/app/Api/V1/Controllers/Webhook/ShowController.php
index 5fbdf20e37..bb52400725 100644
--- a/app/Api/V1/Controllers/Webhook/ShowController.php
+++ b/app/Api/V1/Controllers/Webhook/ShowController.php
@@ -62,6 +62,7 @@ class ShowController extends Controller
* Display a listing of the webhooks of the user.
*
* @return JsonResponse
+ * @throws \FireflyIII\Exceptions\FireflyException
* @codeCoverageIgnore
*/
public function index(): JsonResponse
diff --git a/app/Api/V1/Controllers/Webhook/SubmitController.php b/app/Api/V1/Controllers/Webhook/SubmitController.php
index f81e7efebf..7ed448636e 100644
--- a/app/Api/V1/Controllers/Webhook/SubmitController.php
+++ b/app/Api/V1/Controllers/Webhook/SubmitController.php
@@ -73,6 +73,6 @@ class SubmitController extends Controller
SendWebhookMessage::dispatch($message)->afterResponse();
}
- return response()->json([], 200);
+ return response()->json([]);
}
}
diff --git a/app/Api/V1/Requests/Models/Tag/StoreRequest.php b/app/Api/V1/Requests/Models/Tag/StoreRequest.php
index e23101ae47..979baffcee 100644
--- a/app/Api/V1/Requests/Models/Tag/StoreRequest.php
+++ b/app/Api/V1/Requests/Models/Tag/StoreRequest.php
@@ -51,9 +51,8 @@ class StoreRequest extends FormRequest
'description' => $this->string('description'),
'has_location' => true,
];
- $data = $this->appendLocationData($data, null);
- return $data;
+ return $this->appendLocationData($data, null);
}
/**
diff --git a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
index 99651753e8..973d750d63 100644
--- a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
@@ -53,9 +53,8 @@ class UpdateRequest extends FormRequest
'description' => ['description', 'string'],
];
$data = $this->getAllData($fields);
- $data = $this->appendLocationData($data, null);
- return $data;
+ return $this->appendLocationData($data, null);
}
/**
diff --git a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
index 8e5c1f53ea..7d8a31ddfd 100644
--- a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
+++ b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php
@@ -96,6 +96,7 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param TransactionJournal $journal
*
* @return int
+ * @throws JsonException
*/
private function correctJournal(TransactionJournal $journal): int
{
@@ -146,7 +147,6 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param Account $account
*
* @return TransactionCurrency
- * @throws JsonException
*/
private function getCurrency(Account $account): TransactionCurrency
{
diff --git a/app/Console/Commands/Correction/CreateAccessTokens.php b/app/Console/Commands/Correction/CreateAccessTokens.php
index 8586aa0f50..7933662fe7 100644
--- a/app/Console/Commands/Correction/CreateAccessTokens.php
+++ b/app/Console/Commands/Correction/CreateAccessTokens.php
@@ -63,7 +63,7 @@ class CreateAccessTokens extends Command
$users = $repository->all();
/** @var User $user */
foreach ($users as $user) {
- $pref = app('preferences')->getForUser($user, 'access_token', null);
+ $pref = app('preferences')->getForUser($user, 'access_token');
if (null === $pref) {
$token = $user->generateAccessToken();
app('preferences')->setForUser($user, 'access_token', $token);
diff --git a/app/Console/Commands/Correction/DeleteZeroAmount.php b/app/Console/Commands/Correction/DeleteZeroAmount.php
index 9e99cb5573..60a26160bf 100644
--- a/app/Console/Commands/Correction/DeleteZeroAmount.php
+++ b/app/Console/Commands/Correction/DeleteZeroAmount.php
@@ -57,7 +57,6 @@ class DeleteZeroAmount extends Command
$start = microtime(true);
$set = Transaction::where('amount', 0)->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray();
$set = array_unique($set);
- /** @var Collection $journals */
$journals = TransactionJournal::whereIn('id', $set)->get();
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
diff --git a/app/Console/Commands/Correction/EnableCurrencies.php b/app/Console/Commands/Correction/EnableCurrencies.php
index a3b2f6135e..d88c66bc04 100644
--- a/app/Console/Commands/Correction/EnableCurrencies.php
+++ b/app/Console/Commands/Correction/EnableCurrencies.php
@@ -67,14 +67,12 @@ class EnableCurrencies extends Command
}
// get all from journals:
- /** @var Collection $journals */
$journals = TransactionJournal::groupBy('transaction_currency_id')->get(['transaction_currency_id']);
foreach ($journals as $entry) {
$found[] = (int)$entry->transaction_currency_id;
}
// get all from transactions
- /** @var Collection $transactions */
$transactions = Transaction::groupBy('transaction_currency_id', 'foreign_currency_id')->get(['transaction_currency_id', 'foreign_currency_id']);
foreach ($transactions as $entry) {
$found[] = (int)$entry->transaction_currency_id;
@@ -82,7 +80,6 @@ class EnableCurrencies extends Command
}
// get all from budget limits
- /** @var Collection $limits */
$limits = BudgetLimit::groupBy('transaction_currency_id')->get(['transaction_currency_id']);
foreach ($limits as $entry) {
$found[] = (int)$entry->transaction_currency_id;
diff --git a/app/Console/Commands/Correction/FixFrontpageAccounts.php b/app/Console/Commands/Correction/FixFrontpageAccounts.php
index fc6bdebb32..8c4c9a9bed 100644
--- a/app/Console/Commands/Correction/FixFrontpageAccounts.php
+++ b/app/Console/Commands/Correction/FixFrontpageAccounts.php
@@ -61,7 +61,7 @@ class FixFrontpageAccounts extends Command
$users = User::get();
/** @var User $user */
foreach ($users as $user) {
- $preference = Preferences::getForUser($user, 'frontPageAccounts', null);
+ $preference = Preferences::getForUser($user, 'frontPageAccounts');
if (null !== $preference) {
$this->fixPreference($preference);
}
diff --git a/app/Console/Commands/Correction/FixPiggies.php b/app/Console/Commands/Correction/FixPiggies.php
index 8076663b95..692493123b 100644
--- a/app/Console/Commands/Correction/FixPiggies.php
+++ b/app/Console/Commands/Correction/FixPiggies.php
@@ -48,9 +48,6 @@ class FixPiggies extends Command
*/
protected $signature = 'firefly-iii:fix-piggies';
- /** @var int */
- private $count;
-
/**
* Execute the console command.
*
@@ -58,8 +55,8 @@ class FixPiggies extends Command
*/
public function handle(): int
{
- $this->count = 0;
- $start = microtime(true);
+ $count = 0;
+ $start = microtime(true);
$set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get();
/** @var PiggyBankEvent $event */
@@ -74,7 +71,7 @@ class FixPiggies extends Command
if (null === $journal) {
$event->transaction_journal_id = null;
$event->save();
- $this->count++;
+ $count++;
continue;
}
@@ -84,14 +81,14 @@ class FixPiggies extends Command
$event->transaction_journal_id = null;
$event->save();
$this->line(sprintf('Piggy bank #%d was referenced by an invalid event. This has been fixed.', $event->piggy_bank_id));
- $this->count++;
+ $count++;
}
}
- if (0 === $this->count) {
+ if (0 === $count) {
$this->line('All piggy bank events are correct.');
}
- if (0 !== $this->count) {
- $this->line(sprintf('Fixed %d piggy bank event(s).', $this->count));
+ if (0 !== $count) {
+ $this->line(sprintf('Fixed %d piggy bank event(s).', $count));
}
$end = round(microtime(true) - $start, 2);
diff --git a/app/Console/Commands/ScanAttachments.php b/app/Console/Commands/ScanAttachments.php
index b423497fda..25852b1561 100644
--- a/app/Console/Commands/ScanAttachments.php
+++ b/app/Console/Commands/ScanAttachments.php
@@ -19,8 +19,6 @@
* along with this program. If not, see .
*/
-/** @noinspection PhpDynamicAsStaticMethodCallInspection */
-
declare(strict_types=1);
namespace FireflyIII\Console\Commands;
diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php
index a1746a2ffa..b214846c26 100644
--- a/app/Console/Commands/Tools/Cron.php
+++ b/app/Console/Commands/Tools/Cron.php
@@ -142,7 +142,6 @@ class Cron extends Command
* @param bool $force
* @param Carbon|null $date
*
- * @throws FireflyException
*/
private function autoBudgetCronJob(bool $force, ?Carbon $date): void
{
diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php
index 78197894f9..81151a2b0b 100644
--- a/app/Console/Commands/Upgrade/AccountCurrencies.php
+++ b/app/Console/Commands/Upgrade/AccountCurrencies.php
@@ -106,6 +106,7 @@ class AccountCurrencies extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -134,6 +135,8 @@ class AccountCurrencies extends Command
/**
* @param User $user
* @param string $systemCurrencyCode
+ *
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function updateCurrenciesForUser(User $user, string $systemCurrencyCode): void
{
diff --git a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
index 3f495c2c74..5ea5705b65 100644
--- a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
+++ b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php
@@ -69,6 +69,7 @@ class AppendBudgetLimitPeriods extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php
index 358452af1f..45fca43d34 100644
--- a/app/Console/Commands/Upgrade/BackToJournals.php
+++ b/app/Console/Commands/Upgrade/BackToJournals.php
@@ -83,6 +83,7 @@ class BackToJournals extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isMigrated(): bool
{
@@ -93,6 +94,7 @@ class BackToJournals extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
index 9aed01b7f8..6620861e1b 100644
--- a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
+++ b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php
@@ -67,7 +67,6 @@ class BudgetLimitCurrency extends Command
/** @var BudgetLimit $budgetLimit */
foreach ($budgetLimits as $budgetLimit) {
if (null === $budgetLimit->transaction_currency_id) {
- /** @var Budget $budget */
$budget = $budgetLimit->budget;
if (null !== $budget) {
$user = $budget->user;
@@ -96,6 +95,7 @@ class BudgetLimitCurrency extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/CCLiabilities.php b/app/Console/Commands/Upgrade/CCLiabilities.php
index 64e596e75a..6637c2292c 100644
--- a/app/Console/Commands/Upgrade/CCLiabilities.php
+++ b/app/Console/Commands/Upgrade/CCLiabilities.php
@@ -93,6 +93,7 @@ class CCLiabilities extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php
index 3c35ac9415..2e4edc48e4 100644
--- a/app/Console/Commands/Upgrade/MigrateAttachments.php
+++ b/app/Console/Commands/Upgrade/MigrateAttachments.php
@@ -105,6 +105,7 @@ class MigrateAttachments extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php
index 2eb21a5d0f..54d27a70c0 100644
--- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php
+++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php
@@ -64,7 +64,6 @@ class MigrateJournalNotes extends Command
}
$count = 0;
- /** @noinspection PhpUndefinedMethodInspection */
$set = TransactionJournalMeta::whereName('notes')->get();
/** @var TransactionJournalMeta $meta */
foreach ($set as $meta) {
@@ -104,6 +103,7 @@ class MigrateJournalNotes extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
index 857f4fbb09..2fc939b958 100644
--- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
+++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php
@@ -79,6 +79,7 @@ class MigrateRecurrenceMeta extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -92,6 +93,7 @@ class MigrateRecurrenceMeta extends Command
/**
* @return int
+ * @throws \JsonException
*/
private function migrateMetaData(): int
{
@@ -110,6 +112,7 @@ class MigrateRecurrenceMeta extends Command
* @param RecurrenceMeta $meta
*
* @return int
+ * @throws \JsonException
*/
private function migrateEntry(RecurrenceMeta $meta): int
{
@@ -125,7 +128,7 @@ class MigrateRecurrenceMeta extends Command
if ('tags' === $meta->name) {
$array = explode(',', $meta->value);
- $value = json_encode($array, JSON_THROW_ON_ERROR, 512);
+ $value = json_encode($array, JSON_THROW_ON_ERROR);
}
RecurrenceTransactionMeta::create(
diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
index 0c5f1eb795..3e956f417b 100644
--- a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
+++ b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php
@@ -74,6 +74,7 @@ class MigrateRecurrenceType extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php
index 9b8f41594c..67633f3b49 100644
--- a/app/Console/Commands/Upgrade/MigrateTagLocations.php
+++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php
@@ -72,6 +72,7 @@ class MigrateTagLocations extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php
index 8b2e0f3993..4e04318156 100644
--- a/app/Console/Commands/Upgrade/MigrateToGroups.php
+++ b/app/Console/Commands/Upgrade/MigrateToGroups.php
@@ -127,6 +127,7 @@ class MigrateToGroups extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isMigrated(): bool
{
diff --git a/app/Console/Commands/Upgrade/MigrateToRules.php b/app/Console/Commands/Upgrade/MigrateToRules.php
index 8f923915d1..364cb64df0 100644
--- a/app/Console/Commands/Upgrade/MigrateToRules.php
+++ b/app/Console/Commands/Upgrade/MigrateToRules.php
@@ -119,6 +119,7 @@ class MigrateToRules extends Command
/**
* @return bool
+ * @throws FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
index a06f6a6401..07118054ce 100644
--- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
+++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
@@ -112,6 +112,7 @@ class OtherCurrenciesCorrections extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -161,7 +162,6 @@ class OtherCurrenciesCorrections extends Command
}
- /** @var Account $account */
$account = $leadTransaction->account;
$currency = $this->getCurrency($account);
if (null === $currency) {
diff --git a/app/Console/Commands/Upgrade/RenameAccountMeta.php b/app/Console/Commands/Upgrade/RenameAccountMeta.php
index 37f86dd6cc..9e7f6cd172 100644
--- a/app/Console/Commands/Upgrade/RenameAccountMeta.php
+++ b/app/Console/Commands/Upgrade/RenameAccountMeta.php
@@ -96,6 +96,7 @@ class RenameAccountMeta extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php
index c9fd6bb629..f3fbb06409 100644
--- a/app/Console/Commands/Upgrade/TransactionIdentifier.php
+++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php
@@ -120,6 +120,7 @@ class TransactionIdentifier extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php
index aae3bffc56..26435e1107 100644
--- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php
+++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php
@@ -57,6 +57,7 @@ class UpgradeLiabilities extends Command
/**
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -96,7 +97,7 @@ class UpgradeLiabilities extends Command
/**
* @param TransactionJournal $journal
*
- * @return Transaction
+ * @return Transaction|null
*/
private function getSourceTransaction(TransactionJournal $journal): ?Transaction
{
@@ -106,7 +107,7 @@ class UpgradeLiabilities extends Command
/**
* @param TransactionJournal $journal
*
- * @return Transaction
+ * @return Transaction|null
*/
private function getDestinationTransaction(TransactionJournal $journal): ?Transaction
{
diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php
index 5c4903f0d6..aa997ff96c 100644
--- a/app/Console/Commands/UpgradeFireflyInstructions.php
+++ b/app/Console/Commands/UpgradeFireflyInstructions.php
@@ -90,7 +90,7 @@ class UpgradeFireflyInstructions extends Command
$text = '';
foreach (array_keys($config) as $compare) {
// if string starts with:
- if (0 === strpos($version, $compare)) {
+ if (str_starts_with($version, $compare)) {
$text = $config[$compare];
}
}
@@ -119,9 +119,7 @@ class UpgradeFireflyInstructions extends Command
private function showLine(): void
{
$line = '+';
- for ($i = 0; $i < 78; ++$i) {
- $line .= '-';
- }
+ $line .= str_repeat('-', 78);
$line .= '+';
$this->line($line);
}
@@ -163,7 +161,7 @@ class UpgradeFireflyInstructions extends Command
$text = '';
foreach (array_keys($config) as $compare) {
// if string starts with:
- if (0 === strpos($version, $compare)) {
+ if (str_starts_with($version, $compare)) {
$text = $config[$compare];
}
}
diff --git a/app/Console/Commands/VerifiesAccessToken.php b/app/Console/Commands/VerifiesAccessToken.php
index 7f243ca710..631ccd137e 100644
--- a/app/Console/Commands/VerifiesAccessToken.php
+++ b/app/Console/Commands/VerifiesAccessToken.php
@@ -67,6 +67,7 @@ trait VerifiesAccessToken
* Returns false when given token does not match given user token.
*
* @return bool
+ * @throws FireflyException
*/
protected function verifyAccessToken(): bool
{
@@ -81,7 +82,7 @@ trait VerifiesAccessToken
return false;
}
- $accessToken = app('preferences')->getForUser($user, 'access_token', null);
+ $accessToken = app('preferences')->getForUser($user, 'access_token');
if (null === $accessToken) {
Log::error(sprintf('User #%d has no access token, so cannot access command line options.', $userId));
diff --git a/app/Events/RequestedReportOnJournals.php b/app/Events/RequestedReportOnJournals.php
index cfe28a5d9f..3152c9b969 100644
--- a/app/Events/RequestedReportOnJournals.php
+++ b/app/Events/RequestedReportOnJournals.php
@@ -61,7 +61,7 @@ class RequestedReportOnJournals
/**
* Get the channels the event should broadcast on.
*
- * @return Channel|array
+ * @return PrivateChannel
*/
public function broadcastOn()
{
diff --git a/app/Events/UpdatedTransactionGroup.php b/app/Events/UpdatedTransactionGroup.php
index e379251fbd..eefd05d501 100644
--- a/app/Events/UpdatedTransactionGroup.php
+++ b/app/Events/UpdatedTransactionGroup.php
@@ -40,10 +40,12 @@ class UpdatedTransactionGroup extends Event
public $applyRules;
/** @var TransactionGroup The group that was stored. */
public $transactionGroup;
+
/**
* Create a new event instance.
*
* @param TransactionGroup $transactionGroup
+ * @param bool $applyRules
*/
public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true)
{
diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php
index 7a95a5c978..a5d5a0b71b 100644
--- a/app/Exceptions/GracefulNotFoundHandler.php
+++ b/app/Exceptions/GracefulNotFoundHandler.php
@@ -50,7 +50,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
* @param Request $request
* @param Throwable $e
*
- * @return mixed
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\JsonResponse|\Illuminate\Http\Response|Redirector|RedirectResponse|Response
* @throws Throwable
*/
public function render($request, Throwable $e)
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 5d5940b711..e44237e4ea 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -68,6 +68,7 @@ class Handler extends ExceptionHandler
* @param Throwable $e
*
* @return mixed
+ * @throws Throwable
*/
public function render($request, Throwable $e)
{
diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php
index 3f1642ff4c..f8db606acf 100644
--- a/app/Factory/AccountFactory.php
+++ b/app/Factory/AccountFactory.php
@@ -131,6 +131,7 @@ class AccountFactory
* @param array $data
*
* @return AccountType|null
+ * @throws FireflyException
*/
protected function getAccountType(array $data): ?AccountType
{
@@ -175,9 +176,11 @@ class AccountFactory
}
/**
- * @param array $data
+ * @param AccountType $type
+ * @param array $data
*
* @return Account
+ * @throws \JsonException
*/
private function createAccount(AccountType $type, array $data): Account
{
@@ -244,6 +247,7 @@ class AccountFactory
* @param array $data
*
* @return array
+ * @throws \JsonException
*/
private function cleanMetaDataArray(Account $account, array $data): array
{
diff --git a/app/Factory/AttachmentFactory.php b/app/Factory/AttachmentFactory.php
index 87fb2375d1..7c5ecedfb3 100644
--- a/app/Factory/AttachmentFactory.php
+++ b/app/Factory/AttachmentFactory.php
@@ -46,7 +46,7 @@ class AttachmentFactory
public function create(array $data): ?Attachment
{
// append if necessary.
- $model = false === strpos($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\\Models\\%s', $data['attachable_type'])
+ $model = !str_contains($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\\Models\\%s', $data['attachable_type'])
: $data['attachable_type'];
// get journal instead of transaction.
diff --git a/app/Factory/TransactionCurrencyFactory.php b/app/Factory/TransactionCurrencyFactory.php
index e8aa313844..4d6779a911 100644
--- a/app/Factory/TransactionCurrencyFactory.php
+++ b/app/Factory/TransactionCurrencyFactory.php
@@ -19,8 +19,6 @@
* along with this program. If not, see .
*/
-/** @noinspection PhpDynamicAsStaticMethodCallInspection */
-/** @noinspection PhpUndefinedMethodInspection */
/** @noinspection MultipleReturnStatementsInspection */
declare(strict_types=1);
diff --git a/app/Factory/TransactionFactory.php b/app/Factory/TransactionFactory.php
index a41a871d68..bc8f9ad0c6 100644
--- a/app/Factory/TransactionFactory.php
+++ b/app/Factory/TransactionFactory.php
@@ -178,7 +178,7 @@ class TransactionFactory
}
/**
- * @param TransactionCurrency $foreignCurrency |null
+ * @param TransactionCurrency|null $foreignCurrency |null
*
* @codeCoverageIgnore
*/
diff --git a/app/Factory/TransactionGroupFactory.php b/app/Factory/TransactionGroupFactory.php
index 8002561b6f..edd1ef438d 100644
--- a/app/Factory/TransactionGroupFactory.php
+++ b/app/Factory/TransactionGroupFactory.php
@@ -56,6 +56,7 @@ class TransactionGroupFactory
*
* @return TransactionGroup
* @throws DuplicateTransactionException
+ * @throws FireflyException
*/
public function create(array $data): TransactionGroup
{
diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php
index 4c1788eea4..55eada3ed1 100644
--- a/app/Factory/TransactionJournalFactory.php
+++ b/app/Factory/TransactionJournalFactory.php
@@ -146,6 +146,7 @@ class TransactionJournalFactory
* @return TransactionJournal|null
* @throws DuplicateTransactionException
* @throws FireflyException
+ * @throws \JsonException
*/
private function createJournal(NullArrayObject $row): ?TransactionJournal
{
@@ -294,16 +295,17 @@ class TransactionJournalFactory
* @param NullArrayObject $row
*
* @return string
+ * @throws \JsonException
*/
private function hashArray(NullArrayObject $row): string
{
$dataRow = $row->getArrayCopy();
unset($dataRow['import_hash_v2'], $dataRow['original_source']);
- $json = json_encode($dataRow, JSON_THROW_ON_ERROR, 512);
+ $json = json_encode($dataRow, JSON_THROW_ON_ERROR);
if (false === $json) {
- $json = json_encode((string)microtime(), JSON_THROW_ON_ERROR, 512);
+ $json = json_encode((string)microtime(), JSON_THROW_ON_ERROR);
Log::error(sprintf('Could not hash the original row! %s', json_last_error_msg()), $dataRow);
}
@@ -319,6 +321,7 @@ class TransactionJournalFactory
* @param string $hash
*
* @throws DuplicateTransactionException
+ * @throws \JsonException
*/
private function errorIfDuplicate(string $hash): void
{
@@ -417,7 +420,7 @@ class TransactionJournalFactory
/**
* Set foreign currency to NULL if it's the same as the normal currency:
*
- * @param TransactionCurrency $currency
+ * @param TransactionCurrency|null $currency
* @param TransactionCurrency|null $foreignCurrency
*
* @return TransactionCurrency|null
diff --git a/app/Factory/TransactionTypeFactory.php b/app/Factory/TransactionTypeFactory.php
index 437055f184..4a95c67a0b 100644
--- a/app/Factory/TransactionTypeFactory.php
+++ b/app/Factory/TransactionTypeFactory.php
@@ -19,7 +19,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php
index 009d8d0396..fc33d3cf4c 100644
--- a/app/Generator/Report/Audit/MonthReportGenerator.php
+++ b/app/Generator/Report/Audit/MonthReportGenerator.php
@@ -19,8 +19,6 @@
* along with this program. If not, see .
*/
-/** @noinspection PhpUndefinedMethodInspection */
-
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Audit;
@@ -33,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Support\Collection;
+use JetBrains\PhpStorm\ArrayShape;
use Log;
use Throwable;
@@ -197,9 +196,9 @@ class MonthReportGenerator implements ReportGeneratorInterface
*
* @return array
*
- * @throws FireflyException
*/
- public function getAuditReport(Account $account, Carbon $date): array
+ #[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string",
+ 'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array
{
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);
diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.php
index f6c9af7e0c..8c01709d2a 100644
--- a/app/Generator/Report/Budget/MonthReportGenerator.php
+++ b/app/Generator/Report/Budget/MonthReportGenerator.php
@@ -19,7 +19,6 @@
* along with this program. If not, see .
*/
/** @noinspection MultipleReturnStatementsInspection */
-/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Budget;
diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php
index bfc91dbde4..9461be2b90 100644
--- a/app/Generator/Report/Category/MonthReportGenerator.php
+++ b/app/Generator/Report/Category/MonthReportGenerator.php
@@ -19,7 +19,6 @@
* along with this program. If not, see .
*/
/** @noinspection MultipleReturnStatementsInspection */
-/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Category;
@@ -30,6 +29,7 @@ use FireflyIII\Generator\Report\Support;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection;
+use JetBrains\PhpStorm\Pure;
use Log;
use Throwable;
@@ -57,7 +57,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/**
* MonthReportGenerator constructor.
*/
- public function __construct()
+ #[Pure] public function __construct()
{
$this->income = new Collection;
$this->expenses = new Collection;
@@ -76,7 +76,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
// render!
try {
- return prefixView('reports.category.month', compact('accountIds', 'categoryIds', 'reportType',))
+ return prefixView('reports.category.month', compact('accountIds', 'categoryIds', 'reportType'))
->with('start', $this->start)->with('end', $this->end)
->with('categories', $this->categories)
->with('accounts', $this->accounts)
diff --git a/app/Generator/Report/Tag/MonthReportGenerator.php b/app/Generator/Report/Tag/MonthReportGenerator.php
index 008b9e27eb..c182ce4b9f 100644
--- a/app/Generator/Report/Tag/MonthReportGenerator.php
+++ b/app/Generator/Report/Tag/MonthReportGenerator.php
@@ -20,7 +20,6 @@
*/
/** @noinspection MultipleReturnStatementsInspection */
-/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Tag;
@@ -29,6 +28,7 @@ use Carbon\Carbon;
use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support;
use Illuminate\Support\Collection;
+use JetBrains\PhpStorm\Pure;
use Log;
use Throwable;
@@ -55,7 +55,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/**
* MonthReportGenerator constructor.
*/
- public function __construct()
+ #[Pure] public function __construct()
{
$this->expenses = new Collection;
$this->income = new Collection;
diff --git a/app/Handlers/Events/APIEventHandler.php b/app/Handlers/Events/APIEventHandler.php
index bb944b84fe..f797d5345f 100644
--- a/app/Handlers/Events/APIEventHandler.php
+++ b/app/Handlers/Events/APIEventHandler.php
@@ -43,6 +43,7 @@ class APIEventHandler
* @param AccessTokenCreated $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function accessTokenCreated(AccessTokenCreated $event): bool
{
@@ -60,7 +61,7 @@ class APIEventHandler
$ipAddress = Request::ip();
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
diff --git a/app/Handlers/Events/AdminEventHandler.php b/app/Handlers/Events/AdminEventHandler.php
index 01bc3b9be4..22d8036175 100644
--- a/app/Handlers/Events/AdminEventHandler.php
+++ b/app/Handlers/Events/AdminEventHandler.php
@@ -41,6 +41,7 @@ class AdminEventHandler
* @param AdminRequestedTestMessage $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function sendTestMessage(AdminRequestedTestMessage $event): bool
{
@@ -58,7 +59,7 @@ class AdminEventHandler
}
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php
index 6939b01009..76619f55bf 100644
--- a/app/Handlers/Events/AutomationHandler.php
+++ b/app/Handlers/Events/AutomationHandler.php
@@ -42,6 +42,7 @@ class AutomationHandler
* @param RequestedReportOnJournals $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function reportJournals(RequestedReportOnJournals $event): bool
{
@@ -60,7 +61,7 @@ class AutomationHandler
$email = $user->email;
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php
index 9d6c55cf00..5187c4099b 100644
--- a/app/Handlers/Events/UserEventHandler.php
+++ b/app/Handlers/Events/UserEventHandler.php
@@ -110,6 +110,7 @@ class UserEventHandler
* @param Login $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function demoUserBackToEnglish(Login $event): bool
{
@@ -130,6 +131,8 @@ class UserEventHandler
/**
* @param DetectedNewIPAddress $event
+ *
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function notifyNewIPAddress(DetectedNewIPAddress $event): void
{
@@ -144,7 +147,7 @@ class UserEventHandler
$list = app('preferences')->getForUser($user, 'login_ip_history', [])->data;
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
@@ -171,6 +174,7 @@ class UserEventHandler
* @param UserChangedEmail $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool
{
@@ -195,6 +199,7 @@ class UserEventHandler
* @param UserChangedEmail $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function sendEmailChangeUndoMail(UserChangedEmail $event): bool
{
@@ -246,6 +251,7 @@ class UserEventHandler
* @param RegisteredUser $event
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function sendRegistrationMail(RegisteredUser $event): bool
{
@@ -257,7 +263,7 @@ class UserEventHandler
$ipAddress = $event->ipAddress;
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
@@ -277,6 +283,7 @@ class UserEventHandler
/**
* @param Login $event
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function storeUserIPAddress(Login $event): void
{
diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php
index 7e8d200bdb..5cd4b62e40 100644
--- a/app/Handlers/Events/VersionCheckEventHandler.php
+++ b/app/Handlers/Events/VersionCheckEventHandler.php
@@ -42,6 +42,8 @@ class VersionCheckEventHandler
* Checks with GitHub to see if there is a new version.
*
* @param RequestedVersionCheckStatus $event
+ *
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function checkForUpdates(RequestedVersionCheckStatus $event): void
{
@@ -59,7 +61,6 @@ class VersionCheckEventHandler
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
- /** @var User $user */
$user = $event->user;
if (!$repository->hasRole($user, 'owner')) {
Log::debug('User is not admin, done.');
@@ -87,12 +88,12 @@ class VersionCheckEventHandler
/**
* @param RequestedVersionCheckStatus $event
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void
{
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
- /** @var User $user */
$user = $event->user;
if (!$repository->hasRole($user, 'owner')) {
Log::debug('User is not admin, done.');
diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php
index eca3f3fa3a..d442d46137 100644
--- a/app/Helpers/Attachments/AttachmentHelper.php
+++ b/app/Helpers/Attachments/AttachmentHelper.php
@@ -243,7 +243,6 @@ class AttachmentHelper implements AttachmentHelperInterface
}
$attachment = new Attachment; // create Attachment object.
- /** @noinspection PhpUndefinedFieldInspection */
$attachment->user()->associate($user);
$attachment->attachable()->associate($model);
$attachment->md5 = md5_file($file->getRealPath());
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index e5129dbbde..e3388ae0a9 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -227,7 +227,6 @@ class GroupCollector implements GroupCollectorInterface
*/
public function getGroups(): Collection
{
- /** @var Collection $result */
$result = $this->query->get($this->fields);
// now to parse this into an array.
diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php
index a76ef6df23..26a0dba6e8 100644
--- a/app/Helpers/Help/Help.php
+++ b/app/Helpers/Help/Help.php
@@ -71,6 +71,7 @@ class Help implements HelpInterface
* @param string $language
*
* @return string
+ * @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getFromGitHub(string $route, string $language): string
{
diff --git a/app/Helpers/Update/UpdateTrait.php b/app/Helpers/Update/UpdateTrait.php
index 9ac6dc2b2f..8f72da4775 100644
--- a/app/Helpers/Update/UpdateTrait.php
+++ b/app/Helpers/Update/UpdateTrait.php
@@ -38,6 +38,7 @@ trait UpdateTrait
* 'level' => 'info' / 'success' / 'error'
*
* @return array
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
public function getLatestRelease(): array
{
diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php
index 4bb4af6bc1..27a146bf5e 100644
--- a/app/Http/Controllers/AttachmentController.php
+++ b/app/Http/Controllers/AttachmentController.php
@@ -106,7 +106,7 @@ class AttachmentController extends Controller
*
* @param Attachment $attachment
*
- * @return mixed
+ * @return LaravelResponse
*
* @throws FireflyException
*/
@@ -211,10 +211,12 @@ class AttachmentController extends Controller
/**
* View attachment in browser.
*
+ * @param Request $request
* @param Attachment $attachment
*
* @return LaravelResponse
* @throws FireflyException
+ * @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function view(Request $request, Attachment $attachment): LaravelResponse
{
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index e581bdcc1c..5c878445c4 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -51,9 +51,9 @@ abstract class Controller extends BaseController
public function __construct()
{
// is site a demo site?
- $isDemoSiteConfig = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', false,),);
+ $isDemoSiteConfig = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', false));
$isDemoSite = $isDemoSiteConfig ? $isDemoSiteConfig->data : false;
- app('view')->share('IS_DEMO_SITE', $isDemoSite,);
+ app('view')->share('IS_DEMO_SITE', $isDemoSite);
app('view')->share('DEMO_USERNAME', config('firefly.demo_username'));
app('view')->share('DEMO_PASSWORD', config('firefly.demo_password'));
app('view')->share('FF_VERSION', config('firefly.version'));
@@ -76,12 +76,12 @@ abstract class Controller extends BaseController
// share is alpha, is beta
$isAlpha = false;
- if (false !== strpos(config('firefly.version'), 'alpha')) {
+ if (str_contains(config('firefly.version'), 'alpha')) {
$isAlpha = true;
}
$isBeta = false;
- if (false !== strpos(config('firefly.version'), 'beta')) {
+ if (str_contains(config('firefly.version'), 'beta')) {
$isBeta = true;
}
diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php
index 7f6166e0d6..0b8eba1feb 100644
--- a/app/Http/Controllers/CurrencyController.php
+++ b/app/Http/Controllers/CurrencyController.php
@@ -32,6 +32,7 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Routing\Redirector;
+use Illuminate\View\View;
use Log;
/**
@@ -67,7 +68,7 @@ class CurrencyController extends Controller
*
* @param Request $request
*
- * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View
+ * @return Factory|RedirectResponse|Redirector|View
*/
public function create(Request $request)
{
@@ -120,7 +121,7 @@ class CurrencyController extends Controller
* @param Request $request
* @param TransactionCurrency $currency
*
- * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View
+ * @return Factory|RedirectResponse|Redirector|View
*/
public function delete(Request $request, TransactionCurrency $currency)
{
@@ -258,7 +259,7 @@ class CurrencyController extends Controller
* @param Request $request
* @param TransactionCurrency $currency
*
- * @return Factory|RedirectResponse|Redirector|\Illuminate\View\View
+ * @return Factory|RedirectResponse|Redirector|View
*/
public function edit(Request $request, TransactionCurrency $currency)
{
@@ -316,7 +317,7 @@ class CurrencyController extends Controller
*
* @param Request $request
*
- * @return Factory|\Illuminate\View\View
+ * @return Factory|View
*/
public function index(Request $request)
{
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php
index fca31fc302..d7a6081a7c 100644
--- a/app/Http/Controllers/DebugController.php
+++ b/app/Http/Controllers/DebugController.php
@@ -116,7 +116,7 @@ class DebugController extends Controller
* @param Request $request
*
* @return Factory|View
- *
+ * @throws FireflyException
*/
public function index(Request $request)
{
diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php
index 93e43206e0..403619cc08 100644
--- a/app/Jobs/CreateAutoBudgetLimits.php
+++ b/app/Jobs/CreateAutoBudgetLimits.php
@@ -52,7 +52,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
*
* @codeCoverageIgnore
*
- * @param Carbon $date
+ * @param Carbon|null $date
*/
public function __construct(?Carbon $date)
{
@@ -238,6 +238,8 @@ class CreateAutoBudgetLimits implements ShouldQueue
/**
* @param AutoBudget $autoBudget
+ *
+ * @throws FireflyException
*/
private function createRollover(AutoBudget $autoBudget): void
{
diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php
index 340a2a7e50..c72079e99f 100644
--- a/app/Jobs/CreateRecurringTransactions.php
+++ b/app/Jobs/CreateRecurringTransactions.php
@@ -64,7 +64,7 @@ class CreateRecurringTransactions implements ShouldQueue
*
* @codeCoverageIgnore
*
- * @param Carbon $date
+ * @param Carbon|null $date
*/
public function __construct(?Carbon $date)
{
@@ -347,6 +347,8 @@ class CreateRecurringTransactions implements ShouldQueue
* @param Carbon $date
*
* @return TransactionGroup|null
+ * @throws \FireflyIII\Exceptions\DuplicateTransactionException
+ * @throws \FireflyIII\Exceptions\FireflyException
*/
private function handleOccurrence(Recurrence $recurrence, RecurrenceRepetition $repetition, Carbon $date): ?TransactionGroup
{
diff --git a/app/Jobs/SubmitTelemetryData.php b/app/Jobs/SubmitTelemetryData.php
index a30cd6567b..d8704eecb6 100644
--- a/app/Jobs/SubmitTelemetryData.php
+++ b/app/Jobs/SubmitTelemetryData.php
@@ -54,7 +54,7 @@ class SubmitTelemetryData implements ShouldQueue
*
* @codeCoverageIgnore
*
- * @param Carbon $date
+ * @param Carbon|null $date
*/
public function __construct(?Carbon $date)
{
@@ -80,7 +80,7 @@ class SubmitTelemetryData implements ShouldQueue
$json = $this->parseJson($telemetry);
try {
- $body = json_encode($json, JSON_THROW_ON_ERROR, 512);
+ $body = json_encode($json, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error($e->getMessage());
Log::error('Could not parse JSON.');
diff --git a/app/Models/Account.php b/app/Models/Account.php
index eecbd71487..d52052a22a 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -26,6 +26,7 @@ use Carbon\Carbon;
use Eloquent;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
+use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -40,34 +41,34 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*
* @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $user_id
- * @property int $account_type_id
- * @property string $name
- * @property string|null $virtual_balance
- * @property string|null $iban
- * @property bool $active
- * @property bool $encrypted
- * @property int $order
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\AccountMeta[] $accountMeta
- * @property-read int|null $account_meta_count
- * @property \FireflyIII\Models\AccountType $accountType
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments
- * @property-read int|null $attachments_count
- * @property-read string $account_number
- * @property-read string $edit_name
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Location[] $locations
- * @property-read int|null $locations_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\ObjectGroup[] $objectGroups
- * @property-read int|null $object_groups_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks
- * @property-read int|null $piggy_banks_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions
- * @property-read int|null $transactions_count
- * @property-read User $user
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property int $user_id
+ * @property int $account_type_id
+ * @property string $name
+ * @property string|null $virtual_balance
+ * @property string|null $iban
+ * @property bool $active
+ * @property bool $encrypted
+ * @property int $order
+ * @property-read Collection|AccountMeta[] $accountMeta
+ * @property-read int|null $account_meta_count
+ * @property AccountType $accountType
+ * @property-read Collection|Attachment[] $attachments
+ * @property-read int|null $attachments_count
+ * @property-read string $account_number
+ * @property-read string $edit_name
+ * @property-read Collection|Location[] $locations
+ * @property-read int|null $locations_count
+ * @property-read Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read Collection|ObjectGroup[] $objectGroups
+ * @property-read int|null $object_groups_count
+ * @property-read Collection|PiggyBank[] $piggyBanks
+ * @property-read int|null $piggy_banks_count
+ * @property-read Collection|Transaction[] $transactions
+ * @property-read int|null $transactions_count
+ * @property-read User $user
* @method static EloquentBuilder|Account accountTypeIn($types)
* @method static EloquentBuilder|Account newModelQuery()
* @method static EloquentBuilder|Account newQuery()
diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php
index dd5e0ee9a5..a8e30bb54e 100644
--- a/app/Models/AccountMeta.php
+++ b/app/Models/AccountMeta.php
@@ -31,13 +31,13 @@ use Illuminate\Support\Carbon;
/**
* Class AccountMeta
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property int $account_id
- * @property string $name
- * @property mixed $data
- * @property-read \FireflyIII\Models\Account $account
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property int $account_id
+ * @property string $name
+ * @property mixed $data
+ * @property-read Account $account
* @method static Builder|AccountMeta newModelQuery()
* @method static Builder|AccountMeta newQuery()
* @method static Builder|AccountMeta query()
@@ -78,8 +78,9 @@ class AccountMeta extends Model
/**
* @param mixed $value
*
- * @codeCoverageIgnore
* @return mixed
+ * @throws \JsonException
+ * @codeCoverageIgnore
*/
public function getDataAttribute($value)
{
diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php
index 3b6018eec3..11d821fb8c 100644
--- a/app/Models/AccountType.php
+++ b/app/Models/AccountType.php
@@ -31,12 +31,12 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\AccountType
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property string $type
- * @property-read Collection|\FireflyIII\Models\Account[] $accounts
- * @property-read int|null $accounts_count
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property string $type
+ * @property-read Collection|Account[] $accounts
+ * @property-read int|null $accounts_count
* @method static Builder|AccountType newModelQuery()
* @method static Builder|AccountType newQuery()
* @method static Builder|AccountType query()
diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php
index ba68970d71..a75c612e88 100644
--- a/app/Models/Attachment.php
+++ b/app/Models/Attachment.php
@@ -31,31 +31,32 @@ use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
+use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\Attachment
*
* @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
* @property int $user_id
* @property int $attachable_id
- * @property string $attachable_type
- * @property bool $file_exists
- * @property string $md5
- * @property string $filename
- * @property string|null $title
- * @property string|null $description
- * @property string $mime
- * @property int $size
- * @property bool $uploaded
- * @property string $notes_text
- * @property-read Model|\Eloquent $attachable
- * @property Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read User $user
+ * @property string $attachable_type
+ * @property bool $file_exists
+ * @property string $md5
+ * @property string $filename
+ * @property string|null $title
+ * @property string|null $description
+ * @property string $mime
+ * @property int $size
+ * @property bool $uploaded
+ * @property string $notes_text
+ * @property-read Model|Eloquent $attachable
+ * @property Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newQuery()
* @method static Builder|Attachment onlyTrashed()
diff --git a/app/Models/AutoBudget.php b/app/Models/AutoBudget.php
index 11bcafcf1b..b7ef5bcbe8 100644
--- a/app/Models/AutoBudget.php
+++ b/app/Models/AutoBudget.php
@@ -34,17 +34,17 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\AutoBudget
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $budget_id
- * @property int $transaction_currency_id
- * @property int $auto_budget_type
- * @property string $amount
- * @property string $period
- * @property-read \FireflyIII\Models\Budget $budget
- * @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $budget_id
+ * @property int $transaction_currency_id
+ * @property int $auto_budget_type
+ * @property string $amount
+ * @property string $period
+ * @property-read Budget $budget
+ * @property-read TransactionCurrency $transactionCurrency
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery()
* @method static Builder|AutoBudget onlyTrashed()
diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php
index ac1f65ecab..e982f99167 100644
--- a/app/Models/AvailableBudget.php
+++ b/app/Models/AvailableBudget.php
@@ -34,17 +34,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\AvailableBudget
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $user_id
- * @property int $transaction_currency_id
- * @property string $amount
- * @property \Illuminate\Support\Carbon $start_date
- * @property \Illuminate\Support\Carbon $end_date
- * @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency
- * @property-read User $user
+ * @property int $user_id
+ * @property int $transaction_currency_id
+ * @property string $amount
+ * @property \Illuminate\Support\Carbon $start_date
+ * @property \Illuminate\Support\Carbon $end_date
+ * @property-read TransactionCurrency $transactionCurrency
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery()
* @method static Builder|AvailableBudget onlyTrashed()
diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php
index be3c853dbd..5754b544fc 100644
--- a/app/Models/BudgetLimit.php
+++ b/app/Models/BudgetLimit.php
@@ -35,16 +35,16 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $budget_id
- * @property int|null $transaction_currency_id
- * @property \Illuminate\Support\Carbon $start_date
+ * @property int $budget_id
+ * @property int|null $transaction_currency_id
+ * @property \Illuminate\Support\Carbon $start_date
* @property \Illuminate\Support\Carbon|null $end_date
- * @property string $amount
- * @property string $spent
- * @property string|null $period
- * @property int $generated
- * @property-read \FireflyIII\Models\Budget $budget
- * @property-read \FireflyIII\Models\TransactionCurrency|null $transactionCurrency
+ * @property string $amount
+ * @property string $spent
+ * @property string|null $period
+ * @property int $generated
+ * @property-read Budget $budget
+ * @property-read TransactionCurrency|null $transactionCurrency
* @method static Builder|BudgetLimit newModelQuery()
* @method static Builder|BudgetLimit newQuery()
* @method static Builder|BudgetLimit query()
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 68ab640827..5cb8b8aca8 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -38,23 +38,23 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\Category
*
- * @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $user_id
- * @property string $name
- * @property Carbon $lastActivity
- * @property bool $encrypted
- * @property-read Collection|\FireflyIII\Models\Attachment[] $attachments
- * @property-read int|null $attachments_count
- * @property-read Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals
- * @property-read int|null $transaction_journals_count
- * @property-read Collection|\FireflyIII\Models\Transaction[] $transactions
- * @property-read int|null $transactions_count
- * @property-read User $user
+ * @property int $id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property int $user_id
+ * @property string $name
+ * @property Carbon $lastActivity
+ * @property bool $encrypted
+ * @property-read Collection|Attachment[] $attachments
+ * @property-read int|null $attachments_count
+ * @property-read Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read Collection|TransactionJournal[] $transactionJournals
+ * @property-read int|null $transaction_journals_count
+ * @property-read Collection|Transaction[] $transactions
+ * @property-read int|null $transactions_count
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
* @method static Builder|Category onlyTrashed()
diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php
index 0f9363b5f8..dcccc1ba76 100644
--- a/app/Models/CurrencyExchangeRate.php
+++ b/app/Models/CurrencyExchangeRate.php
@@ -32,19 +32,19 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* FireflyIII\Models\CurrencyExchangeRate
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property string|null $deleted_at
- * @property int $user_id
- * @property int $from_currency_id
- * @property int $to_currency_id
- * @property \Illuminate\Support\Carbon $date
- * @property string $rate
- * @property string|null $user_rate
- * @property-read \FireflyIII\Models\TransactionCurrency $fromCurrency
- * @property-read \FireflyIII\Models\TransactionCurrency $toCurrency
- * @property-read User $user
+ * @property string|null $deleted_at
+ * @property int $user_id
+ * @property int $from_currency_id
+ * @property int $to_currency_id
+ * @property \Illuminate\Support\Carbon $date
+ * @property string $rate
+ * @property string|null $user_rate
+ * @property-read TransactionCurrency $fromCurrency
+ * @property-read TransactionCurrency $toCurrency
+ * @property-read User $user
* @method static Builder|CurrencyExchangeRate newModelQuery()
* @method static Builder|CurrencyExchangeRate newQuery()
* @method static Builder|CurrencyExchangeRate query()
diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php
index d4ca05aa2a..970e8549c2 100644
--- a/app/Models/LinkType.php
+++ b/app/Models/LinkType.php
@@ -33,17 +33,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\LinkType
*
- * @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property string $name
- * @property string $outward
- * @property string $inward
- * @property int $journalCount
- * @property bool $editable
- * @property-read Collection|\FireflyIII\Models\TransactionJournalLink[] $transactionJournalLinks
- * @property-read int|null $transaction_journal_links_count
+ * @property int $id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property string $name
+ * @property string $outward
+ * @property string $inward
+ * @property int $journalCount
+ * @property bool $editable
+ * @property-read Collection|TransactionJournalLink[] $transactionJournalLinks
+ * @property-read int|null $transaction_journal_links_count
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newQuery()
* @method static Builder|LinkType onlyTrashed()
diff --git a/app/Models/Location.php b/app/Models/Location.php
index c8846cf06e..3afecf48e1 100644
--- a/app/Models/Location.php
+++ b/app/Models/Location.php
@@ -33,18 +33,18 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\Location
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $locatable_id
- * @property string $locatable_type
- * @property float|null $latitude
- * @property float|null $longitude
- * @property int|null $zoom_level
- * @property-read Collection|\FireflyIII\Models\Account[] $accounts
- * @property-read int|null $accounts_count
- * @property-read Model|\Eloquent $locatable
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $locatable_id
+ * @property string $locatable_type
+ * @property float|null $latitude
+ * @property float|null $longitude
+ * @property int|null $zoom_level
+ * @property-read Collection|Account[] $accounts
+ * @property-read int|null $accounts_count
+ * @property-read Model|Eloquent $locatable
* @method static Builder|Location newModelQuery()
* @method static Builder|Location newQuery()
* @method static Builder|Location query()
diff --git a/app/Models/ObjectGroup.php b/app/Models/ObjectGroup.php
index 0ec8c58207..f107c19f93 100644
--- a/app/Models/ObjectGroup.php
+++ b/app/Models/ObjectGroup.php
@@ -23,38 +23,43 @@
declare(strict_types=1);
namespace FireflyIII\Models;
+use Eloquent;
use FireflyIII\User;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
+use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\ObjectGroup
*
- * @property int $id
- * @property int $user_id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property string $title
- * @property int $order
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[] $accounts
- * @property-read int|null $accounts_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[] $bills
- * @property-read int|null $bills_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks
- * @property-read int|null $piggy_banks_count
- * @property-read User $user
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup query()
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereOrder($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereTitle($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereUserId($value)
- * @mixin \Eloquent
+ * @property int $id
+ * @property int $user_id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property string $title
+ * @property int $order
+ * @property-read Collection|Account[] $accounts
+ * @property-read int|null $accounts_count
+ * @property-read Collection|Bill[] $bills
+ * @property-read int|null $bills_count
+ * @property-read Collection|PiggyBank[] $piggyBanks
+ * @property-read int|null $piggy_banks_count
+ * @property-read User $user
+ * @method static Builder|ObjectGroup newModelQuery()
+ * @method static Builder|ObjectGroup newQuery()
+ * @method static Builder|ObjectGroup query()
+ * @method static Builder|ObjectGroup whereCreatedAt($value)
+ * @method static Builder|ObjectGroup whereDeletedAt($value)
+ * @method static Builder|ObjectGroup whereId($value)
+ * @method static Builder|ObjectGroup whereOrder($value)
+ * @method static Builder|ObjectGroup whereTitle($value)
+ * @method static Builder|ObjectGroup whereUpdatedAt($value)
+ * @method static Builder|ObjectGroup whereUserId($value)
+ * @mixin Eloquent
*/
class ObjectGroup extends Model
{
@@ -74,7 +79,7 @@ class ObjectGroup extends Model
];
/**
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
+ * @return MorphToMany
*/
public function piggyBanks()
{
@@ -82,7 +87,7 @@ class ObjectGroup extends Model
}
/**
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
+ * @return MorphToMany
*/
public function bills()
{
@@ -90,7 +95,7 @@ class ObjectGroup extends Model
}
/**
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
+ * @return MorphToMany
*/
public function accounts()
{
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 2525948f81..1e92fa0bb7 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -37,27 +37,27 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*
* @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $account_id
- * @property string $name
- * @property string $targetamount
- * @property \Illuminate\Support\Carbon|null $startdate
- * @property \Illuminate\Support\Carbon|null $targetdate
- * @property int $order
- * @property bool $active
- * @property bool $encrypted
- * @property-read \FireflyIII\Models\Account $account
- * @property-read Collection|\FireflyIII\Models\Attachment[] $attachments
- * @property-read int|null $attachments_count
- * @property-read Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read Collection|\FireflyIII\Models\ObjectGroup[] $objectGroups
- * @property-read int|null $object_groups_count
- * @property-read Collection|\FireflyIII\Models\PiggyBankEvent[] $piggyBankEvents
- * @property-read int|null $piggy_bank_events_count
- * @property-read Collection|\FireflyIII\Models\PiggyBankRepetition[] $piggyBankRepetitions
- * @property-read int|null $piggy_bank_repetitions_count
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property int $account_id
+ * @property string $name
+ * @property string $targetamount
+ * @property \Illuminate\Support\Carbon|null $startdate
+ * @property \Illuminate\Support\Carbon|null $targetdate
+ * @property int $order
+ * @property bool $active
+ * @property bool $encrypted
+ * @property-read Account $account
+ * @property-read Collection|Attachment[] $attachments
+ * @property-read int|null $attachments_count
+ * @property-read Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read Collection|ObjectGroup[] $objectGroups
+ * @property-read int|null $object_groups_count
+ * @property-read Collection|PiggyBankEvent[] $piggyBankEvents
+ * @property-read int|null $piggy_bank_events_count
+ * @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
+ * @property-read int|null $piggy_bank_repetitions_count
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newQuery()
* @method static Builder|PiggyBank onlyTrashed()
diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php
index 1990360bb0..85c96c5641 100644
--- a/app/Models/PiggyBankEvent.php
+++ b/app/Models/PiggyBankEvent.php
@@ -30,15 +30,15 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* FireflyIII\Models\PiggyBankEvent
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $piggy_bank_id
- * @property int|null $transaction_journal_id
- * @property \Illuminate\Support\Carbon $date
- * @property string $amount
- * @property \FireflyIII\Models\PiggyBank $piggyBank
- * @property-read \FireflyIII\Models\TransactionJournal|null $transactionJournal
+ * @property int $piggy_bank_id
+ * @property int|null $transaction_journal_id
+ * @property \Illuminate\Support\Carbon $date
+ * @property string $amount
+ * @property PiggyBank $piggyBank
+ * @property-read TransactionJournal|null $transactionJournal
* @method static Builder|PiggyBankEvent newModelQuery()
* @method static Builder|PiggyBankEvent newQuery()
* @method static Builder|PiggyBankEvent query()
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index f9214107ac..de87bac9c1 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -31,19 +31,19 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* FireflyIII\Models\PiggyBankRepetition
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $piggy_bank_id
+ * @property int $piggy_bank_id
* @property \Illuminate\Support\Carbon|null $startdate
* @property \Illuminate\Support\Carbon|null $targetdate
- * @property string $currentamount
- * @property-read \FireflyIII\Models\PiggyBank $piggyBank
+ * @property string $currentamount
+ * @property-read PiggyBank $piggyBank
* @method static EloquentBuilder|PiggyBankRepetition newModelQuery()
* @method static EloquentBuilder|PiggyBankRepetition newQuery()
- * @method static EloquentBuilder|PiggyBankRepetition onDates(\Carbon\Carbon $start, \Carbon\Carbon $target)
+ * @method static EloquentBuilder|PiggyBankRepetition onDates(Carbon $start, Carbon $target)
* @method static EloquentBuilder|PiggyBankRepetition query()
- * @method static EloquentBuilder|PiggyBankRepetition relevantOnDate(\Carbon\Carbon $date)
+ * @method static EloquentBuilder|PiggyBankRepetition relevantOnDate(Carbon $date)
* @method static EloquentBuilder|PiggyBankRepetition whereCreatedAt($value)
* @method static EloquentBuilder|PiggyBankRepetition whereCurrentamount($value)
* @method static EloquentBuilder|PiggyBankRepetition whereId($value)
@@ -99,7 +99,7 @@ class PiggyBankRepetition extends Model
* @param EloquentBuilder $query
* @param Carbon $date
*
- * @return mixed
+ * @return EloquentBuilder
*/
public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date)
{
diff --git a/app/Models/Recurrence.php b/app/Models/Recurrence.php
index 5c77df9618..b62e3f758c 100644
--- a/app/Models/Recurrence.php
+++ b/app/Models/Recurrence.php
@@ -41,29 +41,29 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
- * @property int $user_id
- * @property int $transaction_type_id
- * @property string $title
- * @property string $description
- * @property Carbon $first_date
- * @property Carbon|null $repeat_until
- * @property Carbon|null $latest_date
- * @property int $repetitions
- * @property bool $apply_rules
- * @property bool $active
- * @property-read Collection|\FireflyIII\Models\Attachment[] $attachments
- * @property-read int|null $attachments_count
- * @property-read Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read Collection|\FireflyIII\Models\RecurrenceMeta[] $recurrenceMeta
- * @property-read int|null $recurrence_meta_count
- * @property-read Collection|\FireflyIII\Models\RecurrenceRepetition[] $recurrenceRepetitions
- * @property-read int|null $recurrence_repetitions_count
- * @property-read Collection|\FireflyIII\Models\RecurrenceTransaction[] $recurrenceTransactions
- * @property-read int|null $recurrence_transactions_count
- * @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency
- * @property-read \FireflyIII\Models\TransactionType $transactionType
- * @property-read User $user
+ * @property int $user_id
+ * @property int $transaction_type_id
+ * @property string $title
+ * @property string $description
+ * @property Carbon $first_date
+ * @property Carbon|null $repeat_until
+ * @property Carbon|null $latest_date
+ * @property int $repetitions
+ * @property bool $apply_rules
+ * @property bool $active
+ * @property-read Collection|Attachment[] $attachments
+ * @property-read int|null $attachments_count
+ * @property-read Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read Collection|RecurrenceMeta[] $recurrenceMeta
+ * @property-read int|null $recurrence_meta_count
+ * @property-read Collection|RecurrenceRepetition[] $recurrenceRepetitions
+ * @property-read int|null $recurrence_repetitions_count
+ * @property-read Collection|RecurrenceTransaction[] $recurrenceTransactions
+ * @property-read int|null $recurrence_transactions_count
+ * @property-read TransactionCurrency $transactionCurrency
+ * @property-read TransactionType $transactionType
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newQuery()
* @method static Builder|Recurrence onlyTrashed()
diff --git a/app/Models/RecurrenceMeta.php b/app/Models/RecurrenceMeta.php
index 60a2cf843b..63e0727d93 100644
--- a/app/Models/RecurrenceMeta.php
+++ b/app/Models/RecurrenceMeta.php
@@ -32,14 +32,14 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\RecurrenceMeta
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $recurrence_id
- * @property string $name
- * @property mixed $value
- * @property-read \FireflyIII\Models\Recurrence $recurrence
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $recurrence_id
+ * @property string $name
+ * @property mixed $value
+ * @property-read Recurrence $recurrence
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newQuery()
* @method static Builder|RecurrenceMeta onlyTrashed()
diff --git a/app/Models/RecurrenceRepetition.php b/app/Models/RecurrenceRepetition.php
index b5aac5c1be..f029de6b8d 100644
--- a/app/Models/RecurrenceRepetition.php
+++ b/app/Models/RecurrenceRepetition.php
@@ -32,16 +32,16 @@ use Illuminate\Database\Query\Builder;
/**
* FireflyIII\Models\RecurrenceRepetition
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $recurrence_id
- * @property string $repetition_type
- * @property string $repetition_moment
- * @property int $repetition_skip
- * @property int $weekend
- * @property-read \FireflyIII\Models\Recurrence $recurrence
+ * @property int $recurrence_id
+ * @property string $repetition_type
+ * @property string $repetition_moment
+ * @property int $repetition_skip
+ * @property int $weekend
+ * @property-read Recurrence $recurrence
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery()
* @method static Builder|RecurrenceRepetition onlyTrashed()
diff --git a/app/Models/RecurrenceTransaction.php b/app/Models/RecurrenceTransaction.php
index 832f36c90c..bd27e8713d 100644
--- a/app/Models/RecurrenceTransaction.php
+++ b/app/Models/RecurrenceTransaction.php
@@ -36,23 +36,23 @@ use Illuminate\Support\Collection;
*
* @property int $id
* @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $recurrence_id
- * @property int $transaction_currency_id
- * @property int|null $foreign_currency_id
- * @property int $source_id
- * @property int $destination_id
- * @property string $amount
- * @property string|null $foreign_amount
- * @property string $description
- * @property-read \FireflyIII\Models\Account $destinationAccount
- * @property-read \FireflyIII\Models\TransactionCurrency|null $foreignCurrency
- * @property-read \FireflyIII\Models\Recurrence $recurrence
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\RecurrenceTransactionMeta[] $recurrenceTransactionMeta
- * @property-read int|null $recurrence_transaction_meta_count
- * @property-read \FireflyIII\Models\Account $sourceAccount
- * @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $recurrence_id
+ * @property int $transaction_currency_id
+ * @property int|null $foreign_currency_id
+ * @property int $source_id
+ * @property int $destination_id
+ * @property string $amount
+ * @property string|null $foreign_amount
+ * @property string $description
+ * @property-read Account $destinationAccount
+ * @property-read TransactionCurrency|null $foreignCurrency
+ * @property-read Recurrence $recurrence
+ * @property-read \Illuminate\Database\Eloquent\Collection|RecurrenceTransactionMeta[] $recurrenceTransactionMeta
+ * @property-read int|null $recurrence_transaction_meta_count
+ * @property-read Account $sourceAccount
+ * @property-read TransactionCurrency $transactionCurrency
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery()
* @method static Builder|RecurrenceTransaction onlyTrashed()
@@ -72,9 +72,9 @@ use Illuminate\Support\Collection;
* @method static Builder|RecurrenceTransaction withTrashed()
* @method static Builder|RecurrenceTransaction withoutTrashed()
* @mixin Eloquent
- * @property int|null $transaction_type_id
+ * @property int|null $transaction_type_id
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value)
- * @property-read \FireflyIII\Models\TransactionType|null $transactionType
+ * @property-read TransactionType|null $transactionType
*/
class RecurrenceTransaction extends Model
{
diff --git a/app/Models/RecurrenceTransactionMeta.php b/app/Models/RecurrenceTransactionMeta.php
index f71dee3bf1..d7de97ac91 100644
--- a/app/Models/RecurrenceTransactionMeta.php
+++ b/app/Models/RecurrenceTransactionMeta.php
@@ -32,14 +32,14 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\RecurrenceTransactionMeta
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $rt_id
- * @property string $name
- * @property mixed $value
- * @property-read \FireflyIII\Models\RecurrenceTransaction $recurrenceTransaction
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $rt_id
+ * @property string $name
+ * @property mixed $value
+ * @property-read RecurrenceTransaction $recurrenceTransaction
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newQuery()
* @method static Builder|RecurrenceTransactionMeta onlyTrashed()
diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php
index 6f8d9c48ce..874064b92f 100644
--- a/app/Models/RuleAction.php
+++ b/app/Models/RuleAction.php
@@ -31,16 +31,16 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* FireflyIII\Models\RuleAction
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $rule_id
- * @property string $action_type
- * @property string $action_value
- * @property int $order
- * @property bool $active
- * @property bool $stop_processing
- * @property-read \FireflyIII\Models\Rule $rule
+ * @property int $rule_id
+ * @property string $action_type
+ * @property string $action_value
+ * @property int $order
+ * @property bool $active
+ * @property bool $stop_processing
+ * @property-read Rule $rule
* @method static Builder|RuleAction newModelQuery()
* @method static Builder|RuleAction newQuery()
* @method static Builder|RuleAction query()
diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php
index 3a02993817..36412c08e3 100644
--- a/app/Models/RuleGroup.php
+++ b/app/Models/RuleGroup.php
@@ -35,19 +35,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\RuleGroup
*
- * @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $user_id
- * @property string $title
- * @property string|null $description
- * @property int $order
- * @property bool $active
- * @property bool $stop_processing
- * @property \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Rule[] $rules
- * @property-read int|null $rules_count
- * @property-read User $user
+ * @property int $id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property int $user_id
+ * @property string $title
+ * @property string|null $description
+ * @property int $order
+ * @property bool $active
+ * @property bool $stop_processing
+ * @property \Illuminate\Database\Eloquent\Collection|Rule[] $rules
+ * @property-read int|null $rules_count
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery()
* @method static Builder|RuleGroup onlyTrashed()
diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php
index ccb37d540f..33219e9df1 100644
--- a/app/Models/RuleTrigger.php
+++ b/app/Models/RuleTrigger.php
@@ -31,16 +31,16 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* FireflyIII\Models\RuleTrigger
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $rule_id
- * @property string $trigger_type
- * @property string $trigger_value
- * @property int $order
- * @property bool $active
- * @property bool $stop_processing
- * @property-read \FireflyIII\Models\Rule $rule
+ * @property int $rule_id
+ * @property string $trigger_type
+ * @property string $trigger_value
+ * @property int $order
+ * @property bool $active
+ * @property bool $stop_processing
+ * @property-read Rule $rule
* @method static Builder|RuleTrigger newModelQuery()
* @method static Builder|RuleTrigger newQuery()
* @method static Builder|RuleTrigger query()
diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php
index 96a46a5609..0476b97324 100644
--- a/app/Models/TransactionCurrency.php
+++ b/app/Models/TransactionCurrency.php
@@ -33,21 +33,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionCurrency
*
- * @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property bool $enabled
- * @property string $code
- * @property string $name
- * @property string $symbol
- * @property int $decimal_places
- * @property-read Collection|\FireflyIII\Models\BudgetLimit[] $budgetLimits
- * @property-read int|null $budget_limits_count
- * @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals
- * @property-read int|null $transaction_journals_count
- * @property-read Collection|\FireflyIII\Models\Transaction[] $transactions
- * @property-read int|null $transactions_count
+ * @property int $id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property bool $enabled
+ * @property string $code
+ * @property string $name
+ * @property string $symbol
+ * @property int $decimal_places
+ * @property-read Collection|BudgetLimit[] $budgetLimits
+ * @property-read int|null $budget_limits_count
+ * @property-read Collection|TransactionJournal[] $transactionJournals
+ * @property-read int|null $transaction_journals_count
+ * @property-read Collection|Transaction[] $transactions
+ * @property-read int|null $transactions_count
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newQuery()
* @method static Builder|TransactionCurrency onlyTrashed()
diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.php
index 9fb3210c50..31200938ba 100644
--- a/app/Models/TransactionGroup.php
+++ b/app/Models/TransactionGroup.php
@@ -35,15 +35,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionGroup
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property int $user_id
- * @property string|null $title
- * @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals
- * @property-read int|null $transaction_journals_count
- * @property-read User $user
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $user_id
+ * @property string|null $title
+ * @property-read Collection|TransactionJournal[] $transactionJournals
+ * @property-read int|null $transaction_journals_count
+ * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newQuery()
* @method static Builder|TransactionGroup onlyTrashed()
diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php
index c6eacc0862..3ba5cd69b5 100644
--- a/app/Models/TransactionJournalLink.php
+++ b/app/Models/TransactionJournalLink.php
@@ -34,20 +34,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionJournalLink
*
- * @property int $id
+ * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
- * @property int $link_type_id
- * @property int $source_id
- * @property int $destination_id
- * @property string|null $comment
- * @property-read \FireflyIII\Models\TransactionJournal $destination
- * @property-read \FireflyIII\Models\LinkType $linkType
- * @property-read Collection|\FireflyIII\Models\Note[] $notes
- * @property-read int|null $notes_count
- * @property-read \FireflyIII\Models\TransactionJournal $source
- * @property-read string $inward
- * @property-read string $outward
+ * @property int $link_type_id
+ * @property int $source_id
+ * @property int $destination_id
+ * @property string|null $comment
+ * @property-read TransactionJournal $destination
+ * @property-read LinkType $linkType
+ * @property-read Collection|Note[] $notes
+ * @property-read int|null $notes_count
+ * @property-read TransactionJournal $source
+ * @property-read string $inward
+ * @property-read string $outward
* @method static Builder|TransactionJournalLink newModelQuery()
* @method static Builder|TransactionJournalLink newQuery()
* @method static Builder|TransactionJournalLink query()
diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php
index 88e1da9134..f0c0ee3125 100644
--- a/app/Models/TransactionJournalMeta.php
+++ b/app/Models/TransactionJournalMeta.php
@@ -32,15 +32,15 @@ use Illuminate\Support\Carbon;
/**
* FireflyIII\Models\TransactionJournalMeta
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property int $transaction_journal_id
- * @property string $name
- * @property mixed $data
- * @property string $hash
- * @property Carbon|null $deleted_at
- * @property-read \FireflyIII\Models\TransactionJournal $transactionJournal
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property int $transaction_journal_id
+ * @property string $name
+ * @property mixed $data
+ * @property string $hash
+ * @property Carbon|null $deleted_at
+ * @property-read TransactionJournal $transactionJournal
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newQuery()
* @method static Builder|TransactionJournalMeta onlyTrashed()
diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php
index 28ac4a6911..6d37d908be 100644
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@ -34,13 +34,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionType
*
- * @property int $id
- * @property Carbon|null $created_at
- * @property Carbon|null $updated_at
- * @property Carbon|null $deleted_at
- * @property string $type
- * @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals
- * @property-read int|null $transaction_journals_count
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property string $type
+ * @property-read Collection|TransactionJournal[] $transactionJournals
+ * @property-read int|null $transaction_journals_count
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newQuery()
* @method static Builder|TransactionType onlyTrashed()
diff --git a/app/Models/Webhook.php b/app/Models/Webhook.php
index 43fc74d58c..368d0f28e9 100644
--- a/app/Models/Webhook.php
+++ b/app/Models/Webhook.php
@@ -22,50 +22,54 @@
declare(strict_types=1);
namespace FireflyIII\Models;
+use Eloquent;
use FireflyIII\User;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\Webhook
*
* @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property int $user_id
- * @property bool $active
- * @property int $trigger
- * @property int $response
- * @property int $delivery
- * @property string $url
- * @property-read User $user
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\WebhookMessage[] $webhookMessages
- * @property-read int|null $webhook_messages_count
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook newQuery()
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Carbon|null $deleted_at
+ * @property int $user_id
+ * @property bool $active
+ * @property int $trigger
+ * @property int $response
+ * @property int $delivery
+ * @property string $url
+ * @property-read User $user
+ * @property-read Collection|WebhookMessage[] $webhookMessages
+ * @property-read int|null $webhook_messages_count
+ * @method static Builder|Webhook newModelQuery()
+ * @method static Builder|Webhook newQuery()
* @method static \Illuminate\Database\Query\Builder|Webhook onlyTrashed()
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook query()
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereActive($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereDelivery($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereResponse($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereTrigger($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUrl($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUserId($value)
+ * @method static Builder|Webhook query()
+ * @method static Builder|Webhook whereActive($value)
+ * @method static Builder|Webhook whereCreatedAt($value)
+ * @method static Builder|Webhook whereDeletedAt($value)
+ * @method static Builder|Webhook whereDelivery($value)
+ * @method static Builder|Webhook whereId($value)
+ * @method static Builder|Webhook whereResponse($value)
+ * @method static Builder|Webhook whereTrigger($value)
+ * @method static Builder|Webhook whereUpdatedAt($value)
+ * @method static Builder|Webhook whereUrl($value)
+ * @method static Builder|Webhook whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|Webhook withTrashed()
* @method static \Illuminate\Database\Query\Builder|Webhook withoutTrashed()
- * @mixin \Eloquent
+ * @mixin Eloquent
* @property string $title
* @property string $secret
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereSecret($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Webhook whereTitle($value)
+ * @method static Builder|Webhook whereSecret($value)
+ * @method static Builder|Webhook whereTitle($value)
*/
class Webhook extends Model
{
diff --git a/app/Models/WebhookAttempt.php b/app/Models/WebhookAttempt.php
index 346b613749..7b0316a9f2 100644
--- a/app/Models/WebhookAttempt.php
+++ b/app/Models/WebhookAttempt.php
@@ -23,24 +23,27 @@ declare(strict_types=1);
namespace FireflyIII\Models;
+use Eloquent;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Query\Builder;
+use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class WebhookAttempt
*
- * @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property string|null $deleted_at
- * @property int $webhook_message_id
- * @property int $status_code
- * @property string|null $logs
- * @property string|null $response
- * @property-read \FireflyIII\Models\WebhookMessage $webhookMessage
+ * @property int $id
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property string|null $deleted_at
+ * @property int $webhook_message_id
+ * @property int $status_code
+ * @property string|null $logs
+ * @property string|null $response
+ * @property-read WebhookMessage $webhookMessage
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt query()
@@ -52,10 +55,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereStatusCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereWebhookMessageId($value)
- * @mixin \Eloquent
- * @method static \Illuminate\Database\Query\Builder|WebhookAttempt onlyTrashed()
- * @method static \Illuminate\Database\Query\Builder|WebhookAttempt withTrashed()
- * @method static \Illuminate\Database\Query\Builder|WebhookAttempt withoutTrashed()
+ * @mixin Eloquent
+ * @method static Builder|WebhookAttempt onlyTrashed()
+ * @method static Builder|WebhookAttempt withTrashed()
+ * @method static Builder|WebhookAttempt withoutTrashed()
*/
class WebhookAttempt extends Model
{
diff --git a/app/Models/WebhookMessage.php b/app/Models/WebhookMessage.php
index 42d20744bb..6de37badd0 100644
--- a/app/Models/WebhookMessage.php
+++ b/app/Models/WebhookMessage.php
@@ -23,44 +23,48 @@ declare(strict_types=1);
namespace FireflyIII\Models;
+use Eloquent;
use FireflyIII\User;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\WebhookMessage
*
* @property int $id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property string|null $deleted_at
- * @property int $webhook_id
- * @property bool $sent
- * @property bool $errored
- * @property int $attempts
- * @property string $uuid
- * @property array $message
- * @property array|null $logs
- * @property-read \FireflyIII\Models\Webhook $webhook
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage query()
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereAttempts($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereErrored($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereLogs($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereMessage($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereSent($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereUuid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereWebhookId($value)
- * @mixin \Eloquent
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\WebhookAttempt[] $webhookAttempts
- * @property-read int|null $webhook_attempts_count
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property string|null $deleted_at
+ * @property int $webhook_id
+ * @property bool $sent
+ * @property bool $errored
+ * @property int $attempts
+ * @property string $uuid
+ * @property array $message
+ * @property array|null $logs
+ * @property-read Webhook $webhook
+ * @method static Builder|WebhookMessage newModelQuery()
+ * @method static Builder|WebhookMessage newQuery()
+ * @method static Builder|WebhookMessage query()
+ * @method static Builder|WebhookMessage whereAttempts($value)
+ * @method static Builder|WebhookMessage whereCreatedAt($value)
+ * @method static Builder|WebhookMessage whereDeletedAt($value)
+ * @method static Builder|WebhookMessage whereErrored($value)
+ * @method static Builder|WebhookMessage whereId($value)
+ * @method static Builder|WebhookMessage whereLogs($value)
+ * @method static Builder|WebhookMessage whereMessage($value)
+ * @method static Builder|WebhookMessage whereSent($value)
+ * @method static Builder|WebhookMessage whereUpdatedAt($value)
+ * @method static Builder|WebhookMessage whereUuid($value)
+ * @method static Builder|WebhookMessage whereWebhookId($value)
+ * @mixin Eloquent
+ * @property-read Collection|WebhookAttempt[] $webhookAttempts
+ * @property-read int|null $webhook_attempts_count
*/
class WebhookMessage extends Model
{
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index abd00598a3..bfc4708fbc 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -172,7 +172,7 @@ class EventServiceProvider extends ServiceProvider
$ipAddress = Request::ip();
// see if user has alternative email address:
- $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
+ $pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index ed0c0be8a0..4dada19f82 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -417,7 +417,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @param Account $account
*
- * @return string
+ * @return string|null
*/
public function getOpeningBalanceAmount(Account $account): ?string
{
@@ -748,7 +748,6 @@ class AccountRepository implements AccountRepositoryInterface
* @param array $data
*
* @return Account
- * @throws FireflyException
*/
public function update(Account $account, array $data): Account
{
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index ee570d8e7a..5e1ba522ab 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -195,7 +195,7 @@ interface AccountRepositoryInterface
*
* @param Account $account
*
- * @return string
+ * @return string|null
*/
public function getOpeningBalanceAmount(Account $account): ?string;
diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php
index 0d1b363425..d5d4627c3c 100644
--- a/app/Repositories/Attachment/AttachmentRepository.php
+++ b/app/Repositories/Attachment/AttachmentRepository.php
@@ -123,7 +123,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
*
* @param Attachment $attachment
*
- * @return string
+ * @return string|null
*/
public function getNoteText(Attachment $attachment): ?string
{
@@ -167,6 +167,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
* @param array $data
*
* @return Attachment
+ * @throws Exception
*/
public function update(Attachment $attachment, array $data): Attachment
{
diff --git a/app/Repositories/Attachment/AttachmentRepositoryInterface.php b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
index 86ab969717..4a8e3bfbcb 100644
--- a/app/Repositories/Attachment/AttachmentRepositoryInterface.php
+++ b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
@@ -64,7 +64,7 @@ interface AttachmentRepositoryInterface
*
* @param Attachment $attachment
*
- * @return string
+ * @return string|null
*/
public function getNoteText(Attachment $attachment): ?string;
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index 6e697e3112..bb782841f2 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -99,7 +99,7 @@ class BillRepository implements BillRepositoryInterface
*
* @param int $billId
*
- * @return Bill
+ * @return Bill|null
*/
public function find(int $billId): ?Bill
{
@@ -142,7 +142,7 @@ class BillRepository implements BillRepositoryInterface
*
* @param string $name
*
- * @return Bill
+ * @return Bill|null
*/
public function findByName(string $name): ?Bill
{
diff --git a/app/Repositories/Budget/BudgetLimitRepository.php b/app/Repositories/Budget/BudgetLimitRepository.php
index 1474ec94f5..332d734f2a 100644
--- a/app/Repositories/Budget/BudgetLimitRepository.php
+++ b/app/Repositories/Budget/BudgetLimitRepository.php
@@ -146,11 +146,10 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
}
/**
- * @param Carbon $start
- * @param Carbon $end
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
- *
*/
public function getAllBudgetLimits(Carbon $start = null, Carbon $end = null): Collection
{
@@ -216,8 +215,8 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
/**
* @param TransactionCurrency $currency
- * @param Carbon $start
- * @param Carbon $end
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
*/
@@ -231,12 +230,11 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
}
/**
- * @param Budget $budget
- * @param Carbon $start
- * @param Carbon $end
+ * @param Budget $budget
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
- *
*/
public function getBudgetLimits(Budget $budget, Carbon $start = null, Carbon $end = null): Collection
{
diff --git a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php b/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
index 686519d990..edafbf4a52 100644
--- a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
@@ -74,8 +74,8 @@ interface BudgetLimitRepositoryInterface
/**
* TODO this method is not multi-currency aware.
*
- * @param Carbon $start
- * @param Carbon $end
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
*/
@@ -83,17 +83,17 @@ interface BudgetLimitRepositoryInterface
/**
* @param TransactionCurrency $currency
- * @param Carbon $start
- * @param Carbon $end
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
*/
public function getAllBudgetLimitsByCurrency(TransactionCurrency $currency, Carbon $start = null, Carbon $end = null): Collection;
/**
- * @param Budget $budget
- * @param Carbon $start
- * @param Carbon $end
+ * @param Budget $budget
+ * @param Carbon|null $start
+ * @param Carbon|null $end
*
* @return Collection
*/
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index 416e59dff9..3bb179cef0 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -160,7 +160,7 @@ class BudgetRepository implements BudgetRepositoryInterface
/**
* Find a budget or return NULL
*
- * @param int $budgetId |null
+ * @param int|null $budgetId |null
*
* @return Budget|null
*/
@@ -179,8 +179,7 @@ class BudgetRepository implements BudgetRepositoryInterface
*
* @param Budget $budget
*
- * @return Carbon
- *
+ * @return Carbon|null
*/
public function firstUseDate(Budget $budget): ?Carbon
{
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index 301697faf9..933a10bd2c 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -88,7 +88,7 @@ interface BudgetRepositoryInterface
*
* @param Budget $budget
*
- * @return Carbon
+ * @return Carbon|null
*/
public function firstUseDate(Budget $budget): ?Carbon;
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index 235e97606d..b10614f461 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -105,6 +105,7 @@ class CategoryRepository implements CategoryRepositoryInterface
* @param string|null $categoryName
*
* @return Category|null
+ * @throws FireflyException
*/
public function findCategory(?int $categoryId, ?string $categoryName): ?Category
{
@@ -228,7 +229,7 @@ class CategoryRepository implements CategoryRepositoryInterface
* @param Collection $accounts
*
* @return Carbon|null
- *
+ * @throws Exception
*/
public function lastUseDate(Category $category, Collection $accounts): ?Carbon
{
diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php
index 7a25c17426..74e401bbc6 100644
--- a/app/Repositories/Category/CategoryRepositoryInterface.php
+++ b/app/Repositories/Category/CategoryRepositoryInterface.php
@@ -51,7 +51,7 @@ interface CategoryRepositoryInterface
*
* @param string $name
*
- * @return Category
+ * @return Category|null
*/
public function findByName(string $name): ?Category;
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index c2249e6bbe..65292a9c65 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -78,6 +78,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
* @param TransactionCurrency $currency
*
* @return string|null
+ * @throws FireflyException
*/
public function currencyInUseAt(TransactionCurrency $currency): ?string
{
@@ -244,7 +245,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*
* @param string $currencyName
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findByName(string $currencyName): ?TransactionCurrency
{
@@ -257,7 +258,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*
* @param string $currencyName
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
* @deprecated
*/
public function findByNameNull(string $currencyName): ?TransactionCurrency
@@ -270,7 +271,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*
* @param string $currencySymbol
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findBySymbol(string $currencySymbol): ?TransactionCurrency
{
@@ -283,7 +284,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*
* @param string $currencySymbol
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
* @deprecated
*/
public function findBySymbolNull(string $currencySymbol): ?TransactionCurrency
diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php
index fc9ddbfd67..edf4c3a207 100644
--- a/app/Repositories/Currency/CurrencyRepositoryInterface.php
+++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php
@@ -112,7 +112,7 @@ interface CurrencyRepositoryInterface
*
* @param string $currencyName
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findByName(string $currencyName): ?TransactionCurrency;
@@ -121,7 +121,7 @@ interface CurrencyRepositoryInterface
*
* @param string $currencyName
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findByNameNull(string $currencyName): ?TransactionCurrency;
@@ -130,7 +130,7 @@ interface CurrencyRepositoryInterface
*
* @param string $currencySymbol
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findBySymbol(string $currencySymbol): ?TransactionCurrency;
@@ -139,7 +139,7 @@ interface CurrencyRepositoryInterface
*
* @param string $currencySymbol
*
- * @return TransactionCurrency
+ * @return TransactionCurrency|null
*/
public function findBySymbolNull(string $currencySymbol): ?TransactionCurrency;
diff --git a/app/Repositories/Journal/JournalAPIRepository.php b/app/Repositories/Journal/JournalAPIRepository.php
index f50d7821fe..ea86e6f1e2 100644
--- a/app/Repositories/Journal/JournalAPIRepository.php
+++ b/app/Repositories/Journal/JournalAPIRepository.php
@@ -97,7 +97,6 @@ class JournalAPIRepository implements JournalAPIRepositoryInterface
*/
public function getPiggyBankEvents(TransactionJournal $journal): Collection
{
- /** @var Collection $events */
$events = $journal->piggyBankEvents()->get();
$events->each(
function (PiggyBankEvent $event) {
diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php
index 7ab2a41aa5..da448f6749 100644
--- a/app/Repositories/LinkType/LinkTypeRepository.php
+++ b/app/Repositories/LinkType/LinkTypeRepository.php
@@ -53,11 +53,10 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
}
/**
- * @param LinkType $linkType
- * @param LinkType $moveTo
+ * @param LinkType $linkType
+ * @param LinkType|null $moveTo
*
* @return bool
- * @throws Exception
*/
public function destroy(LinkType $linkType, LinkType $moveTo = null): bool
{
@@ -244,7 +243,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
* @param TransactionJournal $outward
*
* @return TransactionJournalLink|null
- *
+ * @throws Exception
*/
public function storeLink(array $information, TransactionJournal $inward, TransactionJournal $outward): ?TransactionJournalLink
{
@@ -331,10 +330,11 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
* @param array $data
*
* @return TransactionJournalLink
+ * @throws Exception
*/
public function updateLink(TransactionJournalLink $journalLink, array $data): TransactionJournalLink
{
- $journalLink->source_id = $data['inward_id'] ? $data['inward_id'] : $journalLink->source_id;
+ $journalLink->source_id = $data['inward_id'] ?: $journalLink->source_id;
$journalLink->destination_id = $data['outward_id'] ? $data['outward_id'] : $journalLink->destination_id;
$journalLink->save();
if (array_key_exists('link_type_name', $data)) {
@@ -346,7 +346,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
$journalLink->refresh();
}
- $journalLink->link_type_id = $data['link_type_id'] ? $data['link_type_id'] : $journalLink->link_type_id;
+ $journalLink->link_type_id = $data['link_type_id'] ?: $journalLink->link_type_id;
$journalLink->save();
if (array_key_exists('notes', $data) && null !== $data['notes']) {
$this->setNoteText($journalLink, $data['notes']);
@@ -386,9 +386,6 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
}
- /**
- * @inheritDoc
- */
public function getLink(TransactionJournal $one, TransactionJournal $two): ?TransactionJournalLink
{
$left = TransactionJournalLink::whereDestinationId($one->id)->whereSourceId($two->id)->first();
diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
index 0a720e02ab..1a798b0ac1 100644
--- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
+++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
@@ -41,8 +41,8 @@ interface LinkTypeRepositoryInterface
public function countJournals(LinkType $linkType): int;
/**
- * @param LinkType $linkType
- * @param LinkType $moveTo
+ * @param LinkType $linkType
+ * @param LinkType|null $moveTo
*
* @return bool
*/
diff --git a/app/Repositories/ObjectGroup/ObjectGroupRepository.php b/app/Repositories/ObjectGroup/ObjectGroupRepository.php
index c6098a7ccc..b86efc0bb4 100644
--- a/app/Repositories/ObjectGroup/ObjectGroupRepository.php
+++ b/app/Repositories/ObjectGroup/ObjectGroupRepository.php
@@ -161,7 +161,7 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface
if ($newOrder > $oldOrder) {
$this->user->objectGroups()->where('object_groups.order', '<=', $newOrder)->where('object_groups.order', '>', $oldOrder)
->where('object_groups.id', '!=', $objectGroup->id)
- ->decrement('object_groups.order', 1);
+ ->decrement('object_groups.order');
$objectGroup->order = $newOrder;
$objectGroup->save();
@@ -169,7 +169,7 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface
if ($newOrder < $oldOrder) {
$this->user->objectGroups()->where('object_groups.order', '>=', $newOrder)->where('object_groups.order', '<', $oldOrder)
->where('object_groups.id', '!=', $objectGroup->id)
- ->increment('object_groups.order', 1);
+ ->increment('object_groups.order');
$objectGroup->order = $newOrder;
$objectGroup->save();
diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php
index 148a0da1db..6d81f3d2d7 100644
--- a/app/Repositories/Recurring/RecurringRepository.php
+++ b/app/Repositories/Recurring/RecurringRepository.php
@@ -290,6 +290,7 @@ class RecurringRepository implements RecurringRepositoryInterface
* @param RecurrenceTransaction $transaction
*
* @return array
+ * @throws \JsonException
*/
public function getTags(RecurrenceTransaction $transaction): array
{
@@ -416,7 +417,6 @@ class RecurringRepository implements RecurringRepositoryInterface
* @param int $count
*
* @return array
- * @throws FireflyException
*/
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array
{
@@ -454,7 +454,7 @@ class RecurringRepository implements RecurringRepositoryInterface
* @param RecurrenceRepetition $repetition
*
* @return string
- *
+ * @throws FireflyException
*/
public function repetitionDescription(RecurrenceRepetition $repetition): string
{
diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php
index dd75f8d930..7a2968b19e 100644
--- a/app/Repositories/Rule/RuleRepository.php
+++ b/app/Repositories/Rule/RuleRepository.php
@@ -327,7 +327,7 @@ class RuleRepository implements RuleRepositoryInterface
->where('rules.order', '<=', $newOrder)
->where('rules.order', '>', $oldOrder)
->where('rules.id', '!=', $rule->id)
- ->decrement('rules.order', 1);
+ ->decrement('rules.order');
$rule->order = $newOrder;
Log::debug(sprintf('Order of rule #%d ("%s") is now %d', $rule->id, $rule->title, $newOrder));
$rule->save();
@@ -340,7 +340,7 @@ class RuleRepository implements RuleRepositoryInterface
->where('rules.order', '>=', $newOrder)
->where('rules.order', '<', $oldOrder)
->where('rules.id', '!=', $rule->id)
- ->increment('rules.order', 1);
+ ->increment('rules.order');
$rule->order = $newOrder;
Log::debug(sprintf('Order of rule #%d ("%s") is now %d', $rule->id, $rule->title, $newOrder));
$rule->save();
@@ -358,6 +358,7 @@ class RuleRepository implements RuleRepositoryInterface
* @param array $data
*
* @return Rule
+ * @throws FireflyException
*/
public function store(array $data): Rule
{
diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php
index bdc2c5bb74..e0e705f3aa 100644
--- a/app/Repositories/RuleGroup/RuleGroupRepository.php
+++ b/app/Repositories/RuleGroup/RuleGroupRepository.php
@@ -414,7 +414,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
if ($newOrder > $oldOrder) {
$this->user->ruleGroups()->where('rule_groups.order', '<=', $newOrder)->where('rule_groups.order', '>', $oldOrder)
->where('rule_groups.id', '!=', $ruleGroup->id)
- ->decrement('order', 1);
+ ->decrement('order');
$ruleGroup->order = $newOrder;
Log::debug(sprintf('Order of group #%d ("%s") is now %d', $ruleGroup->id, $ruleGroup->title, $newOrder));
$ruleGroup->save();
@@ -424,7 +424,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
$this->user->ruleGroups()->where('rule_groups.order', '>=', $newOrder)->where('rule_groups.order', '<', $oldOrder)
->where('rule_groups.id', '!=', $ruleGroup->id)
- ->increment('order', 1);
+ ->increment('order');
$ruleGroup->order = $newOrder;
Log::debug(sprintf('Order of group #%d ("%s") is now %d', $ruleGroup->id, $ruleGroup->title, $newOrder));
$ruleGroup->save();
diff --git a/app/Repositories/Tag/OperationsRepository.php b/app/Repositories/Tag/OperationsRepository.php
index e918d781fb..10f15b7f7f 100644
--- a/app/Repositories/Tag/OperationsRepository.php
+++ b/app/Repositories/Tag/OperationsRepository.php
@@ -207,6 +207,7 @@ class OperationsRepository implements OperationsRepositoryInterface
* @param Collection|null $tags
*
* @return array
+ * @throws FireflyException
*/
public function sumExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $tags = null): array
{
@@ -222,6 +223,7 @@ class OperationsRepository implements OperationsRepositoryInterface
* @param Collection|null $tags
*
* @return array
+ * @throws FireflyException
*/
public function sumIncome(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $tags = null): array
{
diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php
index 7f7bfec617..a678fc526f 100644
--- a/app/Repositories/Tag/TagRepository.php
+++ b/app/Repositories/Tag/TagRepository.php
@@ -250,7 +250,7 @@ class TagRepository implements TagRepositoryInterface
}
/**
- * @return Tag
+ * @return Tag|null
*/
public function oldestTag(): ?Tag
{
diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php
index bf231e8fb8..888992444a 100644
--- a/app/Repositories/Tag/TagRepositoryInterface.php
+++ b/app/Repositories/Tag/TagRepositoryInterface.php
@@ -79,7 +79,7 @@ interface TagRepositoryInterface
/**
* @param Tag $tag
*
- * @return Carbon
+ * @return Carbon|null
*/
public function firstUseDate(Tag $tag): ?Carbon;
diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
index 71d568e00f..a49f5d531e 100644
--- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php
+++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
@@ -264,6 +264,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
* @param TransactionGroup $group
*
* @return array
+ * @throws FireflyException
*/
public function getPiggyEvents(TransactionGroup $group): array
{
diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php
index 780d6c6376..177f882d0d 100644
--- a/app/Repositories/User/UserRepository.php
+++ b/app/Repositories/User/UserRepository.php
@@ -377,8 +377,8 @@ class UserRepository implements UserRepositoryInterface
* @param string $newEmail
*
* @return bool
+ * @throws \FireflyIII\Exceptions\FireflyException
* @see changeEmail
- *
*/
public function updateEmail(User $user, string $newEmail): bool
{
diff --git a/app/Rules/IsDateOrTime.php b/app/Rules/IsDateOrTime.php
index 04b0331bb1..23af02ac1d 100644
--- a/app/Rules/IsDateOrTime.php
+++ b/app/Rules/IsDateOrTime.php
@@ -38,7 +38,7 @@ class IsDateOrTime implements Rule
/**
* Get the validation error message.
*
- * @return string|array
+ * @return string
* @codeCoverageIgnore
*/
public function message()
diff --git a/app/Rules/ValidRecurrenceRepetitionType.php b/app/Rules/ValidRecurrenceRepetitionType.php
index e7211060ae..6f1655f8e5 100644
--- a/app/Rules/ValidRecurrenceRepetitionType.php
+++ b/app/Rules/ValidRecurrenceRepetitionType.php
@@ -63,10 +63,10 @@ class ValidRecurrenceRepetitionType implements Rule
if (in_array(substr($value, 0, 6), ['yearly', 'weekly'])) {
return true;
}
- if (0 === strpos($value, 'monthly')) {
+ if (str_starts_with($value, 'monthly')) {
return true;
}
- if (0 === strpos($value, 'ndom')) {
+ if (str_starts_with($value, 'ndom')) {
return true;
}
diff --git a/app/Rules/ValidRecurrenceRepetitionValue.php b/app/Rules/ValidRecurrenceRepetitionValue.php
index d6d4ac7893..ae9547d777 100644
--- a/app/Rules/ValidRecurrenceRepetitionValue.php
+++ b/app/Rules/ValidRecurrenceRepetitionValue.php
@@ -62,23 +62,23 @@ class ValidRecurrenceRepetitionValue implements Rule
return true;
}
- if (0 === strpos($value, 'monthly')) {
+ if (str_starts_with($value, 'monthly')) {
return $this->validateMonthly($value);
}
// Value is like: ndom,3,7
// nth x-day of the month.
- if (0 === strpos($value, 'ndom')) {
+ if (str_starts_with($value, 'ndom')) {
return $this->validateNdom($value);
}
// Value is like: weekly,7
- if (0 === strpos($value, 'weekly')) {
+ if (str_starts_with($value, 'weekly')) {
return $this->validateWeekly($value);
}
// Value is like: yearly,2018-01-01
- if (0 === strpos($value, 'yearly')) {
+ if (str_starts_with($value, 'yearly')) {
return $this->validateYearly($value);
}
diff --git a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php
index cdf7f4388c..6e8f6c81f7 100644
--- a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php
+++ b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php
@@ -208,7 +208,7 @@ trait CalculateXOccurrencesSince
$date->year = $mutator->year;
if ($mutator > $date) {
Log::debug(
- sprintf('mutator (%s) > date (%s), so add a year to date (%s)', $mutator->format('Y-m-d'), $date->format('Y-m-d'), $date->format('Y-m-d'),)
+ sprintf('mutator (%s) > date (%s), so add a year to date (%s)', $mutator->format('Y-m-d'), $date->format('Y-m-d'), $date->format('Y-m-d'))
);
$date->addYear();
Log::debug(sprintf('Date is now %s', $date->format('Y-m-d')));
@@ -223,7 +223,7 @@ trait CalculateXOccurrencesSince
$return[] = clone $obj;
$total++;
}
- $obj->addYears(1);
+ $obj->addYears();
$attempts++;
}
diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php
index 53f3cdfc3e..108413f963 100644
--- a/app/Support/Request/ConvertsDataTypes.php
+++ b/app/Support/Request/ConvertsDataTypes.php
@@ -156,7 +156,7 @@ trait ConvertsDataTypes
}
/**
- * @param string $value
+ * @param string|null $value
*
* @return bool
*/
diff --git a/app/Support/Search/AccountSearch.php b/app/Support/Search/AccountSearch.php
index 8050ebabc2..66e8a7074d 100644
--- a/app/Support/Search/AccountSearch.php
+++ b/app/Support/Search/AccountSearch.php
@@ -55,6 +55,7 @@ class AccountSearch implements GenericSearchInterface
/**
* @return Collection
+ * @throws \JsonException
*/
public function search(): Collection
{
diff --git a/app/Support/System/GeneratesInstallationId.php b/app/Support/System/GeneratesInstallationId.php
index f4e468e791..417a2672f3 100644
--- a/app/Support/System/GeneratesInstallationId.php
+++ b/app/Support/System/GeneratesInstallationId.php
@@ -39,7 +39,7 @@ trait GeneratesInstallationId
protected function generateInstallationId(): void
{
try {
- $config = app('fireflyconfig')->get('installation_id', null);
+ $config = app('fireflyconfig')->get('installation_id');
} catch (FireflyException $e) {
Log::info('Could not create or generate installation ID. Do not continue.');
diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php
index 32b346ef83..3bf2a7ba10 100644
--- a/app/Support/Twig/General.php
+++ b/app/Support/Twig/General.php
@@ -280,7 +280,7 @@ class General extends AbstractExtension
$args = func_get_args();
$route = $args[0]; // name of the route.
$name = Route::getCurrentRoute()->getName() ?? '';
- if (false !== strpos($name, $route)) {
+ if (str_contains($name, $route)) {
return 'active';
}
@@ -327,7 +327,7 @@ class General extends AbstractExtension
$args = func_get_args();
$route = $args[0]; // name of the route.
$name = Route::getCurrentRoute()->getName() ?? '';
- if (false !== strpos($name, $route)) {
+ if (str_contains($name, $route)) {
return 'menu-open';
}
diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php
index 5e75226a11..171803f074 100644
--- a/app/TransactionRules/Actions/ClearNotes.php
+++ b/app/TransactionRules/Actions/ClearNotes.php
@@ -41,7 +41,7 @@ class ClearNotes implements ActionInterface
->where('noteable_id', $journal['transaction_journal_id'])
->where('noteable_type', TransactionJournal::class)
->delete();
- Log::debug(sprintf('RuleAction ClearNotes removed all notes.'));
+ Log::debug('RuleAction ClearNotes removed all notes.');
return true;
}
diff --git a/app/Transformers/BillTransformer.php b/app/Transformers/BillTransformer.php
index d75d311aeb..f1804ddf62 100644
--- a/app/Transformers/BillTransformer.php
+++ b/app/Transformers/BillTransformer.php
@@ -188,14 +188,13 @@ class BillTransformer extends AbstractTransformer
'date' => $entry->date->format('Y-m-d'),
];
}
- $result = [
- 'paid_dates' => $result,
- 'next_expected_match' => $nextMatch->format('Y-m-d'),
- ];
//Log::debug('Result', $result);
- return $result;
+ return [
+ 'paid_dates' => $result,
+ 'next_expected_match' => $nextMatch->format('Y-m-d'),
+ ];
}
/**
diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php
index 3bcb8459f9..a82dc61320 100644
--- a/app/Transformers/PiggyBankTransformer.php
+++ b/app/Transformers/PiggyBankTransformer.php
@@ -58,7 +58,6 @@ class PiggyBankTransformer extends AbstractTransformer
*/
public function transform(PiggyBank $piggyBank): array
{
- /** @var Account $account */
$account = $piggyBank->account;
// set up repositories
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index db4523952a..8f2ce7275f 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -56,6 +56,9 @@ class FireflyValidator extends Validator
* @param mixed $value
*
* @return bool
+ * @throws \PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException
+ * @throws \PragmaRX\Google2FA\Exceptions\InvalidCharactersException
+ * @throws \PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException
*/
public function validate2faCode($attribute, $value): bool
{
@@ -472,7 +475,6 @@ class FireflyValidator extends Validator
return false;
}
- /** @var Collection $accountTypes */
$accountTypes = AccountType::whereIn('type', $search)->get();
$ignore = (int)($parameters[0] ?? 0.0);
$accountTypeIds = $accountTypes->pluck('id')->toArray();