Skip to content

Commit

Permalink
Merge branch '4.4' into 5.2
Browse files Browse the repository at this point in the history
* 4.4:
  Streamline dataproviders
  fix validator when we have a false current element
  [Mime] Fix case-sensitive handling in Headers::isUniqueHeader()
  [yaml] Delelte unused comparison operation
  • Loading branch information
fabpot committed Feb 3, 2021
2 parents 6bb8b36 + 0a04eb0 commit 338cddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0):
$output .= "\n";
}

if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) {
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) {
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
// http://www.yaml.org/spec/1.2/spec.html#id2793979
$blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : '';
Expand Down Expand Up @@ -97,7 +97,7 @@ public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0):
if ($value instanceof TaggedValue) {
$output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());

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

0 comments on commit 338cddc

Please sign in to comment.