Skip to content

Commit

Permalink
fix: correct return type.
Browse files Browse the repository at this point in the history
fixes #17
  • Loading branch information
chiqui3d committed Aug 9, 2024
1 parent 433a039 commit e4264ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Domain/Model/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e4264ec

Please sign in to comment.