mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Merge pull request #409 from phpDocumentor/enable-integration-tests
Fix newline detection on descriptions
This commit is contained in:
@@ -48,3 +48,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
composer-root-version: "5.x-dev"
|
composer-root-version: "5.x-dev"
|
||||||
upcoming-releases: true
|
upcoming-releases: true
|
||||||
|
|
||||||
|
integration-tests:
|
||||||
|
name: "Integration test"
|
||||||
|
uses: "phpDocumentor/.github/.github/workflows/[email protected]"
|
||||||
|
with:
|
||||||
|
composer-root-version: "5.x-dev"
|
||||||
|
upcoming-releases: true
|
||||||
|
test-suite: "integration"
|
||||||
|
|||||||
@@ -73,15 +73,13 @@ class AbstractPHPStanFactory implements Factory
|
|||||||
|
|
||||||
public function create(string $tagLine, ?TypeContext $context = null): Tag
|
public function create(string $tagLine, ?TypeContext $context = null): Tag
|
||||||
{
|
{
|
||||||
$tokens = $this->tokenizeLine($tagLine);
|
$tokens = $this->tokenizeLine($tagLine . "\n");
|
||||||
$ast = $this->parser->parseTag($tokens);
|
$ast = $this->parser->parseTag($tokens);
|
||||||
if (class_exists(ParserConfig::class) === false) {
|
if (property_exists($ast->value, 'description') === true) {
|
||||||
if (property_exists($ast->value, 'description') === true) {
|
$ast->value->setAttribute(
|
||||||
$ast->value->setAttribute(
|
'description',
|
||||||
'description',
|
rtrim($ast->value->description . $tokens->joinUntil(Lexer::TOKEN_END), "\n")
|
||||||
$ast->value->description . $tokens->joinUntil(Lexer::TOKEN_END)
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($context === null) {
|
if ($context === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user