diff --git a/src/ValueObject/DateTimeFactory.php b/src/ValueObject/DateTimeFactory.php index cf383c7..7d83514 100644 --- a/src/ValueObject/DateTimeFactory.php +++ b/src/ValueObject/DateTimeFactory.php @@ -208,6 +208,7 @@ public function methodToString(string $argumentName): NodeVisitor MethodGenerator::FLAG_PUBLIC, new BodyGenerator($this->parser, 'return $this->' . $argumentName . '->format(self::OUTPUT_FORMAT);') ); + $method->setTyped($this->typed); $method->setReturnType('string'); return new ClassMethod($method);