8000 applied fixes from https://fabbot.io/report/symfony/symfony/59315/302… · symfony/symfony@cb39e18 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb39e18

Browse files
author
gr8b
committed
1 parent 7a22204 commit cb39e18

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/Symfony/Component/Yaml/Dumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function doDump(mixed $input, int $inline = 0, int $indent = 0, int $fla
133133
$willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || !$value;
134134

135135
if (!$willBeInlined && $compactNestedMapping && \is_array($value)) {
136-
$output .= $prefix.'- '.\substr(
136+
$output .= $prefix.'- '.substr(
137137
$this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + 2, $flags),
138138
$indent + 2
139139
);

src/Symfony/Component/Yaml/Tests/DumperTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,19 +1071,19 @@ public static function getDumpCompactNestedMapping()
10711071
'properties' => [
10721072
['name' => 'size', 'value' => 4879],
10731073
['name' => 'moons', 'value' => 0],
1074-
[[[]]]
1075-
]
1074+
[[[]]],
1075+
],
10761076
],
10771077
[
10781078
'name' => 'Jupiter',
10791079
'distance' => 778500000,
10801080
'properties' => [
10811081
['name' => 'size', 'value' => 139820],
10821082
['name' => 'moons', 'value' => 79],
1083-
[[]]
1084-
]
1085-
]
1086-
]
1083+
[[]],
1084+
],
1085+
],
1086+
],
10871087
];
10881088
$expected = <<<YAML
10891089
planets:
@@ -1106,11 +1106,11 @@ public static function getDumpCompactNestedMapping()
11061106
11071107
YAML;
11081108

1109-
for ($indentation = 1; $indentation < 5; $indentation++) {
1109+
for ($indentation = 1; $indentation < 5; ++$indentation) {
11101110
yield \sprintf('Compact nested mapping %d', $indentation) => [
11111111
$data,
1112-
\strtr($expected, ["\t" => \str_repeat(' ', $indentation)]),
1113-
$indentation
1112+
strtr($expected, ["\t" => str_repeat(' ', $indentation)]),
1113+
$indentation,
11141114
];
11151115
}
11161116

@@ -1137,7 +1137,7 @@ public static function getDumpCompactNestedMapping()
11371137
$data,
11381138
$expected,
11391139
$indentation,
1140-
$inline
1140+
$inline,
11411141
];
11421142
}
11431143

0 commit comments

Comments
 (0)
0