@@ -74,7 +74,7 @@ |
||
74 | 74 | switch (gettype($dataType)) { |
75 | 75 | case 'boolean': return $dataType ? 'true' : 'false'; |
76 | 76 | case 'float': if (is_infinite($dataType)) return $dataType > 0 ? '.inf' : '-.inf'; |
77 | - return sprintf('%.2F', $dataType); |
|
77 | + return sprintf('%.2F', $dataType); |
|
78 | 78 | case 'double': if (is_nan((float) $dataType)) return '.nan'; |
79 | 79 | default: |
80 | 80 | return $dataType; |
@@ -89,11 +89,11 @@ |
||
89 | 89 | |
90 | 90 | if ($type & Y::COMMENT) self::$_root->addComment($node->line, $node->value); |
91 | 91 | $typesActions = [Y::DIRECTIVE => 'buildDirective', |
92 | - Y::ITEM => 'buildItem', |
|
93 | - Y::KEY => 'buildKey', |
|
94 | - Y::SET_KEY => 'buildSetKey', |
|
95 | - Y::SET_VALUE => 'buildSetValue', |
|
96 | - Y::TAG => 'buildTag', |
|
92 | + Y::ITEM => 'buildItem', |
|
93 | + Y::KEY => 'buildKey', |
|
94 | + Y::SET_KEY => 'buildSetKey', |
|
95 | + Y::SET_VALUE => 'buildSetValue', |
|
96 | + Y::TAG => 'buildTag', |
|
97 | 97 | ]; |
98 | 98 | if (isset($typesActions[$type])) { |
99 | 99 | return self::{$typesActions[$type]}($node, $parent); |
@@ -178,9 +178,9 @@ |
||
178 | 178 | return; |
179 | 179 | } |
180 | 180 | if (in_array($first, ['{', '['])) { |
181 | - $this->onCompact($nodeValue); |
|
182 | - return; |
|
183 | - } |
|
181 | + $this->onCompact($nodeValue); |
|
182 | + return; |
|
183 | + } |
|
184 | 184 | if (in_array($first, ['!', '&', '*'])) { |
185 | 185 | $this->onNodeAction($nodeValue); |
186 | 186 | return; |
@@ -26,8 +26,8 @@ |
||
26 | 26 | if ($n->type & (Y::COMPACT_MAPPING | Y::COMPACT_SEQUENCE)) |
27 | 27 | return self::getCompact(substr($n->value, 1, -1), $n->type); |
28 | 28 | $expected = [Y::JSON => json_decode($n->value, false, 512, JSON_PARTIAL_OUTPUT_ON_ERROR), |
29 | - Y::QUOTED => trim($n->value, "\"'"), |
|
30 | - Y::RAW => strval($n->value)]; |
|
29 | + Y::QUOTED => trim($n->value, "\"'"), |
|
30 | + Y::RAW => strval($n->value)]; |
|
31 | 31 | return $expected[$n->type] ?? null; |
32 | 32 | } |
33 | 33 |