mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Allow serializer to have a configurable line-ending
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -126,5 +126,5 @@ $customTagObjects = $docblock->getTagsByName('my-tag');
|
||||
|
||||
// As an experiment: let's reconstitute the DocBlock and observe that because we added a __toString() method
|
||||
// to the tag class that we can now also see it.
|
||||
$serializer = new Serializer();
|
||||
$serializer = new Serializer(0, '',true, null, null, PHP_EOL);
|
||||
$reconstitutedDocComment = $serializer->getDocComment($docblock);
|
||||
|
||||
Reference in New Issue
Block a user