Skip to content

Commit

Permalink
Fix missing newline
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 23, 2023
1 parent fa45101 commit a2b2413
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Parser/PhpDocParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode
$savepoint = true;
} elseif ($tmpText !== '') {
$tokens->dropSavePoint();
$savepoint = false;
$tokens->pushSavePoint();
}
}

Expand Down Expand Up @@ -329,7 +329,7 @@ private function parseOptionalDescriptionAfterDoctrineTag(TokenIterator $tokens)
$savepoint = true;
} elseif ($tmpText !== '') {
$tokens->dropSavePoint();
$savepoint = false;
$tokens->pushSavePoint();
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/PHPStan/Parser/PhpDocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6878,7 +6878,7 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocTextNode('Real description'),
new PhpDocTagNode('@param', new ParamTagValueNode(new IdentifierTypeNode('int'), false, '$a', PHP_EOL . ' test')),
new PhpDocTextNode(''),
//new PhpDocTextNode(''),
new PhpDocTextNode(''),
]),
];

Expand All @@ -6896,7 +6896,7 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocTagNode('@param', new ParamTagValueNode(new IdentifierTypeNode('int'), false, '$a', PHP_EOL . ' test')),
new PhpDocTextNode(''),
new PhpDocTextNode(''),
//new PhpDocTextNode(''),
new PhpDocTextNode(''),
]),
];

Expand All @@ -6912,7 +6912,7 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocNode([
new PhpDocTextNode('Real description'),
new PhpDocTagNode('@param', new ParamTagValueNode(new IdentifierTypeNode('int'), false, '$a', PHP_EOL . ' test' . PHP_EOL . PHP_EOL . 'test 2')),
//new PhpDocTextNode(''),
new PhpDocTextNode(''),
]),
];
yield [
Expand All @@ -6929,7 +6929,7 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocTextNode('Real description'),
new PhpDocTagNode('@param', new ParamTagValueNode(new IdentifierTypeNode('int'), false, '$a', PHP_EOL . ' test' . PHP_EOL . PHP_EOL . 'test 2')),
new PhpDocTextNode(''),
//new PhpDocTextNode(''),
new PhpDocTextNode(''),
]),
];

Expand All @@ -6947,7 +6947,7 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocTextNode('Real description'),
new PhpDocTagNode('@ORM\Column', new DoctrineTagValueNode(new DoctrineAnnotation('@ORM\Column', []), PHP_EOL . ' test' . PHP_EOL . PHP_EOL . 'test 2')),
new PhpDocTextNode(''),
//new PhpDocTextNode(''),
new PhpDocTextNode(''),
]),
];
}
Expand Down

0 comments on commit a2b2413

Please sign in to comment.