Skip to content

Commit

Permalink
small code dedup
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Korba <wirone@gmail.com>
  • Loading branch information
mvorisek and Wirone committed Jan 10, 2024
1 parent 7da8929 commit ba71ac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Fixer/StringNotation/MultilineStringToHeredocFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ private function convertStringToHeredoc(Tokens $tokens, int $stringStartIndex, i
$closingMarker .= '_';
}

$heredocStartToken = new Token([T_START_HEREDOC, '<<<'.($isSingleQuoted ? '\'' : '').$closingMarker.($isSingleQuoted ? '\'' : '')."\n"]);
$quoting = $isSingleQuoted ? '\'' : '';
$heredocStartToken = new Token([T_START_HEREDOC, '<<<'.$quoting.$closingMarker.$quoting."\n"]);
$heredocEndToken = new Token([T_END_HEREDOC, $closingMarker]);

if (null !== $constantStringToken) {
Expand Down

0 comments on commit ba71ac8

Please sign in to comment.