Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:50:17 +02:00
parent 3ec9753808
commit 815fd5ff6b
135 changed files with 643 additions and 582 deletions

View File

@@ -90,6 +90,7 @@ class UserController extends Controller
* Display a listing of the resource. * Display a listing of the resource.
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function index(): JsonResponse public function index(): JsonResponse

View File

@@ -47,6 +47,7 @@ class PreferencesController extends Controller
* List all of them. * List all of them.
* *
* @return JsonResponse * @return JsonResponse
* @throws \FireflyIII\Exceptions\FireflyException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function index(): JsonResponse public function index(): JsonResponse
@@ -115,8 +116,10 @@ class PreferencesController extends Controller
/** /**
* @param PreferenceUpdateRequest $request * @param PreferenceUpdateRequest $request
* @param Preference $preference
* *
* @return JsonResponse * @return JsonResponse
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function update(PreferenceUpdateRequest $request, Preference $preference): JsonResponse public function update(PreferenceUpdateRequest $request, Preference $preference): JsonResponse
{ {

View File

@@ -62,9 +62,11 @@ class AttemptController extends Controller
} }
/** /**
* @param Webhook $webhook * @param Webhook $webhook
* @param WebhookMessage $message
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
*/ */
public function index(Webhook $webhook, WebhookMessage $message): JsonResponse public function index(Webhook $webhook, WebhookMessage $message): JsonResponse
{ {

View File

@@ -74,9 +74,12 @@ class DestroyController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *
* @param Webhook $webhook * @param Webhook $webhook
* @param WebhookMessage $message
* @param WebhookAttempt $attempt
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function destroyAttempt(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse public function destroyAttempt(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse
@@ -97,9 +100,11 @@ class DestroyController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *
* @param Webhook $webhook * @param Webhook $webhook
* @param WebhookMessage $message
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function destroyMessage(Webhook $webhook, WebhookMessage $message): JsonResponse public function destroyMessage(Webhook $webhook, WebhookMessage $message): JsonResponse

View File

@@ -61,6 +61,7 @@ class MessageController extends Controller
* @param Webhook $webhook * @param Webhook $webhook
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
*/ */
public function index(Webhook $webhook): JsonResponse public function index(Webhook $webhook): JsonResponse
{ {

View File

@@ -62,6 +62,7 @@ class ShowController extends Controller
* Display a listing of the webhooks of the user. * Display a listing of the webhooks of the user.
* *
* @return JsonResponse * @return JsonResponse
* @throws \FireflyIII\Exceptions\FireflyException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function index(): JsonResponse public function index(): JsonResponse

View File

@@ -73,6 +73,6 @@ class SubmitController extends Controller
SendWebhookMessage::dispatch($message)->afterResponse(); SendWebhookMessage::dispatch($message)->afterResponse();
} }
return response()->json([], 200); return response()->json([]);
} }
} }

View File

