[yaml] Delelte unused comparison operation
This commit is contained in:
parent
945c7c590c
commit
3ef7bfd972
@ -68,7 +68,7 @@ class Dumper
|
|||||||
$output .= "\n";
|
$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
|
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
|
||||||
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|
||||||
$blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : '';
|
$blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : '';
|
||||||
@ -97,7 +97,7 @@ class Dumper
|
|||||||
if ($value instanceof TaggedValue) {
|
if ($value instanceof TaggedValue) {
|
||||||
$output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
|
$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
|
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
|
||||||
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|
||||||
$blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : '';
|
$blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : '';
|
||||||
|
Reference in New Issue
Block a user