From e4264ec355f4ed9f4bea30d66cd79bd8657f4ddf Mon Sep 17 00:00:00 2001 From: chiqui3d Date: Fri, 9 Aug 2024 23:58:23 +0200 Subject: [PATCH] fix: correct return type. fixes #17 --- src/Domain/Model/Media.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Domain/Model/Media.php b/src/Domain/Model/Media.php index 2ca5299..524bd92 100644 --- a/src/Domain/Model/Media.php +++ b/src/Domain/Model/Media.php @@ -90,8 +90,9 @@ public static function create( UserIdentifier $userIdentifier, Dimension $dimension, Description $description - ): self { - $media = new self($id, $file, $userIdentifier, $dimension, $description); + ): static { + /** @phpstan-ignore-next-line */ + $media = new static($id, $file, $userIdentifier, $dimension, $description); $now = new \DateTimeImmutable(); $media->createdAt = $now; $media->updatedAt = $now;