Skip to content

Commit

Permalink
Updated Rector to commit a966fc32547f286a7eab86934e503aed8daa4772
Browse files Browse the repository at this point in the history
rectorphp/rector-src@a966fc3 [Printer] Use NewLineSplitter on BetterStandardPrinter for heredoc/nowdoc removal space (#6485)
  • Loading branch information
TomasVotruba committed Nov 23, 2024
1 parent 57831bc commit faaa1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'bd59f6b9e32ad4fce96b3a0d12467719015d8282';
public const PACKAGE_VERSION = 'a966fc32547f286a7eab86934e503aed8daa4772';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-11-23 23:10:35';
public const RELEASE_DATE = '2024-11-23 16:33:58';
/**
* @var int
*/
Expand Down
5 changes: 3 additions & 2 deletions src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Rector\Configuration\Parameter\SimpleParameterProvider;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace;
use Rector\Util\NewLineSplitter;
/**
* @see \Rector\Tests\PhpParser\Printer\BetterStandardPrinterTest
*
Expand Down Expand Up @@ -240,7 +241,7 @@ protected function pScalar_String(String_ $string) : string
{
if ($string->getAttribute(AttributeKey::DOC_INDENTATION) === '__REMOVED__') {
$content = parent::pScalar_String($string);
$lines = \explode("\n", $content);
$lines = NewLineSplitter::split($content);
$trimmedLines = \array_map('ltrim', $lines);
return \implode("\n", $trimmedLines);
}
Expand Down Expand Up @@ -278,7 +279,7 @@ protected function pScalar_InterpolatedString(InterpolatedString $interpolatedSt
{
$content = parent::pScalar_InterpolatedString($interpolatedString);
if ($interpolatedString->getAttribute(AttributeKey::DOC_INDENTATION) === '__REMOVED__') {
$lines = \explode("\n", $content);
$lines = NewLineSplitter::split($content);
$trimmedLines = \array_map('ltrim', $lines);
return \implode("\n", $trimmedLines);
}
Expand Down

0 comments on commit faaa1b5

Please sign in to comment.