@@ -181,9 +181,9 @@ |
||
| 181 | 181 | return; |
| 182 | 182 | } |
| 183 | 183 | if (in_array($first, ['{', '['])) { |
| 184 | - $this->onCompact(trim($nodeValue)); |
|
| 185 | - return; |
|
| 186 | - } |
|
| 184 | + $this->onCompact(trim($nodeValue)); |
|
| 185 | + return; |
|
| 186 | + } |
|
| 187 | 187 | if (in_array($first, ['!', '&', '*'])) { |
| 188 | 188 | $this->onNodeAction($nodeValue); |
| 189 | 189 | return; |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } else { |
| 175 | 175 | $tmpString = null;//var_dump("PAS ICI"); |
| 176 | 176 | foreach ($node as $key => $child) { |
| 177 | - if ($child->type & (Y::SCALAR|Y::QUOTED)) { |
|
| 177 | + if ($child->type & (Y::SCALAR|Y::QUOTED)) { |
|
| 178 | 178 | if ($parent) { |
| 179 | 179 | $parent->setText(self::build($child, $parent)); |
| 180 | 180 | } else { |
@@ -214,11 +214,11 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | if ($type & Y::COMMENT) self::$_root->addComment($node->line, $node->value); |
| 216 | 216 | $typesActions = [Y::DIRECTIVE => 'buildDirective', |
| 217 | - Y::ITEM => 'buildItem', |
|
| 218 | - Y::KEY => 'buildKey', |
|
| 219 | - Y::SET_KEY => 'buildSetKey', |
|
| 220 | - Y::SET_VALUE => 'buildSetValue', |
|
| 221 | - Y::TAG => 'buildTag', |
|
| 217 | + Y::ITEM => 'buildItem', |
|
| 218 | + Y::KEY => 'buildKey', |
|
| 219 | + Y::SET_KEY => 'buildSetKey', |
|
| 220 | + Y::SET_VALUE => 'buildSetValue', |
|
| 221 | + Y::TAG => 'buildTag', |
|
| 222 | 222 | ]; |
| 223 | 223 | if (isset($typesActions[$type])) { |
| 224 | 224 | return self::{$typesActions[$type]}($node, $parent); |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | return $n->value; |
| 32 | 32 | } |
| 33 | 33 | $expected = [//Y::JSON => $n->value, //json_decode($n->value, false, 512, JSON_PARTIAL_OUTPUT_ON_ERROR), |
| 34 | - Y::QUOTED => trim($n->value, "\"'"), |
|
| 35 | - Y::RAW => strval($n->value)]; |
|
| 34 | + Y::QUOTED => trim($n->value, "\"'"), |
|
| 35 | + Y::RAW => strval($n->value)]; |
|
| 36 | 36 | return $expected[$n->type] ?? null; |
| 37 | 37 | } |
| 38 | 38 | |