@@ -96,8 +96,8 @@ |
||
| 96 | 96 | private function dumpYamlObject(YamlObject $obj):string |
| 97 | 97 | { |
| 98 | 98 | if ($this->multipleDocs || $obj->hasDocStart() || $obj->isTagged()) { |
| 99 | - $this->multipleDocs = true; |
|
| 100 | - // && $this->$result instanceof DLL) $this->$result->push("---"); |
|
| 99 | + $this->multipleDocs = true; |
|
| 100 | + // && $this->$result instanceof DLL) $this->$result->push("---"); |
|
| 101 | 101 | } |
| 102 | 102 | if (count($obj) > 0) { |
| 103 | 103 | return $this->iteratorToString($obj, '-', 0); |
@@ -25,7 +25,9 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function __construct(int $options = null) |
| 27 | 27 | { |
| 28 | - if (is_int($options)) $this->options = $options; |
|
| 28 | + if (is_int($options)) { |
|
| 29 | + $this->options = $options; |
|
| 30 | + } |
|
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | |
@@ -45,8 +47,12 @@ discard block |
||
| 45 | 47 | |
| 46 | 48 | public function dumpScalar($dataType):string |
| 47 | 49 | { |
| 48 | - if ($dataType === \INF) return '.inf'; |
|
| 49 | - if ($dataType === -\INF) return '-.inf'; |
|
| 50 | + if ($dataType === \INF) { |
|
| 51 | + return '.inf'; |
|
| 52 | + } |
|
| 53 | + if ($dataType === -\INF) { |
|
| 54 | + return '-.inf'; |
|
| 55 | + } |
|
| 50 | 56 | $precision = "%.".$this->floatPrecision."F"; |
| 51 | 57 | switch (gettype($dataType)) { |
| 52 | 58 | case 'boolean': return $dataType ? 'true' : 'false'; |