diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index c142a1c2..7d4fedba 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -48,3 +48,11 @@ jobs: with: composer-root-version: "5.x-dev" upcoming-releases: true + + integration-tests: + name: "Integration test" + uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.8" + with: + composer-root-version: "5.x-dev" + upcoming-releases: true + test-suite: "integration" diff --git a/src/DocBlock/Tags/Factory/AbstractPHPStanFactory.php b/src/DocBlock/Tags/Factory/AbstractPHPStanFactory.php index e5b4e413..f8bababf 100644 --- a/src/DocBlock/Tags/Factory/AbstractPHPStanFactory.php +++ b/src/DocBlock/Tags/Factory/AbstractPHPStanFactory.php @@ -73,15 +73,13 @@ public function __construct(PHPStanFactory ...$factories) public function create(string $tagLine, ?TypeContext $context = null): Tag { - $tokens = $this->tokenizeLine($tagLine); + $tokens = $this->tokenizeLine($tagLine . "\n"); $ast = $this->parser->parseTag($tokens); - if (class_exists(ParserConfig::class) === false) { - if (property_exists($ast->value, 'description') === true) { - $ast->value->setAttribute( - 'description', - $ast->value->description . $tokens->joinUntil(Lexer::TOKEN_END) - ); - } + if (property_exists($ast->value, 'description') === true) { + $ast->value->setAttribute( + 'description', + rtrim($ast->value->description . $tokens->joinUntil(Lexer::TOKEN_END), "\n") + ); } if ($context === null) {