type = 'string'; $property->format = 'date-time'; $this->setNullableProperty($types[0], $property); } public function supports(array $types): bool { return 1 === count($types) && Type::BUILTIN_TYPE_OBJECT === $types[0]->getBuiltinType() && is_a($types[0]->getClassName(), \DateTimeInterface::class, true); } }