mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fixes #7175
This commit is contained in:
@@ -90,7 +90,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static EloquentBuilder|Account whereVirtualBalance($value)
|
||||
* @method static Builder|Account withTrashed()
|
||||
* @method static Builder|Account withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property Carbon $lastActivityDate
|
||||
* @property string $startBalance
|
||||
* @property string $endBalance
|
||||
@@ -103,6 +102,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @property string $current_debt
|
||||
* @property int|null $user_group_id
|
||||
* @method static EloquentBuilder|Account whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Account extends Model
|
||||
{
|
||||
|
@@ -78,9 +78,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserId($value)
|
||||
* @method static Builder|Attachment withTrashed()
|
||||
* @method static Builder|Attachment withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Attachment extends Model
|
||||
{
|
||||
|
@@ -42,7 +42,6 @@ use Illuminate\Support\Carbon;
|
||||
* @method static Builder|AuditLogEntry query()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
@@ -65,6 +64,7 @@ use Illuminate\Support\Carbon;
|
||||
* @method static Builder|AuditLogEntry whereDeletedAt($value)
|
||||
* @method static Builder|AuditLogEntry whereId($value)
|
||||
* @method static Builder|AuditLogEntry whereUpdatedAt($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class AuditLogEntry extends Model
|
||||
{
|
||||
|
@@ -62,9 +62,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserId($value)
|
||||
* @method static Builder|AvailableBudget withTrashed()
|
||||
* @method static Builder|AvailableBudget withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class AvailableBudget extends Model
|
||||
{
|
||||
|
@@ -95,9 +95,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserId($value)
|
||||
* @method static Builder|Bill withTrashed()
|
||||
* @method static Builder|Bill withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Bill extends Model
|
||||
{
|
||||
|
@@ -74,12 +74,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserId($value)
|
||||
* @method static Builder|Budget withTrashed()
|
||||
* @method static Builder|Budget withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property string $email
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value)
|
||||
* @property-read Collection|Note[] $notes
|
||||
* @property-read int|null $notes_count
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Budget extends Model
|
||||
{
|
||||
|
@@ -68,9 +68,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereUserId($value)
|
||||
* @method static Builder|Category withTrashed()
|
||||
* @method static Builder|Category withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
|
@@ -60,9 +60,9 @@ use Illuminate\Support\Carbon;
|
||||
* @method static Builder|CurrencyExchangeRate whereUpdatedAt($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereUserId($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereUserRate($value)
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static Builder|CurrencyExchangeRate whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class CurrencyExchangeRate extends Model
|
||||
{
|
||||
|
@@ -30,6 +30,7 @@ use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class InvitedUser
|
||||
@@ -38,7 +39,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
* @method static Builder|InvitedUser newModelQuery()
|
||||
* @method static Builder|InvitedUser newQuery()
|
||||
* @method static Builder|InvitedUser query()
|
||||
* @mixin Eloquent
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
@@ -55,6 +55,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
* @method static Builder|InvitedUser whereRedeemed($value)
|
||||
* @method static Builder|InvitedUser whereUpdatedAt($value)
|
||||
* @method static Builder|InvitedUser whereUserId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class InvitedUser extends Model
|
||||
{
|
||||
@@ -72,4 +73,25 @@ class InvitedUser extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Route binder. Converts the key in the URL to the specified object (or throw 404).
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return WebhookAttempt
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): InvitedUser
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$attemptId = (int)$value;
|
||||
/** @var InvitedUser $attempt */
|
||||
$attempt = self::find($attemptId);
|
||||
if (null !== $attempt) {
|
||||
return $attempt;
|
||||
}
|
||||
}
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
}
|
||||
|
@@ -85,9 +85,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserId($value)
|
||||
* @method static Builder|Recurrence withTrashed()
|
||||
* @method static Builder|Recurrence withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Recurrence extends Model
|
||||
{
|
||||
|
@@ -73,10 +73,10 @@ use Illuminate\Support\Carbon;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereUpdatedAt($value)
|
||||
* @method static Builder|RecurrenceTransaction withTrashed()
|
||||
* @method static Builder|RecurrenceTransaction withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $transaction_type_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value)
|
||||
* @property-read TransactionType|null $transactionType
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class RecurrenceTransaction extends Model
|
||||
{
|
||||
|
@@ -74,9 +74,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserId($value)
|
||||
* @method static Builder|Rule withTrashed()
|
||||
* @method static Builder|Rule withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Rule extends Model
|
||||
{
|
||||
|
@@ -66,9 +66,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserId($value)
|
||||
* @method static Builder|RuleGroup withTrashed()
|
||||
* @method static Builder|RuleGroup withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class RuleGroup extends Model
|
||||
{
|
||||
|
@@ -75,9 +75,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereZoomLevel($value)
|
||||
* @method static Builder|Tag withTrashed()
|
||||
* @method static Builder|Tag withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Tag extends Model
|
||||
{
|
||||
|
@@ -84,8 +84,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static Builder|Transaction whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|Transaction withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|Transaction withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int $the_count
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Transaction extends Model
|
||||
{
|
||||
|
@@ -59,9 +59,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserId($value)
|
||||
* @method static Builder|TransactionGroup withTrashed()
|
||||
* @method static Builder|TransactionGroup withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property int|null $user_group_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class TransactionGroup extends Model
|
||||
{
|
||||
|
@@ -112,12 +112,12 @@ 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()
|
||||
* @mixin Eloquent
|
||||
* @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)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class TransactionJournal extends Model
|
||||
{
|
||||
|
@@ -69,13 +69,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static Builder|Webhook whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|Webhook withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|Webhook withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
* @property string $title
|
||||
* @property string $secret
|
||||
* @method static Builder|Webhook whereSecret($value)
|
||||
* @method static Builder|Webhook whereTitle($value)
|
||||
* @property int|null $user_group_id
|
||||
* @method static Builder|Webhook whereUserGroupId($value)
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Webhook extends Model
|
||||
{
|
||||
|
@@ -55,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 Builder|WebhookAttempt onlyTrashed()
|
||||
* @method static Builder|WebhookAttempt withTrashed()
|
||||
* @method static Builder|WebhookAttempt withoutTrashed()
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class WebhookAttempt extends Model
|
||||
{
|
||||
|
@@ -63,9 +63,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @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
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class WebhookMessage extends Model
|
||||
{
|
||||
|
Reference in New Issue
Block a user