mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-23 11:14:38 +01:00
commit
de22d86962
@ -232,8 +232,7 @@ final class PhpDocInfoPrinter
|
||||
if ($phpDocTagNode->getAttribute(Attribute::HAS_DESCRIPTION_WITH_ORIGINAL_SPACES)) {
|
||||
if (property_exists($phpDocTagNode->value, 'description') && $phpDocTagNode->value->description) {
|
||||
$pattern = Strings::replace($phpDocTagNode->value->description, '#[\s]+#', '\s+');
|
||||
$nodeOutput = Strings::replace($nodeOutput, '#' . $pattern . '#', $phpDocTagNode->value->description);
|
||||
|
||||
$nodeOutput = Strings::replace($nodeOutput, '#' . preg_quote($pattern, '#') . '#', $phpDocTagNode->value->description);
|
||||
if (substr_count($nodeOutput, "\n")) {
|
||||
$nodeOutput = Strings::replace($nodeOutput, "#\n#", PHP_EOL . ' * ');
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
/**
|
||||
* @param bool $setTicketAuthor @see self::create()
|
||||
*/
|
@ -66,6 +66,7 @@ final class PhpDocInfoPrinterTest extends AbstractKernelTestCase
|
||||
yield [__DIR__ . '/PhpDocInfoPrinterSource/doc11.txt'];
|
||||
yield [__DIR__ . '/PhpDocInfoPrinterSource/doc12.txt'];
|
||||
yield [__DIR__ . '/PhpDocInfoPrinterSource/doc13.txt'];
|
||||
yield [__DIR__ . '/PhpDocInfoPrinterSource/doc14.txt'];
|
||||
}
|
||||
|
||||
public function provideMultiline(): Iterator
|
||||
|
Loading…
x
Reference in New Issue
Block a user