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

@ -23,6 +23,7 @@
*/
class File extends AbstractModel
{
/** @use HasFactory<\Database\Factories\FileFactory> */
use HasFactory;
protected $fillable = [
@ -53,7 +54,7 @@ protected static function boot(): void
{
parent::boot();
static::deleting(function (File $file) {
static::deleting(function (File $file): bool {
if ($file->name === '.' || $file->name === '..') {
return false;
}
@ -64,11 +65,17 @@ protected static function boot(): void
});
}
/**
* @return BelongsTo<Server, covariant $this>
*/
public function server(): BelongsTo
{
return $this->belongsTo(Server::class);
}
/**
* @return BelongsTo<User, covariant $this>
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);