Remove references to static class.

This commit is contained in:
James Cole
2023-10-29 06:36:37 +01:00
parent 4f2159b54d
commit 9a17a11b37
277 changed files with 189 additions and 466 deletions

View File

@@ -42,36 +42,36 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class Account
*
* @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 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
* @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 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()
@@ -91,19 +91,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static EloquentBuilder|Account whereVirtualBalance($value)
* @method static Builder|Account withTrashed()
* @method static Builder|Account withoutTrashed()
* @property Carbon $lastActivityDate
* @property string $startBalance
* @property string $endBalance
* @property string $difference
* @property string $interest
* @property string $interestPeriod
* @property string $accountTypeString
* @property Location $location
* @property string $liability_direction
* @property string $current_debt
* @property int|null $user_group_id
* @property Carbon $lastActivityDate
* @property string $startBalance
* @property string $endBalance
* @property string $difference
* @property string $interest
* @property string $interestPeriod
* @property string $accountTypeString
* @property Location $location
* @property string $liability_direction
* @property string $current_debt
* @property int|null $user_group_id
* @method static EloquentBuilder|Account whereUserGroupId($value)
* @property-read UserGroup|null $userGroup
* @property-read UserGroup|null $userGroup
* @mixin Eloquent
*/
class Account extends Model

View File

@@ -37,23 +37,23 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionCurrency
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property bool $enabled
* @property bool $userDefault
* @property bool $userEnabled
* @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
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property bool $enabled
* @property bool $userDefault
* @property bool $userEnabled
* @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()
@@ -69,10 +69,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereUpdatedAt($value)
* @method static Builder|TransactionCurrency withTrashed()
* @method static Builder|TransactionCurrency withoutTrashed()
* @property-read Collection<int, UserGroup> $userGroups
* @property-read int|null $user_groups_count
* @property-read Collection<int, User> $users
* @property-read int|null $users_count
* @property-read Collection<int, UserGroup> $userGroups
* @property-read int|null $user_groups_count
* @property-read Collection<int, User> $users
* @property-read int|null $users_count
* @mixin Eloquent
*/
class TransactionCurrency extends Model
@@ -116,14 +116,6 @@ class TransactionCurrency extends Model
throw new NotFoundHttpException();
}
/**
* @return HasMany
*/
public function budgetLimits(): HasMany
{
return $this->hasMany(BudgetLimit::class);
}
/**
* @param User $user
*
@@ -137,6 +129,14 @@ class TransactionCurrency extends Model
$this->userEnabled = null !== $current;
}
/**
* @return HasMany
*/
public function budgetLimits(): HasMany
{
return $this->hasMany(BudgetLimit::class);
}
/**
* @return HasMany
*/

View File

@@ -32,7 +32,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**

View File

