Skip to content

Commit 0e51ba0

Browse files
committed
use the original class not always DateTimeImmutable
1 parent c8abe28 commit 0e51ba0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Schema/AbstractSchemaInnerParse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ final protected function getDataType(mixed $input): string
127127
final protected function varExport(mixed $input): string
128128
{
129129
if ($input instanceof \DateTimeInterface) {
130-
return 'new \DateTimeImmutable(\''.$input->format('c').'\')';
130+
return 'new \\'.$input::class.'(\''.$input->format('c').'\')';
131131
}
132132

133133
if ($input instanceof \BackedEnum) {

0 commit comments

Comments
 (0)