Allow serializer to have a configurable line-ending

This commit is contained in:
Jaapio
2021-08-26 22:31:30 +02:00
parent bca4974b0b
commit c5e702d299
3 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ $factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);
// Create the serializer that will reconstitute the DocBlock back to its original form.
$serializer = new Serializer();
$serializer = new Serializer(0, '', true, null, null, PHP_EOL);
// Reconstitution is performed by the `getDocComment()` method.
$reconstitutedDocComment = $serializer->getDocComment($docblock);