fix phpstan

This commit is contained in:
Dan Harrin
2025-06-11 15:54:47 +01:00
parent 381eab4068
commit e98bdf0084
2 changed files with 2 additions and 20 deletions
+1 -10
View File
@@ -46,17 +46,8 @@ class Export extends Model
$authenticatable = app(Authenticatable::class);
if ($authenticatable) {
/** @phpstan-ignore-next-line */
return $this->belongsTo($authenticatable::class);
}
if (! class_exists(User::class)) {
throw new Exception('No [App\\Models\\User] model found. Please bind an authenticatable model to the [Illuminate\\Contracts\\Auth\\Authenticatable] interface in a service provider\'s [register()] method.');
}
/** @phpstan-ignore-next-line */
return $this->belongsTo(User::class);
return $this->belongsTo($authenticatable::class);
}
/**
+1 -10
View File
@@ -52,17 +52,8 @@ class Import extends Model
$authenticatable = app(Authenticatable::class);
if ($authenticatable) {
/** @phpstan-ignore-next-line */
return $this->belongsTo($authenticatable::class);
}
if (! class_exists(User::class)) {
throw new Exception('No [App\\Models\\User] model found. Please bind an authenticatable model to the [Illuminate\\Contracts\\Auth\\Authenticatable] interface in a service provider\'s [register()] method.');
}
/** @phpstan-ignore-next-line */
return $this->belongsTo(User::class);
return $this->belongsTo($authenticatable::class);
}
/**