Skip to content

Commit

Permalink
TASK: Trivial cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Dec 9, 2024
1 parent c411209 commit 90adfaa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ private static function fromDatabase(array $row): Subscription
$subscriptionError = null;
}
$lastSavedAt = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $row['last_saved_at']);
assert($lastSavedAt instanceof DateTimeImmutable);
if ($lastSavedAt === false) {
throw new \RuntimeException(sprintf('last_saved_at %s is not a valid date', $row['last_saved_at']), 1733602968);
}

return new Subscription(
SubscriptionId::fromString($row['id']),
Expand Down

0 comments on commit 90adfaa

Please sign in to comment.