@@ -51,9 +51,8 @@ class StoreRequest extends FormRequest
'description' => $this->string('description'), 'description' => $this->string('description'),
'has_location' => true, 'has_location' => true,
]; ];
$data = $this->appendLocationData($data, null);
return $data; return $this->appendLocationData($data, null);
} }
/** /**

View File

@@ -53,9 +53,8 @@ class UpdateRequest extends FormRequest
'description' => ['description', 'string'], 'description' => ['description', 'string'],
]; ];
$data = $this->getAllData($fields); $data = $this->getAllData($fields);
$data = $this->appendLocationData($data, null);
return $data; return $this->appendLocationData($data, null);
} }
/** /**

View File

@@ -96,6 +96,7 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @return int * @return int
* @throws JsonException
*/ */
private function correctJournal(TransactionJournal $journal): int private function correctJournal(TransactionJournal $journal): int
{ {
@@ -146,7 +147,6 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param Account $account * @param Account $account
* *
* @return TransactionCurrency * @return TransactionCurrency
* @throws JsonException
*/ */
private function getCurrency(Account $account): TransactionCurrency private function getCurrency(Account $account): TransactionCurrency
{ {

View File

@@ -63,7 +63,7 @@ class CreateAccessTokens extends Command
$users = $repository->all(); $users = $repository->all();
/** @var User $user */ /** @var User $user */
foreach ($users as $user) { foreach ($users as $user) {
$pref = app('preferences')->getForUser($user, 'access_token', null); $pref = app('preferences')->getForUser($user, 'access_token');
if (null === $pref) { if (null === $pref) {
$token = $user->generateAccessToken(); $token = $user->generateAccessToken();
app('preferences')->setForUser($user, 'access_token', $token); app('preferences')->setForUser($user, 'access_token', $token);

View File

@@ -57,7 +57,6 @@ class DeleteZeroAmount extends Command
$start = microtime(true); $start = microtime(true);
$set = Transaction::where('amount', 0)->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray(); $set = Transaction::where('amount', 0)->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray();
$set = array_unique($set); $set = array_unique($set);
/** @var Collection $journals */
$journals = TransactionJournal::whereIn('id', $set)->get(); $journals = TransactionJournal::whereIn('id', $set)->get();
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
foreach ($journals as $journal) { foreach ($journals as $journal) {

View File

@@ -67,14 +67,12 @@ class EnableCurrencies extends Command
} }
// get all from journals: // get all from journals:
/** @var Collection $journals */
$journals = TransactionJournal::groupBy('transaction_currency_id')->get(['transaction_currency_id']); $journals = TransactionJournal::groupBy('transaction_currency_id')->get(['transaction_currency_id']);
foreach ($journals as $entry) { foreach ($journals as $entry) {
$found[] = (int)$entry->transaction_currency_id; $found[] = (int)$entry->transaction_currency_id;
} }
// get all from transactions // get all from transactions
/** @var Collection $transactions */
$transactions = Transaction::groupBy('transaction_currency_id', 'foreign_currency_id')->get(['transaction_currency_id', 'foreign_currency_id']); $transactions = Transaction::groupBy('transaction_currency_id', 'foreign_currency_id')->get(['transaction_currency_id', 'foreign_currency_id']);
foreach ($transactions as $entry) { foreach ($transactions as $entry) {
$found[] = (int)$entry->transaction_currency_id; $found[] = (int)$entry->transaction_currency_id;
@@ -82,7 +80,6 @@ class EnableCurrencies extends Command
} }
// get all from budget limits // get all from budget limits
/** @var Collection $limits */
$limits = BudgetLimit::groupBy('transaction_currency_id')->get(['transaction_currency_id']); $limits = BudgetLimit::groupBy('transaction_currency_id')->get(['transaction_currency_id']);
foreach ($limits as $entry) { foreach ($limits as $entry) {
$found[] = (int)$entry->transaction_currency_id; $found[] = (int)$entry->transaction_currency_id;

View File

@@ -61,7 +61,7 @@ class FixFrontpageAccounts extends Command
$users = User::get(); $users = User::get();
/** @var User $user */ /** @var User $user */
foreach ($users as $user) { foreach ($users as $user) {
$preference = Preferences::getForUser($user, 'frontPageAccounts', null); $preference = Preferences::getForUser($user, 'frontPageAccounts');
if (null !== $preference) { if (null !== $preference) {
$this->fixPreference($preference); $this->fixPreference($preference);
} }

View File

@@ -48,9 +48,6 @@ class FixPiggies extends Command
*/ */
protected $signature = 'firefly-iii:fix-piggies'; protected $signature = 'firefly-iii:fix-piggies';
/** @var int */
private $count;
/** /**
* Execute the console command. * Execute the console command.
* *
@@ -58,8 +55,8 @@ class FixPiggies extends Command
*/ */
public function handle(): int public function handle(): int
{ {
$this->count = 0; $count = 0;
$start = microtime(true); $start = microtime(true);
$set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get(); $set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get();
/** @var PiggyBankEvent $event */ /** @var PiggyBankEvent $event */
@@ -74,7 +71,7 @@ class FixPiggies extends Command
if (null === $journal) { if (null === $journal) {
$event->transaction_journal_id = null; $event->transaction_journal_id = null;
$event->save(); $event->save();
$this->count++; $count++;
continue; continue;
} }
@@ -84,14 +81,14 @@ class FixPiggies extends Command
$event->transaction_journal_id = null; $event->transaction_journal_id = null;
$event->save(); $event->save();
$this->line(sprintf('Piggy bank #%d was referenced by an invalid event. This has been fixed.', $event->piggy_bank_id)); $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.'); $this->line('All piggy bank events are correct.');
} }
if (0 !== $this->count) { if (0 !== $count) {
$this->line(sprintf('Fixed %d piggy bank event(s).', $this->count)); $this->line(sprintf('Fixed %d piggy bank event(s).', $count));
} }
$end = round(microtime(true) - $start, 2); $end = round(microtime(true) - $start, 2);

View File

@@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Console\Commands; namespace FireflyIII\Console\Commands;

View File

@@ -142,7 +142,6 @@ class Cron extends Command
* @param bool $force * @param bool $force
* @param Carbon|null $date * @param Carbon|null $date
* *
* @throws FireflyException
*/ */
private function autoBudgetCronJob(bool $force, ?Carbon $date): void private function autoBudgetCronJob(bool $force, ?Carbon $date): void
{ {

View File

@@ -106,6 +106,7 @@ class AccountCurrencies extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {
@@ -134,6 +135,8 @@ class AccountCurrencies extends Command
/** /**
* @param User $user * @param User $user
* @param string $systemCurrencyCode * @param string $systemCurrencyCode
*
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function updateCurrenciesForUser(User $user, string $systemCurrencyCode): void private function updateCurrenciesForUser(User $user, string $systemCurrencyCode): void
{ {

View File

@@ -69,6 +69,7 @@ class AppendBudgetLimitPeriods extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -83,6 +83,7 @@ class BackToJournals extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isMigrated(): bool private function isMigrated(): bool
{ {
@@ -93,6 +94,7 @@ class BackToJournals extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -67,7 +67,6 @@ class BudgetLimitCurrency extends Command
/** @var BudgetLimit $budgetLimit */ /** @var BudgetLimit $budgetLimit */
foreach ($budgetLimits as $budgetLimit) { foreach ($budgetLimits as $budgetLimit) {
if (null === $budgetLimit->transaction_currency_id) { if (null === $budgetLimit->transaction_currency_id) {
/** @var Budget $budget */
$budget = $budgetLimit->budget; $budget = $budgetLimit->budget;
if (null !== $budget) { if (null !== $budget) {
$user = $budget->user; $user = $budget->user;
@@ -96,6 +95,7 @@ class BudgetLimitCurrency extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -93,6 +93,7 @@ class CCLiabilities extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -105,6 +105,7 @@ class MigrateAttachments extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -64,7 +64,6 @@ class MigrateJournalNotes extends Command
} }
$count = 0; $count = 0;
/** @noinspection PhpUndefinedMethodInspection */
$set = TransactionJournalMeta::whereName('notes')->get(); $set = TransactionJournalMeta::whereName('notes')->get();
/** @var TransactionJournalMeta $meta */ /** @var TransactionJournalMeta $meta */
foreach ($set as $meta) { foreach ($set as $meta) {
@@ -104,6 +103,7 @@ class MigrateJournalNotes extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -79,6 +79,7 @@ class MigrateRecurrenceMeta extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {
@@ -92,6 +93,7 @@ class MigrateRecurrenceMeta extends Command
/** /**
* @return int * @return int
* @throws \JsonException
*/ */
private function migrateMetaData(): int private function migrateMetaData(): int
{ {
@@ -110,6 +112,7 @@ class MigrateRecurrenceMeta extends Command
* @param RecurrenceMeta $meta * @param RecurrenceMeta $meta
* *
* @return int * @return int
* @throws \JsonException
*/ */
private function migrateEntry(RecurrenceMeta $meta): int private function migrateEntry(RecurrenceMeta $meta): int
{ {
@@ -125,7 +128,7 @@ class MigrateRecurrenceMeta extends Command
if ('tags' === $meta->name) { if ('tags' === $meta->name) {
$array = explode(',', $meta->value); $array = explode(',', $meta->value);
$value = json_encode($array, JSON_THROW_ON_ERROR, 512); $value = json_encode($array, JSON_THROW_ON_ERROR);
} }
RecurrenceTransactionMeta::create( RecurrenceTransactionMeta::create(

View File

@@ -74,6 +74,7 @@ class MigrateRecurrenceType extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -72,6 +72,7 @@ class MigrateTagLocations extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -127,6 +127,7 @@ class MigrateToGroups extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isMigrated(): bool private function isMigrated(): bool
{ {

View File

@@ -119,6 +119,7 @@ class MigrateToRules extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -112,6 +112,7 @@ class OtherCurrenciesCorrections extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {
@@ -161,7 +162,6 @@ class OtherCurrenciesCorrections extends Command
} }
/** @var Account $account */
$account = $leadTransaction->account; $account = $leadTransaction->account;
$currency = $this->getCurrency($account); $currency = $this->getCurrency($account);
if (null === $currency) { if (null === $currency) {

View File

@@ -96,6 +96,7 @@ class RenameAccountMeta extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -120,6 +120,7 @@ class TransactionIdentifier extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -57,6 +57,7 @@ class UpgradeLiabilities extends Command
/** /**
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {
@@ -96,7 +97,7 @@ class UpgradeLiabilities extends Command
/** /**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @return Transaction * @return Transaction|null
*/ */
private function getSourceTransaction(TransactionJournal $journal): ?Transaction private function getSourceTransaction(TransactionJournal $journal): ?Transaction
{ {
@@ -106,7 +107,7 @@ class UpgradeLiabilities extends Command
/** /**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @return Transaction * @return Transaction|null
*/ */
private function getDestinationTransaction(TransactionJournal $journal): ?Transaction private function getDestinationTransaction(TransactionJournal $journal): ?Transaction
{ {

View File

@@ -90,7 +90,7 @@ class UpgradeFireflyInstructions extends Command
$text = ''; $text = '';
foreach (array_keys($config) as $compare) { foreach (array_keys($config) as $compare) {
// if string starts with: // if string starts with:
if (0 === strpos($version, $compare)) { if (str_starts_with($version, $compare)) {
$text = $config[$compare]; $text = $config[$compare];
} }
} }
@@ -119,9 +119,7 @@ class UpgradeFireflyInstructions extends Command
private function showLine(): void private function showLine(): void
{ {
$line = '+'; $line = '+';
for ($i = 0; $i < 78; ++$i) { $line .= str_repeat('-', 78);
$line .= '-';
}
$line .= '+'; $line .= '+';
$this->line($line); $this->line($line);
} }
@@ -163,7 +161,7 @@ class UpgradeFireflyInstructions extends Command
$text = ''; $text = '';
foreach (array_keys($config) as $compare) { foreach (array_keys($config) as $compare) {
// if string starts with: // if string starts with:
if (0 === strpos($version, $compare)) { if (str_starts_with($version, $compare)) {
$text = $config[$compare]; $text = $config[$compare];
} }
} }

View File

@@ -67,6 +67,7 @@ trait VerifiesAccessToken
* Returns false when given token does not match given user token. * Returns false when given token does not match given user token.
* *
* @return bool * @return bool
* @throws FireflyException
*/ */
protected function verifyAccessToken(): bool protected function verifyAccessToken(): bool
{ {
@@ -81,7 +82,7 @@ trait VerifiesAccessToken
return false; return false;
} }
$accessToken = app('preferences')->getForUser($user, 'access_token', null); $accessToken = app('preferences')->getForUser($user, 'access_token');
if (null === $accessToken) { if (null === $accessToken) {
Log::error(sprintf('User #%d has no access token, so cannot access command line options.', $userId)); Log::error(sprintf('User #%d has no access token, so cannot access command line options.', $userId));

View File

@@ -61,7 +61,7 @@ class RequestedReportOnJournals
/** /**
* Get the channels the event should broadcast on. * Get the channels the event should broadcast on.
* *
* @return Channel|array * @return PrivateChannel
*/ */
public function broadcastOn() public function broadcastOn()
{ {

View File

@@ -40,10 +40,12 @@ class UpdatedTransactionGroup extends Event
public $applyRules; public $applyRules;
/** @var TransactionGroup The group that was stored. */ /** @var TransactionGroup The group that was stored. */
public $transactionGroup; public $transactionGroup;
/** /**
* Create a new event instance. * Create a new event instance.
* *
* @param TransactionGroup $transactionGroup * @param TransactionGroup $transactionGroup
* @param bool $applyRules
*/ */
public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true) public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true)
{ {

View File

@@ -50,7 +50,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
* @param Request $request * @param Request $request
* @param Throwable $e * @param Throwable $e
* *
* @return mixed * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\JsonResponse|\Illuminate\Http\Response|Redirector|RedirectResponse|Response
* @throws Throwable * @throws Throwable
*/ */
public function render($request, Throwable $e) public function render($request, Throwable $e)

View File

@@ -68,6 +68,7 @@ class Handler extends ExceptionHandler
* @param Throwable $e * @param Throwable $e
* *
* @return mixed * @return mixed
* @throws Throwable
*/ */
public function render($request, Throwable $e) public function render($request, Throwable $e)
{ {

View File

@@ -131,6 +131,7 @@ class AccountFactory
* @param array $data * @param array $data
* *
* @return AccountType|null * @return AccountType|null
* @throws FireflyException
*/ */
protected function getAccountType(array $data): ?AccountType protected function getAccountType(array $data): ?AccountType
{ {
@@ -175,9 +176,11 @@ class AccountFactory
} }
/** /**
* @param array $data * @param AccountType $type
* @param array $data
* *
* @return Account * @return Account
* @throws \JsonException
*/ */
private function createAccount(AccountType $type, array $data): Account private function createAccount(AccountType $type, array $data): Account
{ {
@@ -244,6 +247,7 @@ class AccountFactory
* @param array $data * @param array $data
* *
* @return array * @return array
* @throws \JsonException
*/ */
private function cleanMetaDataArray(Account $account, array $data): array private function cleanMetaDataArray(Account $account, array $data): array
{ {

View File

@@ -46,7 +46,7 @@ class AttachmentFactory
public function create(array $data): ?Attachment public function create(array $data): ?Attachment
{ {
// append if necessary. // 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']; : $data['attachable_type'];
// get journal instead of transaction. // get journal instead of transaction.

View File

@@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
/** @noinspection PhpUndefinedMethodInspection */
/** @noinspection MultipleReturnStatementsInspection */ /** @noinspection MultipleReturnStatementsInspection */
declare(strict_types=1); declare(strict_types=1);

View File

@@ -178,7 +178,7 @@ class TransactionFactory
} }
/** /**
* @param TransactionCurrency $foreignCurrency |null * @param TransactionCurrency|null $foreignCurrency |null
* *
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */

View File

@@ -56,6 +56,7 @@ class TransactionGroupFactory
* *
* @return TransactionGroup * @return TransactionGroup
* @throws DuplicateTransactionException * @throws DuplicateTransactionException
* @throws FireflyException
*/ */
public function create(array $data): TransactionGroup public function create(array $data): TransactionGroup
{ {

View File

@@ -146,6 +146,7 @@ class TransactionJournalFactory
* @return TransactionJournal|null * @return TransactionJournal|null
* @throws DuplicateTransactionException * @throws DuplicateTransactionException
* @throws FireflyException * @throws FireflyException
* @throws \JsonException
*/ */
private function createJournal(NullArrayObject $row): ?TransactionJournal private function createJournal(NullArrayObject $row): ?TransactionJournal
{ {
@@ -294,16 +295,17 @@ class TransactionJournalFactory
* @param NullArrayObject $row * @param NullArrayObject $row
* *
* @return string * @return string
* @throws \JsonException
*/ */
private function hashArray(NullArrayObject $row): string private function hashArray(NullArrayObject $row): string
{ {
$dataRow = $row->getArrayCopy(); $dataRow = $row->getArrayCopy();
unset($dataRow['import_hash_v2'], $dataRow['original_source']); 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) { 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); Log::error(sprintf('Could not hash the original row! %s', json_last_error_msg()), $dataRow);
} }
@@ -319,6 +321,7 @@ class TransactionJournalFactory
* @param string $hash * @param string $hash
* *
* @throws DuplicateTransactionException * @throws DuplicateTransactionException
* @throws \JsonException
*/ */
private function errorIfDuplicate(string $hash): void 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: * 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 * @param TransactionCurrency|null $foreignCurrency
* *
* @return TransactionCurrency|null * @return TransactionCurrency|null

View File

@@ -19,7 +19,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1); declare(strict_types=1);

View File

@@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Generator\Report\Audit; namespace FireflyIII\Generator\Report\Audit;
@@ -33,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use JetBrains\PhpStorm\ArrayShape;
use Log; use Log;
use Throwable; use Throwable;
@@ -197,9 +196,9 @@ class MonthReportGenerator implements ReportGeneratorInterface
* *
* @return array * @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 */ /** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class); $accountRepository = app(AccountRepositoryInterface::class);

View File

@@ -19,7 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection MultipleReturnStatementsInspection */ /** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Generator\Report\Budget; namespace FireflyIII\Generator\Report\Budget;

View File

@@ -19,7 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** @noinspection MultipleReturnStatementsInspection */ /** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Generator\Report\Category; namespace FireflyIII\Generator\Report\Category;
@@ -30,6 +29,7 @@ use FireflyIII\Generator\Report\Support;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType; use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Pure;
use Log; use Log;
use Throwable; use Throwable;
@@ -57,7 +57,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/** /**
* MonthReportGenerator constructor. * MonthReportGenerator constructor.
*/ */
public function __construct() #[Pure] public function __construct()
{ {
$this->income = new Collection; $this->income = new Collection;
$this->expenses = new Collection; $this->expenses = new Collection;
@@ -76,7 +76,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
// render! // render!
try { 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('start', $this->start)->with('end', $this->end)
->with('categories', $this->categories) ->with('categories', $this->categories)
->with('accounts', $this->accounts) ->with('accounts', $this->accounts)

View File

@@ -20,7 +20,6 @@
*/ */
/** @noinspection MultipleReturnStatementsInspection */ /** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Generator\Report\Tag; namespace FireflyIII\Generator\Report\Tag;
@@ -29,6 +28,7 @@ use Carbon\Carbon;
use FireflyIII\Generator\Report\ReportGeneratorInterface; use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support; use FireflyIII\Generator\Report\Support;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Pure;
use Log; use Log;
use Throwable; use Throwable;
@@ -55,7 +55,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/** /**
* MonthReportGenerator constructor. * MonthReportGenerator constructor.
*/ */
public function __construct() #[Pure] public function __construct()
{ {
$this->expenses = new Collection; $this->expenses = new Collection;
$this->income = new Collection; $this->income = new Collection;

View File

@@ -43,6 +43,7 @@ class APIEventHandler
* @param AccessTokenCreated $event * @param AccessTokenCreated $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function accessTokenCreated(AccessTokenCreated $event): bool public function accessTokenCreated(AccessTokenCreated $event): bool
{ {
@@ -60,7 +61,7 @@ class APIEventHandler
$ipAddress = Request::ip(); $ipAddress = Request::ip();
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }

View File

@@ -41,6 +41,7 @@ class AdminEventHandler
* @param AdminRequestedTestMessage $event * @param AdminRequestedTestMessage $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function sendTestMessage(AdminRequestedTestMessage $event): bool public function sendTestMessage(AdminRequestedTestMessage $event): bool
{ {
@@ -58,7 +59,7 @@ class AdminEventHandler
} }
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }

View File

@@ -42,6 +42,7 @@ class AutomationHandler
* @param RequestedReportOnJournals $event * @param RequestedReportOnJournals $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function reportJournals(RequestedReportOnJournals $event): bool public function reportJournals(RequestedReportOnJournals $event): bool
{ {
@@ -60,7 +61,7 @@ class AutomationHandler
$email = $user->email; $email = $user->email;
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }

View File

@@ -110,6 +110,7 @@ class UserEventHandler
* @param Login $event * @param Login $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function demoUserBackToEnglish(Login $event): bool public function demoUserBackToEnglish(Login $event): bool
{ {
@@ -130,6 +131,8 @@ class UserEventHandler
/** /**
* @param DetectedNewIPAddress $event * @param DetectedNewIPAddress $event
*
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function notifyNewIPAddress(DetectedNewIPAddress $event): void public function notifyNewIPAddress(DetectedNewIPAddress $event): void
{ {
@@ -144,7 +147,7 @@ class UserEventHandler
$list = app('preferences')->getForUser($user, 'login_ip_history', [])->data; $list = app('preferences')->getForUser($user, 'login_ip_history', [])->data;
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }
@@ -171,6 +174,7 @@ class UserEventHandler
* @param UserChangedEmail $event * @param UserChangedEmail $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool
{ {
@@ -195,6 +199,7 @@ class UserEventHandler
* @param UserChangedEmail $event * @param UserChangedEmail $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function sendEmailChangeUndoMail(UserChangedEmail $event): bool public function sendEmailChangeUndoMail(UserChangedEmail $event): bool
{ {
@@ -246,6 +251,7 @@ class UserEventHandler
* @param RegisteredUser $event * @param RegisteredUser $event
* *
* @return bool * @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function sendRegistrationMail(RegisteredUser $event): bool public function sendRegistrationMail(RegisteredUser $event): bool
{ {
@@ -257,7 +263,7 @@ class UserEventHandler
$ipAddress = $event->ipAddress; $ipAddress = $event->ipAddress;
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }
@@ -277,6 +283,7 @@ class UserEventHandler
/** /**
* @param Login $event * @param Login $event
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function storeUserIPAddress(Login $event): void public function storeUserIPAddress(Login $event): void
{ {

View File

@@ -42,6 +42,8 @@ class VersionCheckEventHandler
* Checks with GitHub to see if there is a new version. * Checks with GitHub to see if there is a new version.
* *
* @param RequestedVersionCheckStatus $event * @param RequestedVersionCheckStatus $event
*
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function checkForUpdates(RequestedVersionCheckStatus $event): void public function checkForUpdates(RequestedVersionCheckStatus $event): void
{ {
@@ -59,7 +61,6 @@ class VersionCheckEventHandler
/** @var UserRepositoryInterface $repository */ /** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class); $repository = app(UserRepositoryInterface::class);
/** @var User $user */
$user = $event->user; $user = $event->user;
if (!$repository->hasRole($user, 'owner')) { if (!$repository->hasRole($user, 'owner')) {
Log::debug('User is not admin, done.'); Log::debug('User is not admin, done.');
@@ -87,12 +88,12 @@ class VersionCheckEventHandler
/** /**
* @param RequestedVersionCheckStatus $event * @param RequestedVersionCheckStatus $event
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void
{ {
/** @var UserRepositoryInterface $repository */ /** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class); $repository = app(UserRepositoryInterface::class);
/** @var User $user */
$user = $event->user; $user = $event->user;
if (!$repository->hasRole($user, 'owner')) { if (!$repository->hasRole($user, 'owner')) {
Log::debug('User is not admin, done.'); Log::debug('User is not admin, done.');

View File

@@ -243,7 +243,6 @@ class AttachmentHelper implements AttachmentHelperInterface
} }
$attachment = new Attachment; // create Attachment object. $attachment = new Attachment; // create Attachment object.
/** @noinspection PhpUndefinedFieldInspection */
$attachment->user()->associate($user); $attachment->user()->associate($user);
$attachment->attachable()->associate($model); $attachment->attachable()->associate($model);
$attachment->md5 = md5_file($file->getRealPath()); $attachment->md5 = md5_file($file->getRealPath());

View File

@@ -227,7 +227,6 @@ class GroupCollector implements GroupCollectorInterface
*/ */
public function getGroups(): Collection public function getGroups(): Collection
{ {
/** @var Collection $result */
$result = $this->query->get($this->fields); $result = $this->query->get($this->fields);
// now to parse this into an array. // now to parse this into an array.

View File

@@ -71,6 +71,7 @@ class Help implements HelpInterface
* @param string $language * @param string $language
* *
* @return string * @return string
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function getFromGitHub(string $route, string $language): string public function getFromGitHub(string $route, string $language): string
{ {

View File

@@ -38,6 +38,7 @@ trait UpdateTrait
* 'level' => 'info' / 'success' / 'error' * 'level' => 'info' / 'success' / 'error'
* *
* @return array * @return array
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function getLatestRelease(): array public function getLatestRelease(): array
{ {

View File

@@ -106,7 +106,7 @@ class AttachmentController extends Controller
* *
* @param Attachment $attachment * @param Attachment $attachment
* *
* @return mixed * @return LaravelResponse
* *
* @throws FireflyException * @throws FireflyException
*/ */
@@ -211,10 +211,12 @@ class AttachmentController extends Controller
/** /**
* View attachment in browser. * View attachment in browser.
* *
* @param Request $request
* @param Attachment $attachment * @param Attachment $attachment
* *
* @return LaravelResponse * @return LaravelResponse
* @throws FireflyException * @throws FireflyException
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/ */
public function view(Request $request, Attachment $attachment): LaravelResponse public function view(Request $request, Attachment $attachment): LaravelResponse
{ {

View File

@@ -51,9 +51,9 @@ abstract class Controller extends BaseController
public function __construct() public function __construct()
{ {
// is site a demo site? // 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; $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_USERNAME', config('firefly.demo_username'));
app('view')->share('DEMO_PASSWORD', config('firefly.demo_password')); app('view')->share('DEMO_PASSWORD', config('firefly.demo_password'));
app('view')->share('FF_VERSION', config('firefly.version')); app('view')->share('FF_VERSION', config('firefly.version'));
@@ -76,12 +76,12 @@ abstract class Controller extends BaseController
// share is alpha, is beta // share is alpha, is beta
$isAlpha = false; $isAlpha = false;
if (false !== strpos(config('firefly.version'), 'alpha')) { if (str_contains(config('firefly.version'), 'alpha')) {
$isAlpha = true; $isAlpha = true;
} }
$isBeta = false; $isBeta = false;
if (false !== strpos(config('firefly.version'), 'beta')) { if (str_contains(config('firefly.version'), 'beta')) {
$isBeta = true; $isBeta = true;
} }

View File

@@ -32,6 +32,7 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Routing\Redirector; use Illuminate\Routing\Redirector;
use Illuminate\View\View;
use Log; use Log;
/** /**
@@ -67,7 +68,7 @@ class CurrencyController extends Controller
* *
* @param Request $request * @param Request $request
* *
* @return Factory|RedirectResponse|Redirector|\Illuminate\View\View * @return Factory|RedirectResponse|Redirector|View
*/ */
public function create(Request $request) public function create(Request $request)
{ {
@@ -120,7 +121,7 @@ class CurrencyController extends Controller
* @param Request $request * @param Request $request
* @param TransactionCurrency $currency * @param TransactionCurrency $currency
* *
* @return Factory|RedirectResponse|Redirector|\Illuminate\View\View * @return Factory|RedirectResponse|Redirector|View
*/ */
public function delete(Request $request, TransactionCurrency $currency) public function delete(Request $request, TransactionCurrency $currency)
{ {
@@ -258,7 +259,7 @@ class CurrencyController extends Controller
* @param Request $request * @param Request $request
* @param TransactionCurrency $currency * @param TransactionCurrency $currency
* *
* @return Factory|RedirectResponse|Redirector|\Illuminate\View\View * @return Factory|RedirectResponse|Redirector|View
*/ */
public function edit(Request $request, TransactionCurrency $currency) public function edit(Request $request, TransactionCurrency $currency)
{ {
@@ -316,7 +317,7 @@ class CurrencyController extends Controller
* *
* @param Request $request * @param Request $request
* *
* @return Factory|\Illuminate\View\View * @return Factory|View
*/ */
public function index(Request $request) public function index(Request $request)
{ {

View File

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

View File

@@ -52,7 +52,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
* *
* @codeCoverageIgnore * @codeCoverageIgnore
* *
* @param Carbon $date * @param Carbon|null $date
*/ */
public function __construct(?Carbon $date) public function __construct(?Carbon $date)
{ {
@@ -238,6 +238,8 @@ class CreateAutoBudgetLimits implements ShouldQueue
/** /**
* @param AutoBudget $autoBudget * @param AutoBudget $autoBudget
*
* @throws FireflyException
*/ */
private function createRollover(AutoBudget $autoBudget): void private function createRollover(AutoBudget $autoBudget): void
{ {

View File

@@ -64,7 +64,7 @@ class CreateRecurringTransactions implements ShouldQueue
* *
* @codeCoverageIgnore * @codeCoverageIgnore
* *
* @param Carbon $date * @param Carbon|null $date
*/ */
public function __construct(?Carbon $date) public function __construct(?Carbon $date)
{ {
@@ -347,6 +347,8 @@ class CreateRecurringTransactions implements ShouldQueue
* @param Carbon $date * @param Carbon $date
* *
* @return TransactionGroup|null * @return TransactionGroup|null
* @throws \FireflyIII\Exceptions\DuplicateTransactionException
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
private function handleOccurrence(Recurrence $recurrence, RecurrenceRepetition $repetition, Carbon $date): ?TransactionGroup private function handleOccurrence(Recurrence $recurrence, RecurrenceRepetition $repetition, Carbon $date): ?TransactionGroup
{ {

View File

@@ -54,7 +54,7 @@ class SubmitTelemetryData implements ShouldQueue
* *
* @codeCoverageIgnore * @codeCoverageIgnore
* *
* @param Carbon $date * @param Carbon|null $date
*/ */
public function __construct(?Carbon $date) public function __construct(?Carbon $date)
{ {
@@ -80,7 +80,7 @@ class SubmitTelemetryData implements ShouldQueue
$json = $this->parseJson($telemetry); $json = $this->parseJson($telemetry);
try { try {
$body = json_encode($json, JSON_THROW_ON_ERROR, 512); $body = json_encode($json, JSON_THROW_ON_ERROR);
} catch (JsonException $e) { } catch (JsonException $e) {
Log::error($e->getMessage()); Log::error($e->getMessage());
Log::error('Could not parse JSON.'); Log::error('Could not parse JSON.');

View File

@@ -26,6 +26,7 @@ use Carbon\Carbon;
use Eloquent; use Eloquent;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -40,34 +41,34 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property int $account_type_id * @property int $account_type_id
* @property string $name * @property string $name
* @property string|null $virtual_balance * @property string|null $virtual_balance
* @property string|null $iban * @property string|null $iban
* @property bool $active * @property bool $active
* @property bool $encrypted * @property bool $encrypted
* @property int $order * @property int $order
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\AccountMeta[] $accountMeta * @property-read Collection|AccountMeta[] $accountMeta
* @property-read int|null $account_meta_count * @property-read int|null $account_meta_count
* @property \FireflyIII\Models\AccountType $accountType * @property AccountType $accountType
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments * @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count * @property-read int|null $attachments_count
* @property-read string $account_number * @property-read string $account_number
* @property-read string $edit_name * @property-read string $edit_name
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Location[] $locations * @property-read Collection|Location[] $locations
* @property-read int|null $locations_count * @property-read int|null $locations_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Note[] $notes * @property-read Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\ObjectGroup[] $objectGroups * @property-read Collection|ObjectGroup[] $objectGroups
* @property-read int|null $object_groups_count * @property-read int|null $object_groups_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks * @property-read Collection|PiggyBank[] $piggyBanks
* @property-read int|null $piggy_banks_count * @property-read int|null $piggy_banks_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions * @property-read Collection|Transaction[] $transactions
* @property-read int|null $transactions_count * @property-read int|null $transactions_count
* @property-read User $user * @property-read User $user
* @method static EloquentBuilder|Account accountTypeIn($types) * @method static EloquentBuilder|Account accountTypeIn($types)
* @method static EloquentBuilder|Account newModelQuery() * @method static EloquentBuilder|Account newModelQuery()
* @method static EloquentBuilder|Account newQuery() * @method static EloquentBuilder|Account newQuery()

View File

@@ -31,13 +31,13 @@ use Illuminate\Support\Carbon;
/** /**
* Class AccountMeta * Class AccountMeta
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property int $account_id * @property int $account_id
* @property string $name * @property string $name
* @property mixed $data * @property mixed $data
* @property-read \FireflyIII\Models\Account $account * @property-read Account $account
* @method static Builder|AccountMeta newModelQuery() * @method static Builder|AccountMeta newModelQuery()
* @method static Builder|AccountMeta newQuery() * @method static Builder|AccountMeta newQuery()
* @method static Builder|AccountMeta query() * @method static Builder|AccountMeta query()
@@ -78,8 +78,9 @@ class AccountMeta extends Model
/** /**
* @param mixed $value * @param mixed $value
* *
* @codeCoverageIgnore
* @return mixed * @return mixed
* @throws \JsonException
* @codeCoverageIgnore
*/ */
public function getDataAttribute($value) public function getDataAttribute($value)
{ {

View File

@@ -31,12 +31,12 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\AccountType * FireflyIII\Models\AccountType
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property string $type * @property string $type
* @property-read Collection|\FireflyIII\Models\Account[] $accounts * @property-read Collection|Account[] $accounts
* @property-read int|null $accounts_count * @property-read int|null $accounts_count
* @method static Builder|AccountType newModelQuery() * @method static Builder|AccountType newModelQuery()
* @method static Builder|AccountType newQuery() * @method static Builder|AccountType newQuery()
* @method static Builder|AccountType query() * @method static Builder|AccountType query()

View File

@@ -31,31 +31,32 @@ use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder; use Illuminate\Database\Query\Builder;
use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\Attachment * FireflyIII\Models\Attachment
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property int $attachable_id * @property int $attachable_id
* @property string $attachable_type * @property string $attachable_type
* @property bool $file_exists * @property bool $file_exists
* @property string $md5 * @property string $md5
* @property string $filename * @property string $filename
* @property string|null $title * @property string|null $title
* @property string|null $description * @property string|null $description
* @property string $mime * @property string $mime
* @property int $size * @property int $size
* @property bool $uploaded * @property bool $uploaded
* @property string $notes_text * @property string $notes_text
* @property-read Model|\Eloquent $attachable * @property-read Model|Eloquent $attachable
* @property Collection|\FireflyIII\Models\Note[] $notes * @property Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Attachment newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Attachment newQuery()
* @method static Builder|Attachment onlyTrashed() * @method static Builder|Attachment onlyTrashed()

View File

@@ -34,17 +34,17 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\AutoBudget * FireflyIII\Models\AutoBudget
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $budget_id * @property int $budget_id
* @property int $transaction_currency_id * @property int $transaction_currency_id
* @property int $auto_budget_type * @property int $auto_budget_type
* @property string $amount * @property string $amount
* @property string $period * @property string $period
* @property-read \FireflyIII\Models\Budget $budget * @property-read Budget $budget
* @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency * @property-read TransactionCurrency $transactionCurrency
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery() * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery()
* @method static Builder|AutoBudget onlyTrashed() * @method static Builder|AutoBudget onlyTrashed()

View File

@@ -34,17 +34,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\AvailableBudget * FireflyIII\Models\AvailableBudget
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property int $transaction_currency_id * @property int $transaction_currency_id
* @property string $amount * @property string $amount
* @property \Illuminate\Support\Carbon $start_date * @property \Illuminate\Support\Carbon $start_date
* @property \Illuminate\Support\Carbon $end_date * @property \Illuminate\Support\Carbon $end_date
* @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency * @property-read TransactionCurrency $transactionCurrency
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery() * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery()
* @method static Builder|AvailableBudget onlyTrashed() * @method static Builder|AvailableBudget onlyTrashed()

View File

@@ -35,16 +35,16 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property int $budget_id * @property int $budget_id
* @property int|null $transaction_currency_id * @property int|null $transaction_currency_id
* @property \Illuminate\Support\Carbon $start_date * @property \Illuminate\Support\Carbon $start_date
* @property \Illuminate\Support\Carbon|null $end_date * @property \Illuminate\Support\Carbon|null $end_date
* @property string $amount * @property string $amount
* @property string $spent * @property string $spent
* @property string|null $period * @property string|null $period
* @property int $generated * @property int $generated
* @property-read \FireflyIII\Models\Budget $budget * @property-read Budget $budget
* @property-read \FireflyIII\Models\TransactionCurrency|null $transactionCurrency * @property-read TransactionCurrency|null $transactionCurrency
* @method static Builder|BudgetLimit newModelQuery() * @method static Builder|BudgetLimit newModelQuery()
* @method static Builder|BudgetLimit newQuery() * @method static Builder|BudgetLimit newQuery()
* @method static Builder|BudgetLimit query() * @method static Builder|BudgetLimit query()

View File

@@ -38,23 +38,23 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\Category * FireflyIII\Models\Category
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property string $name * @property string $name
* @property Carbon $lastActivity * @property Carbon $lastActivity
* @property bool $encrypted * @property bool $encrypted
* @property-read Collection|\FireflyIII\Models\Attachment[] $attachments * @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count * @property-read int|null $attachments_count
* @property-read Collection|\FireflyIII\Models\Note[] $notes * @property-read Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals * @property-read Collection|TransactionJournal[] $transactionJournals
* @property-read int|null $transaction_journals_count * @property-read int|null $transaction_journals_count
* @property-read Collection|\FireflyIII\Models\Transaction[] $transactions * @property-read Collection|Transaction[] $transactions
* @property-read int|null $transactions_count * @property-read int|null $transactions_count
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
* @method static Builder|Category onlyTrashed() * @method static Builder|Category onlyTrashed()

View File

@@ -32,19 +32,19 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** /**
* FireflyIII\Models\CurrencyExchangeRate * FireflyIII\Models\CurrencyExchangeRate
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $deleted_at * @property string|null $deleted_at
* @property int $user_id * @property int $user_id
* @property int $from_currency_id * @property int $from_currency_id
* @property int $to_currency_id * @property int $to_currency_id
* @property \Illuminate\Support\Carbon $date * @property \Illuminate\Support\Carbon $date
* @property string $rate * @property string $rate
* @property string|null $user_rate * @property string|null $user_rate
* @property-read \FireflyIII\Models\TransactionCurrency $fromCurrency * @property-read TransactionCurrency $fromCurrency
* @property-read \FireflyIII\Models\TransactionCurrency $toCurrency * @property-read TransactionCurrency $toCurrency
* @property-read User $user * @property-read User $user
* @method static Builder|CurrencyExchangeRate newModelQuery() * @method static Builder|CurrencyExchangeRate newModelQuery()
* @method static Builder|CurrencyExchangeRate newQuery() * @method static Builder|CurrencyExchangeRate newQuery()
* @method static Builder|CurrencyExchangeRate query() * @method static Builder|CurrencyExchangeRate query()

View File

@@ -33,17 +33,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\LinkType * FireflyIII\Models\LinkType
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property string $name * @property string $name
* @property string $outward * @property string $outward
* @property string $inward * @property string $inward
* @property int $journalCount * @property int $journalCount
* @property bool $editable * @property bool $editable
* @property-read Collection|\FireflyIII\Models\TransactionJournalLink[] $transactionJournalLinks * @property-read Collection|TransactionJournalLink[] $transactionJournalLinks
* @property-read int|null $transaction_journal_links_count * @property-read int|null $transaction_journal_links_count
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|LinkType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newQuery() * @method static \Illuminate\Database\Eloquent\Builder|LinkType newQuery()
* @method static Builder|LinkType onlyTrashed() * @method static Builder|LinkType onlyTrashed()

View File

@@ -33,18 +33,18 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\Location * FireflyIII\Models\Location
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $locatable_id * @property int $locatable_id
* @property string $locatable_type * @property string $locatable_type
* @property float|null $latitude * @property float|null $latitude
* @property float|null $longitude * @property float|null $longitude
* @property int|null $zoom_level * @property int|null $zoom_level
* @property-read Collection|\FireflyIII\Models\Account[] $accounts * @property-read Collection|Account[] $accounts
* @property-read int|null $accounts_count * @property-read int|null $accounts_count
* @property-read Model|\Eloquent $locatable * @property-read Model|Eloquent $locatable
* @method static Builder|Location newModelQuery() * @method static Builder|Location newModelQuery()
* @method static Builder|Location newQuery() * @method static Builder|Location newQuery()
* @method static Builder|Location query() * @method static Builder|Location query()

View File

@@ -23,38 +23,43 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Models; namespace FireflyIII\Models;
use Eloquent;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\ObjectGroup * FireflyIII\Models\ObjectGroup
* *
* @property int $id * @property int $id
* @property int $user_id * @property int $user_id
* @property \Illuminate\Support\Carbon|null $created_at * @property Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property string $title * @property string $title
* @property int $order * @property int $order
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[] $accounts * @property-read Collection|Account[] $accounts
* @property-read int|null $accounts_count * @property-read int|null $accounts_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[] $bills * @property-read Collection|Bill[] $bills
* @property-read int|null $bills_count * @property-read int|null $bills_count
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks * @property-read Collection|PiggyBank[] $piggyBanks
* @property-read int|null $piggy_banks_count * @property-read int|null $piggy_banks_count
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup newModelQuery() * @method static Builder|ObjectGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup newQuery() * @method static Builder|ObjectGroup newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup query() * @method static Builder|ObjectGroup query()
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereCreatedAt($value) * @method static Builder|ObjectGroup whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereDeletedAt($value) * @method static Builder|ObjectGroup whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereId($value) * @method static Builder|ObjectGroup whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereOrder($value) * @method static Builder|ObjectGroup whereOrder($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereTitle($value) * @method static Builder|ObjectGroup whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereUpdatedAt($value) * @method static Builder|ObjectGroup whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ObjectGroup whereUserId($value) * @method static Builder|ObjectGroup whereUserId($value)
* @mixin \Eloquent * @mixin Eloquent
*/ */
class ObjectGroup extends Model class ObjectGroup extends Model
{ {
@@ -74,7 +79,7 @@ class ObjectGroup extends Model
]; ];
/** /**
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany * @return MorphToMany
*/ */
public function piggyBanks() public function piggyBanks()
{ {
@@ -82,7 +87,7 @@ class ObjectGroup extends Model
} }
/** /**
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany * @return MorphToMany
*/ */
public function bills() public function bills()
{ {
@@ -90,7 +95,7 @@ class ObjectGroup extends Model
} }
/** /**
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany * @return MorphToMany
*/ */
public function accounts() public function accounts()
{ {

View File

@@ -37,27 +37,27 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $account_id * @property int $account_id
* @property string $name * @property string $name
* @property string $targetamount * @property string $targetamount
* @property \Illuminate\Support\Carbon|null $startdate * @property \Illuminate\Support\Carbon|null $startdate
* @property \Illuminate\Support\Carbon|null $targetdate * @property \Illuminate\Support\Carbon|null $targetdate
* @property int $order * @property int $order
* @property bool $active * @property bool $active
* @property bool $encrypted * @property bool $encrypted
* @property-read \FireflyIII\Models\Account $account * @property-read Account $account
* @property-read Collection|\FireflyIII\Models\Attachment[] $attachments * @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count * @property-read int|null $attachments_count
* @property-read Collection|\FireflyIII\Models\Note[] $notes * @property-read Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read Collection|\FireflyIII\Models\ObjectGroup[] $objectGroups * @property-read Collection|ObjectGroup[] $objectGroups
* @property-read int|null $object_groups_count * @property-read int|null $object_groups_count
* @property-read Collection|\FireflyIII\Models\PiggyBankEvent[] $piggyBankEvents * @property-read Collection|PiggyBankEvent[] $piggyBankEvents
* @property-read int|null $piggy_bank_events_count * @property-read int|null $piggy_bank_events_count
* @property-read Collection|\FireflyIII\Models\PiggyBankRepetition[] $piggyBankRepetitions * @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
* @property-read int|null $piggy_bank_repetitions_count * @property-read int|null $piggy_bank_repetitions_count
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newQuery() * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newQuery()
* @method static Builder|PiggyBank onlyTrashed() * @method static Builder|PiggyBank onlyTrashed()

View File

@@ -30,15 +30,15 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** /**
* FireflyIII\Models\PiggyBankEvent * FireflyIII\Models\PiggyBankEvent
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property int $piggy_bank_id * @property int $piggy_bank_id
* @property int|null $transaction_journal_id * @property int|null $transaction_journal_id
* @property \Illuminate\Support\Carbon $date * @property \Illuminate\Support\Carbon $date
* @property string $amount * @property string $amount
* @property \FireflyIII\Models\PiggyBank $piggyBank * @property PiggyBank $piggyBank
* @property-read \FireflyIII\Models\TransactionJournal|null $transactionJournal * @property-read TransactionJournal|null $transactionJournal
* @method static Builder|PiggyBankEvent newModelQuery() * @method static Builder|PiggyBankEvent newModelQuery()
* @method static Builder|PiggyBankEvent newQuery() * @method static Builder|PiggyBankEvent newQuery()
* @method static Builder|PiggyBankEvent query() * @method static Builder|PiggyBankEvent query()

View File

@@ -31,19 +31,19 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** /**
* FireflyIII\Models\PiggyBankRepetition * FireflyIII\Models\PiggyBankRepetition
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_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 $startdate
* @property \Illuminate\Support\Carbon|null $targetdate * @property \Illuminate\Support\Carbon|null $targetdate
* @property string $currentamount * @property string $currentamount
* @property-read \FireflyIII\Models\PiggyBank $piggyBank * @property-read PiggyBank $piggyBank
* @method static EloquentBuilder|PiggyBankRepetition newModelQuery() * @method static EloquentBuilder|PiggyBankRepetition newModelQuery()
* @method static EloquentBuilder|PiggyBankRepetition newQuery() * @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 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 whereCreatedAt($value)
* @method static EloquentBuilder|PiggyBankRepetition whereCurrentamount($value) * @method static EloquentBuilder|PiggyBankRepetition whereCurrentamount($value)
* @method static EloquentBuilder|PiggyBankRepetition whereId($value) * @method static EloquentBuilder|PiggyBankRepetition whereId($value)
@@ -99,7 +99,7 @@ class PiggyBankRepetition extends Model
* @param EloquentBuilder $query * @param EloquentBuilder $query
* @param Carbon $date * @param Carbon $date
* *
* @return mixed * @return EloquentBuilder
*/ */
public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date) public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date)
{ {

View File

@@ -41,29 +41,29 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property int $transaction_type_id * @property int $transaction_type_id
* @property string $title * @property string $title
* @property string $description * @property string $description
* @property Carbon $first_date * @property Carbon $first_date
* @property Carbon|null $repeat_until * @property Carbon|null $repeat_until
* @property Carbon|null $latest_date * @property Carbon|null $latest_date
* @property int $repetitions * @property int $repetitions
* @property bool $apply_rules * @property bool $apply_rules
* @property bool $active * @property bool $active
* @property-read Collection|\FireflyIII\Models\Attachment[] $attachments * @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count * @property-read int|null $attachments_count
* @property-read Collection|\FireflyIII\Models\Note[] $notes * @property-read Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read Collection|\FireflyIII\Models\RecurrenceMeta[] $recurrenceMeta * @property-read Collection|RecurrenceMeta[] $recurrenceMeta
* @property-read int|null $recurrence_meta_count * @property-read int|null $recurrence_meta_count
* @property-read Collection|\FireflyIII\Models\RecurrenceRepetition[] $recurrenceRepetitions * @property-read Collection|RecurrenceRepetition[] $recurrenceRepetitions
* @property-read int|null $recurrence_repetitions_count * @property-read int|null $recurrence_repetitions_count
* @property-read Collection|\FireflyIII\Models\RecurrenceTransaction[] $recurrenceTransactions * @property-read Collection|RecurrenceTransaction[] $recurrenceTransactions
* @property-read int|null $recurrence_transactions_count * @property-read int|null $recurrence_transactions_count
* @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency * @property-read TransactionCurrency $transactionCurrency
* @property-read \FireflyIII\Models\TransactionType $transactionType * @property-read TransactionType $transactionType
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Recurrence newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Recurrence newQuery()
* @method static Builder|Recurrence onlyTrashed() * @method static Builder|Recurrence onlyTrashed()

View File

@@ -32,14 +32,14 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\RecurrenceMeta * FireflyIII\Models\RecurrenceMeta
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $recurrence_id * @property int $recurrence_id
* @property string $name * @property string $name
* @property mixed $value * @property mixed $value
* @property-read \FireflyIII\Models\Recurrence $recurrence * @property-read Recurrence $recurrence
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newQuery()
* @method static Builder|RecurrenceMeta onlyTrashed() * @method static Builder|RecurrenceMeta onlyTrashed()

View File

@@ -32,16 +32,16 @@ use Illuminate\Database\Query\Builder;
/** /**
* FireflyIII\Models\RecurrenceRepetition * FireflyIII\Models\RecurrenceRepetition
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $recurrence_id * @property int $recurrence_id
* @property string $repetition_type * @property string $repetition_type
* @property string $repetition_moment * @property string $repetition_moment
* @property int $repetition_skip * @property int $repetition_skip
* @property int $weekend * @property int $weekend
* @property-read \FireflyIII\Models\Recurrence $recurrence * @property-read Recurrence $recurrence
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery()
* @method static Builder|RecurrenceRepetition onlyTrashed() * @method static Builder|RecurrenceRepetition onlyTrashed()

View File

@@ -36,23 +36,23 @@ use Illuminate\Support\Collection;
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $recurrence_id * @property int $recurrence_id
* @property int $transaction_currency_id * @property int $transaction_currency_id
* @property int|null $foreign_currency_id * @property int|null $foreign_currency_id
* @property int $source_id * @property int $source_id
* @property int $destination_id * @property int $destination_id
* @property string $amount * @property string $amount
* @property string|null $foreign_amount * @property string|null $foreign_amount
* @property string $description * @property string $description
* @property-read \FireflyIII\Models\Account $destinationAccount * @property-read Account $destinationAccount
* @property-read \FireflyIII\Models\TransactionCurrency|null $foreignCurrency * @property-read TransactionCurrency|null $foreignCurrency
* @property-read \FireflyIII\Models\Recurrence $recurrence * @property-read Recurrence $recurrence
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\RecurrenceTransactionMeta[] $recurrenceTransactionMeta * @property-read \Illuminate\Database\Eloquent\Collection|RecurrenceTransactionMeta[] $recurrenceTransactionMeta
* @property-read int|null $recurrence_transaction_meta_count * @property-read int|null $recurrence_transaction_meta_count
* @property-read \FireflyIII\Models\Account $sourceAccount * @property-read Account $sourceAccount
* @property-read \FireflyIII\Models\TransactionCurrency $transactionCurrency * @property-read TransactionCurrency $transactionCurrency
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery()
* @method static Builder|RecurrenceTransaction onlyTrashed() * @method static Builder|RecurrenceTransaction onlyTrashed()
@@ -72,9 +72,9 @@ use Illuminate\Support\Collection;
* @method static Builder|RecurrenceTransaction withTrashed() * @method static Builder|RecurrenceTransaction withTrashed()
* @method static Builder|RecurrenceTransaction withoutTrashed() * @method static Builder|RecurrenceTransaction withoutTrashed()
* @mixin Eloquent * @mixin Eloquent
* @property int|null $transaction_type_id * @property int|null $transaction_type_id
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value) * @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 class RecurrenceTransaction extends Model
{ {

View File

@@ -32,14 +32,14 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\RecurrenceTransactionMeta * FireflyIII\Models\RecurrenceTransactionMeta
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $rt_id * @property int $rt_id
* @property string $name * @property string $name
* @property mixed $value * @property mixed $value
* @property-read \FireflyIII\Models\RecurrenceTransaction $recurrenceTransaction * @property-read RecurrenceTransaction $recurrenceTransaction
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newQuery()
* @method static Builder|RecurrenceTransactionMeta onlyTrashed() * @method static Builder|RecurrenceTransactionMeta onlyTrashed()

View File

@@ -31,16 +31,16 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** /**
* FireflyIII\Models\RuleAction * FireflyIII\Models\RuleAction
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property int $rule_id * @property int $rule_id
* @property string $action_type * @property string $action_type
* @property string $action_value * @property string $action_value
* @property int $order * @property int $order
* @property bool $active * @property bool $active
* @property bool $stop_processing * @property bool $stop_processing
* @property-read \FireflyIII\Models\Rule $rule * @property-read Rule $rule
* @method static Builder|RuleAction newModelQuery() * @method static Builder|RuleAction newModelQuery()
* @method static Builder|RuleAction newQuery() * @method static Builder|RuleAction newQuery()
* @method static Builder|RuleAction query() * @method static Builder|RuleAction query()

View File

@@ -35,19 +35,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\RuleGroup * FireflyIII\Models\RuleGroup
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property string $title * @property string $title
* @property string|null $description * @property string|null $description
* @property int $order * @property int $order
* @property bool $active * @property bool $active
* @property bool $stop_processing * @property bool $stop_processing
* @property \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Rule[] $rules * @property \Illuminate\Database\Eloquent\Collection|Rule[] $rules
* @property-read int|null $rules_count * @property-read int|null $rules_count
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery() * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery()
* @method static Builder|RuleGroup onlyTrashed() * @method static Builder|RuleGroup onlyTrashed()

View File

@@ -31,16 +31,16 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** /**
* FireflyIII\Models\RuleTrigger * FireflyIII\Models\RuleTrigger
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property int $rule_id * @property int $rule_id
* @property string $trigger_type * @property string $trigger_type
* @property string $trigger_value * @property string $trigger_value
* @property int $order * @property int $order
* @property bool $active * @property bool $active
* @property bool $stop_processing * @property bool $stop_processing
* @property-read \FireflyIII\Models\Rule $rule * @property-read Rule $rule
* @method static Builder|RuleTrigger newModelQuery() * @method static Builder|RuleTrigger newModelQuery()
* @method static Builder|RuleTrigger newQuery() * @method static Builder|RuleTrigger newQuery()
* @method static Builder|RuleTrigger query() * @method static Builder|RuleTrigger query()

View File

@@ -33,21 +33,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\TransactionCurrency * FireflyIII\Models\TransactionCurrency
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property bool $enabled * @property bool $enabled
* @property string $code * @property string $code
* @property string $name * @property string $name
* @property string $symbol * @property string $symbol
* @property int $decimal_places * @property int $decimal_places
* @property-read Collection|\FireflyIII\Models\BudgetLimit[] $budgetLimits * @property-read Collection|BudgetLimit[] $budgetLimits
* @property-read int|null $budget_limits_count * @property-read int|null $budget_limits_count
* @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals * @property-read Collection|TransactionJournal[] $transactionJournals
* @property-read int|null $transaction_journals_count * @property-read int|null $transaction_journals_count
* @property-read Collection|\FireflyIII\Models\Transaction[] $transactions * @property-read Collection|Transaction[] $transactions
* @property-read int|null $transactions_count * @property-read int|null $transactions_count
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newQuery()
* @method static Builder|TransactionCurrency onlyTrashed() * @method static Builder|TransactionCurrency onlyTrashed()

View File

@@ -35,15 +35,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\TransactionGroup * FireflyIII\Models\TransactionGroup
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property string|null $title * @property string|null $title
* @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals * @property-read Collection|TransactionJournal[] $transactionJournals
* @property-read int|null $transaction_journals_count * @property-read int|null $transaction_journals_count
* @property-read User $user * @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newQuery()
* @method static Builder|TransactionGroup onlyTrashed() * @method static Builder|TransactionGroup onlyTrashed()

View File

@@ -34,20 +34,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\TransactionJournalLink * FireflyIII\Models\TransactionJournalLink
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $updated_at
* @property int $link_type_id * @property int $link_type_id
* @property int $source_id * @property int $source_id
* @property int $destination_id * @property int $destination_id
* @property string|null $comment * @property string|null $comment
* @property-read \FireflyIII\Models\TransactionJournal $destination * @property-read TransactionJournal $destination
* @property-read \FireflyIII\Models\LinkType $linkType * @property-read LinkType $linkType
* @property-read Collection|\FireflyIII\Models\Note[] $notes * @property-read Collection|Note[] $notes
* @property-read int|null $notes_count * @property-read int|null $notes_count
* @property-read \FireflyIII\Models\TransactionJournal $source * @property-read TransactionJournal $source
* @property-read string $inward * @property-read string $inward
* @property-read string $outward * @property-read string $outward
* @method static Builder|TransactionJournalLink newModelQuery() * @method static Builder|TransactionJournalLink newModelQuery()
* @method static Builder|TransactionJournalLink newQuery() * @method static Builder|TransactionJournalLink newQuery()
* @method static Builder|TransactionJournalLink query() * @method static Builder|TransactionJournalLink query()

View File

@@ -32,15 +32,15 @@ use Illuminate\Support\Carbon;
/** /**
* FireflyIII\Models\TransactionJournalMeta * FireflyIII\Models\TransactionJournalMeta
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property int $transaction_journal_id * @property int $transaction_journal_id
* @property string $name * @property string $name
* @property mixed $data * @property mixed $data
* @property string $hash * @property string $hash
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property-read \FireflyIII\Models\TransactionJournal $transactionJournal * @property-read TransactionJournal $transactionJournal
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newQuery()
* @method static Builder|TransactionJournalMeta onlyTrashed() * @method static Builder|TransactionJournalMeta onlyTrashed()

View File

@@ -34,13 +34,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\TransactionType * FireflyIII\Models\TransactionType
* *
* @property int $id * @property int $id
* @property Carbon|null $created_at * @property Carbon|null $created_at
* @property Carbon|null $updated_at * @property Carbon|null $updated_at
* @property Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property string $type * @property string $type
* @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals * @property-read Collection|TransactionJournal[] $transactionJournals
* @property-read int|null $transaction_journals_count * @property-read int|null $transaction_journals_count
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newQuery() * @method static \Illuminate\Database\Eloquent\Builder|TransactionType newQuery()
* @method static Builder|TransactionType onlyTrashed() * @method static Builder|TransactionType onlyTrashed()

View File

@@ -22,50 +22,54 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Models; namespace FireflyIII\Models;
use Eloquent;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\Webhook * FireflyIII\Models\Webhook
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at * @property Carbon|null $deleted_at
* @property int $user_id * @property int $user_id
* @property bool $active * @property bool $active
* @property int $trigger * @property int $trigger
* @property int $response * @property int $response
* @property int $delivery * @property int $delivery
* @property string $url * @property string $url
* @property-read User $user * @property-read User $user
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\WebhookMessage[] $webhookMessages * @property-read Collection|WebhookMessage[] $webhookMessages
* @property-read int|null $webhook_messages_count * @property-read int|null $webhook_messages_count
* @method static \Illuminate\Database\Eloquent\Builder|Webhook newModelQuery() * @method static Builder|Webhook newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Webhook newQuery() * @method static Builder|Webhook newQuery()
* @method static \Illuminate\Database\Query\Builder|Webhook onlyTrashed() * @method static \Illuminate\Database\Query\Builder|Webhook onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|Webhook query() * @method static Builder|Webhook query()
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereActive($value) * @method static Builder|Webhook whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereCreatedAt($value) * @method static Builder|Webhook whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereDeletedAt($value) * @method static Builder|Webhook whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereDelivery($value) * @method static Builder|Webhook whereDelivery($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereId($value) * @method static Builder|Webhook whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereResponse($value) * @method static Builder|Webhook whereResponse($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereTrigger($value) * @method static Builder|Webhook whereTrigger($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUpdatedAt($value) * @method static Builder|Webhook whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUrl($value) * @method static Builder|Webhook whereUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereUserId($value) * @method static Builder|Webhook whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|Webhook withTrashed() * @method static \Illuminate\Database\Query\Builder|Webhook withTrashed()
* @method static \Illuminate\Database\Query\Builder|Webhook withoutTrashed() * @method static \Illuminate\Database\Query\Builder|Webhook withoutTrashed()
* @mixin \Eloquent * @mixin Eloquent
* @property string $title * @property string $title
* @property string $secret * @property string $secret
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereSecret($value) * @method static Builder|Webhook whereSecret($value)
* @method static \Illuminate\Database\Eloquent\Builder|Webhook whereTitle($value) * @method static Builder|Webhook whereTitle($value)
*/ */
class Webhook extends Model class Webhook extends Model
{ {

View File

@@ -23,24 +23,27 @@ declare(strict_types=1);
namespace FireflyIII\Models; namespace FireflyIII\Models;
use Eloquent;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* Class WebhookAttempt * Class WebhookAttempt
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property Carbon|null $updated_at
* @property string|null $deleted_at * @property string|null $deleted_at
* @property int $webhook_message_id * @property int $webhook_message_id
* @property int $status_code * @property int $status_code
* @property string|null $logs * @property string|null $logs
* @property string|null $response * @property string|null $response
* @property-read \FireflyIII\Models\WebhookMessage $webhookMessage * @property-read WebhookMessage $webhookMessage
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newQuery() * @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt query() * @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 whereStatusCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereWebhookMessageId($value) * @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereWebhookMessageId($value)
* @mixin \Eloquent * @mixin Eloquent
* @method static \Illuminate\Database\Query\Builder|WebhookAttempt onlyTrashed() * @method static Builder|WebhookAttempt onlyTrashed()
* @method static \Illuminate\Database\Query\Builder|WebhookAttempt withTrashed() * @method static Builder|WebhookAttempt withTrashed()
* @method static \Illuminate\Database\Query\Builder|WebhookAttempt withoutTrashed() * @method static Builder|WebhookAttempt withoutTrashed()
*/ */
class WebhookAttempt extends Model class WebhookAttempt extends Model
{ {

View File

@@ -23,44 +23,48 @@ declare(strict_types=1);
namespace FireflyIII\Models; namespace FireflyIII\Models;
use Eloquent;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Carbon;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**
* FireflyIII\Models\WebhookMessage * FireflyIII\Models\WebhookMessage
* *
* @property int $id * @property int $id
* @property \Illuminate\Support\Carbon|null $created_at * @property Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at * @property Carbon|null $updated_at
* @property string|null $deleted_at * @property string|null $deleted_at
* @property int $webhook_id * @property int $webhook_id
* @property bool $sent * @property bool $sent
* @property bool $errored * @property bool $errored
* @property int $attempts * @property int $attempts
* @property string $uuid * @property string $uuid
* @property array $message * @property array $message
* @property array|null $logs * @property array|null $logs
* @property-read \FireflyIII\Models\Webhook $webhook * @property-read Webhook $webhook
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage newModelQuery() * @method static Builder|WebhookMessage newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage newQuery() * @method static Builder|WebhookMessage newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage query() * @method static Builder|WebhookMessage query()
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereAttempts($value) * @method static Builder|WebhookMessage whereAttempts($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereCreatedAt($value) * @method static Builder|WebhookMessage whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereDeletedAt($value) * @method static Builder|WebhookMessage whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereErrored($value) * @method static Builder|WebhookMessage whereErrored($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereId($value) * @method static Builder|WebhookMessage whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereLogs($value) * @method static Builder|WebhookMessage whereLogs($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereMessage($value) * @method static Builder|WebhookMessage whereMessage($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereSent($value) * @method static Builder|WebhookMessage whereSent($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereUpdatedAt($value) * @method static Builder|WebhookMessage whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereUuid($value) * @method static Builder|WebhookMessage whereUuid($value)
* @method static \Illuminate\Database\Eloquent\Builder|WebhookMessage whereWebhookId($value) * @method static Builder|WebhookMessage whereWebhookId($value)
* @mixin \Eloquent * @mixin Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\WebhookAttempt[] $webhookAttempts * @property-read Collection|WebhookAttempt[] $webhookAttempts
* @property-read int|null $webhook_attempts_count * @property-read int|null $webhook_attempts_count
*/ */
class WebhookMessage extends Model class WebhookMessage extends Model
{ {

View File

@@ -172,7 +172,7 @@ class EventServiceProvider extends ServiceProvider
$ipAddress = Request::ip(); $ipAddress = Request::ip();
// see if user has alternative email address: // 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) { if (null !== $pref) {
$email = $pref->data; $email = $pref->data;
} }

View File

@@ -417,7 +417,7 @@ class AccountRepository implements AccountRepositoryInterface
* *
* @param Account $account * @param Account $account
* *
* @return string * @return string|null
*/ */
public function getOpeningBalanceAmount(Account $account): ?string public function getOpeningBalanceAmount(Account $account): ?string
{ {
@@ -748,7 +748,6 @@ class AccountRepository implements AccountRepositoryInterface
* @param array $data * @param array $data
* *
* @return Account * @return Account
* @throws FireflyException
*/ */
public function update(Account $account, array $data): Account public function update(Account $account, array $data): Account
{ {

View File

@@ -195,7 +195,7 @@ interface AccountRepositoryInterface
* *
* @param Account $account * @param Account $account
* *
* @return string * @return string|null
*/ */
public function getOpeningBalanceAmount(Account $account): ?string; public function getOpeningBalanceAmount(Account $account): ?string;

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