Test Failed
Branch master (bee4a6)
by stéphane
14:37
created
src/NodeFactory.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
32 32
             $match => new Nodes\Key($nodeString, $line, $matches),
33 33
             default => self::onCharacter($trimmed[0], $nodeString, $line)
34 34
         };
35
-        if ($debug) echo $line . ":" . get_class($node) . "\n";
35
+        if ($debug) {
36
+            echo $line . ":" . get_class($node) . "\n";
37
+        }
36 38
         return $node;
37 39
     }
38 40
 
Please login to merge, or discard this patch.
src/DumperHandlers.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,12 @@
 block discarded – undo
26 26
 
27 27
     public function dumpScalar($dataType): string
28 28
     {
29
-        if ($dataType === \INF) return '.inf';
30
-        if ($dataType === -\INF) return '-.inf';
29
+        if ($dataType === \INF) {
30
+            return '.inf';
31
+        }
32
+        if ($dataType === -\INF) {
33
+            return '-.inf';
34
+        }
31 35
         $precision = "%." . $this->dumper->floatPrecision . "F";
32 36
         switch (gettype($dataType)) {
33 37
             case 'boolean':
Please login to merge, or discard this patch.
src/Dumper.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function toString($dataType, ?int $options = null): string
53 53
     {
54
-        if (empty($dataType)) throw new \Exception(self::class . ": No content to convert to Yaml");
54
+        if (empty($dataType)) {
55
+            throw new \Exception(self::class . ": No content to convert to Yaml");
56
+        }
55 57
         if (is_scalar($dataType)) {
56 58
             return "--- " . $this->handler->dumpScalar($dataType) . PHP_EOL;
57 59
         }
@@ -114,7 +116,7 @@  discard block
 block discarded – undo
114 116
         $pairs = [];
115 117
         if (count($properties) === 0) {
116 118
             return $this->handler->dumpArray($obj->getArrayCopy(), 0, false, true);
117
-        }else {
119
+        } else {
118 120
             return $this->handler->dumpObject($obj, 0, false, true);
119 121
         }
120 122
     }
Please login to merge, or discard this patch.