Return passed value when setting db row value #16

Merged
vlw merged 1 commit from refs/pull/16/head into master 2025-12-01 13:56:43 +01:00
vlw commented 2025-12-01 13:56:14 +01:00 (Migrated from codeberg.org)

Closes #14

From the example in the issue, this can now be fixed like this:

final public DateTimeImmutable $date_created {
			get  => new DateTimeImmutable($this->get(Fields::DATE_CREATED->value));
			set (DateTimeImmutable $date_created) => new DateTimeImmutable(
			  $this->set(Fields::DATE_CREATED->value,
			  $date_created->format(Database::DATETIME_FORMAT)
			));
}
Closes #14 From the example in the issue, this can now be fixed like this: ```php final public DateTimeImmutable $date_created { get => new DateTimeImmutable($this->get(Fields::DATE_CREATED->value)); set (DateTimeImmutable $date_created) => new DateTimeImmutable( $this->set(Fields::DATE_CREATED->value, $date_created->format(Database::DATETIME_FORMAT) )); } ```
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/scaffold!16
No description provided.