@@ -41,50 +41,50 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\TransactionJournal
*
* @property int $id
* @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 int|null $transaction_group_id
* @property int|null $bill_id
* @property int|null $transaction_currency_id
* @property string $description
* @property Carbon $date
* @property Carbon|null $interest_date
* @property Carbon|null $book_date
* @property Carbon|null $process_date
* @property int $order
* @property int $tag_count
* @property string $transaction_type_type
* @property bool $encrypted
* @property bool $completed
* @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read Bill|null $bill
* @property-read Collection|Budget[] $budgets
* @property-read int|null $budgets_count
* @property-read Collection|Category[] $categories
* @property-read int|null $categories_count
* @property-read Collection|TransactionJournalLink[] $destJournalLinks
* @property-read int|null $dest_journal_links_count
* @property-read Collection|Note[] $notes
* @property-read int|null $notes_count
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
* @property-read int|null $piggy_bank_events_count
* @property-read Collection|TransactionJournalLink[] $sourceJournalLinks
* @property-read int|null $source_journal_links_count
* @property-read Collection|Tag[] $tags
* @property-read int|null $tags_count
* @property-read TransactionCurrency|null $transactionCurrency
* @property-read TransactionGroup|null $transactionGroup
* @property-read Collection|TransactionJournalMeta[] $transactionJournalMeta
* @property-read int|null $transaction_journal_meta_count
* @property-read TransactionType $transactionType
* @property-read Collection|Transaction[] $transactions
* @property-read int|null $transactions_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 int $transaction_type_id
* @property int|null $transaction_group_id
* @property int|null $bill_id
* @property int|null $transaction_currency_id
* @property string $description
* @property Carbon $date
* @property Carbon|null $interest_date
* @property Carbon|null $book_date
* @property Carbon|null $process_date
* @property int $order
* @property int $tag_count
* @property string $transaction_type_type
* @property bool $encrypted
* @property bool $completed
* @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read Bill|null $bill
* @property-read Collection|Budget[] $budgets
* @property-read int|null $budgets_count
* @property-read Collection|Category[] $categories
* @property-read int|null $categories_count
* @property-read Collection|TransactionJournalLink[] $destJournalLinks
* @property-read int|null $dest_journal_links_count
* @property-read Collection|Note[] $notes
* @property-read int|null $notes_count
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
* @property-read int|null $piggy_bank_events_count
* @property-read Collection|TransactionJournalLink[] $sourceJournalLinks
* @property-read int|null $source_journal_links_count
* @property-read Collection|Tag[] $tags
* @property-read int|null $tags_count
* @property-read TransactionCurrency|null $transactionCurrency
* @property-read TransactionGroup|null $transactionGroup
* @property-read Collection|TransactionJournalMeta[] $transactionJournalMeta
* @property-read int|null $transaction_journal_meta_count
* @property-read TransactionType $transactionType
* @property-read Collection|Transaction[] $transactions
* @property-read int|null $transactions_count
* @property-read User $user
* @method static EloquentBuilder|TransactionJournal after(Carbon $date)
* @method static EloquentBuilder|TransactionJournal before(Carbon $date)
* @method static EloquentBuilder|TransactionJournal newModelQuery()
@@ -112,13 +112,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static EloquentBuilder|TransactionJournal whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withTrashed()
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withoutTrashed()
* @property-read Collection|Location[] $locations
* @property-read int|null $locations_count
* @property int $the_count
* @property int|null $user_group_id
* @property-read Collection|Location[] $locations
* @property-read int|null $locations_count
* @property int $the_count
* @property int|null $user_group_id
* @method static EloquentBuilder|TransactionJournal whereUserGroupId($value)
* @property-read Collection<int, AuditLogEntry> $auditLogEntries
* @property-read int|null $audit_log_entries_count
* @property-read Collection<int, AuditLogEntry> $auditLogEntries
* @property-read int|null $audit_log_entries_count
* @mixin Eloquent
*/
class TransactionJournal extends Model

View File

@@ -39,13 +39,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class UserGroup
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property string|null $deleted_at
* @property string $title
* @property-read Collection|GroupMembership[] $groupMemberships
* @property-read int|null $group_memberships_count
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property string|null $deleted_at
* @property string $title
* @property-read Collection|GroupMembership[] $groupMemberships
* @property-read int|null $group_memberships_count
* @method static Builder|UserGroup newModelQuery()
* @method static Builder|UserGroup newQuery()
* @method static Builder|UserGroup query()
@@ -54,8 +54,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|UserGroup whereId($value)
* @method static Builder|UserGroup whereTitle($value)
* @method static Builder|UserGroup whereUpdatedAt($value)
* @property-read Collection<int, Account> $accounts
* @property-read int|null $accounts_count
* @property-read Collection<int, Account> $accounts
* @property-read int|null $accounts_count
* @property-read Collection<int, AvailableBudget> $availableBudgets
* @property-read int|null $available_budgets_count
* @property-read Collection<int, Bill> $bills
@@ -77,17 +77,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property-read Collection<int, Recurrence> $recurrences
* @property-read int|null $recurrences_count
* @property-read Collection<int, RuleGroup> $ruleGroups
* @property-read int|null $rule_groups_count
* @property-read Collection<int, Rule> $rules
* @property-read int|null $rules_count
* @property-read Collection<int, Tag> $tags
* @property-read int|null $tags_count
* @property-read Collection<int, TransactionGroup> $transactionGroups
* @property-read int|null $transaction_groups_count
* @property-read Collection<int, Webhook> $webhooks
* @property-read int|null $webhooks_count
* @property-read Collection<int, TransactionCurrency> $currencies
* @property-read int|null $currencies_count
* @property-read int|null $rule_groups_count
* @property-read Collection<int, Rule> $rules
* @property-read int|null $rules_count
* @property-read Collection<int, Tag> $tags
* @property-read int|null $tags_count
* @property-read Collection<int, TransactionGroup> $transactionGroups
* @property-read int|null $transaction_groups_count
* @property-read Collection<int, Webhook> $webhooks
* @property-read int|null $webhooks_count
* @property-read Collection<int, TransactionCurrency> $currencies
* @property-read int|null $currencies_count
* @mixin Eloquent
*/
class UserGroup extends Model