Various code cleanup.

This commit is contained in:
James Cole 2021-05-24 08:50:17 +02:00
parent 3ec9753808
commit 815fd5ff6b
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
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.
*
* @return JsonResponse
* @throws FireflyException
* @codeCoverageIgnore
*/
public function index(): JsonResponse

View File

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

View File

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

View File

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

View File

@ -61,6 +61,7 @@ class MessageController extends Controller
* @param Webhook $webhook
*
* @return JsonResponse
* @throws FireflyException
*/
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.
*
* @return JsonResponse
* @throws \FireflyIII\Exceptions\FireflyException
* @codeCoverageIgnore
*/
public function index(): JsonResponse

View File

@ -73,6 +73,6 @@ class SubmitController extends Controller
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'),
'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'],
];
$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
*
* @return int
* @throws JsonException
*/
private function correctJournal(TransactionJournal $journal): int
{
@ -146,7 +147,6 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param Account $account
*
* @return TransactionCurrency
* @throws JsonException
*/
private function getCurrency(Account $account): TransactionCurrency
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -46,7 +46,7 @@ class AttachmentFactory
public function create(array $data): ?Attachment
{
// append if necessary.
$model = false === strpos($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\\Models\\%s', $data['attachable_type'])
$model = !str_contains($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\\Models\\%s', $data['attachable_type'])
: $data['attachable_type'];
// get journal instead of transaction.

View File

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

View File

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

View File

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

View File

@ -146,6 +146,7 @@ class TransactionJournalFactory
* @return TransactionJournal|null
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws \JsonException
*/
private function createJournal(NullArrayObject $row): ?TransactionJournal
{
@ -294,16 +295,17 @@ class TransactionJournalFactory
* @param NullArrayObject $row
*
* @return string
* @throws \JsonException
*/
private function hashArray(NullArrayObject $row): string
{
$dataRow = $row->getArrayCopy();
unset($dataRow['import_hash_v2'], $dataRow['original_source']);
$json = json_encode($dataRow, JSON_THROW_ON_ERROR, 512);
$json = json_encode($dataRow, JSON_THROW_ON_ERROR);
if (false === $json) {
$json = json_encode((string)microtime(), JSON_THROW_ON_ERROR, 512);
$json = json_encode((string)microtime(), JSON_THROW_ON_ERROR);
Log::error(sprintf('Could not hash the original row! %s', json_last_error_msg()), $dataRow);
}
@ -319,6 +321,7 @@ class TransactionJournalFactory
* @param string $hash
*
* @throws DuplicateTransactionException
* @throws \JsonException
*/
private function errorIfDuplicate(string $hash): void
{
@ -417,7 +420,7 @@ class TransactionJournalFactory
/**
* Set foreign currency to NULL if it's the same as the normal currency:
*
* @param TransactionCurrency $currency
* @param TransactionCurrency|null $currency
* @param TransactionCurrency|null $foreignCurrency
*
* @return TransactionCurrency|null

View File

@ -19,7 +19,6 @@
* 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/>.
*/
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);

View File

@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Audit;
@ -33,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\ArrayShape;
use Log;
use Throwable;
@ -197,9 +196,9 @@ class MonthReportGenerator implements ReportGeneratorInterface
*
* @return array
*
* @throws FireflyException
*/
public function getAuditReport(Account $account, Carbon $date): array
#[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string",
'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array
{
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -51,9 +51,9 @@ abstract class Controller extends BaseController
public function __construct()
{
// is site a demo site?
$isDemoSiteConfig = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', false,),);
$isDemoSiteConfig = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', false));
$isDemoSite = $isDemoSiteConfig ? $isDemoSiteConfig->data : false;
app('view')->share('IS_DEMO_SITE', $isDemoSite,);
app('view')->share('IS_DEMO_SITE', $isDemoSite);
app('view')->share('DEMO_USERNAME', config('firefly.demo_username'));
app('view')->share('DEMO_PASSWORD', config('firefly.demo_password'));
app('view')->share('FF_VERSION', config('firefly.version'));
@ -76,12 +76,12 @@ abstract class Controller extends BaseController
// share is alpha, is beta
$isAlpha = false;
if (false !== strpos(config('firefly.version'), 'alpha')) {
if (str_contains(config('firefly.version'), 'alpha')) {
$isAlpha = true;
}
$isBeta = false;
if (false !== strpos(config('firefly.version'), 'beta')) {
if (str_contains(config('firefly.version'), 'beta')) {
$isBeta = true;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -172,7 +172,7 @@ class EventServiceProvider extends ServiceProvider
$ipAddress = Request::ip();
// see if user has alternative email address:
$pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
$pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
if (null !== $pref) {
$email = $pref->data;
}

View File

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

View File

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

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