Skip to content

Commit e8e6a1d

Browse files
Merge branch '5.4' into 6.2
* 5.4: CS fix Fix test provider
2 parents a3fedae + c8336db commit e8e6a1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, i
142142
{
143143
$output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag());
144144

145-
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
145+
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) {
146146
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
147147
// http://www.yaml.org/spec/1.2/spec.html#id2793979
148148
$blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : '';

0 commit comments

Comments
 (0)