Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -16,7 +16,9 @@
*/
class SshKey extends AbstractModel
{
/** @use HasFactory<\Database\Factories\SshKeyFactory> */
use HasFactory;
use SoftDeletes;
protected $fillable = [
@ -30,11 +32,17 @@ class SshKey extends AbstractModel
'public_key' => 'encrypted',
];
/**
* @return BelongsTo<User, covariant $this>
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* @return BelongsToMany<Server, covariant $this>
*/
public function servers(): BelongsToMany
{
return $this->belongsToMany(Server::class, 'server_ssh_keys')