mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-23 03:02:33 +01:00
fix cs
This commit is contained in:
parent
de22d86962
commit
d5f87f5e82
@ -5,9 +5,7 @@ namespace Rector\BetterPhpDocParser\PhpDocParser;
|
||||
use Nette\Utils\Strings;
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use PHPStan\PhpDocParser\Parser\ConstExprParser;
|
||||
use PHPStan\PhpDocParser\Parser\ParserException;
|
||||
@ -15,9 +13,7 @@ use PHPStan\PhpDocParser\Parser\PhpDocParser;
|
||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
use PHPStan\PhpDocParser\Parser\TypeParser;
|
||||
use Rector\BetterPhpDocParser\Attributes\Ast\AttributeAwareNodeFactory;
|
||||
use Rector\BetterPhpDocParser\Attributes\Ast\PhpDoc\AttributeAwareGenericTagValueNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\Ast\PhpDoc\AttributeAwarePhpDocNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\Ast\PhpDoc\AttributeAwarePhpDocTagNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\Attribute\Attribute;
|
||||
use Rector\BetterPhpDocParser\Data\StartEndInfo;
|
||||
use Rector\BetterPhpDocParser\Printer\MultilineSpaceFormatPreserver;
|
||||
|
@ -232,7 +232,11 @@ 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, '#' . preg_quote($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 . ' * ');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user