Passed
Push — master ( f81cc4...5281ab )
by stéphane
04:50
created
examples/write.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,4 +24,6 @@
 block discarded – undo
24 24
 if ($nameResultPair[$testName] !== $text) {
25 25
     var_dump('EXPECTED', $nameResultPair[$testName]);
26 26
     var_dump('RECEIVED', $text);
27
-} else echo 'WRITE OK !!!';
27
+} else {
28
+    echo 'WRITE OK !!!';
29
+}
Please login to merge, or discard this patch.
sources/DumperHandlers.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
45 47
 
46 48
     public function dumpScalar($dataType, $indent):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';
@@ -84,9 +90,13 @@  discard block
 block discarded – undo
84 90
             // $mask = '%s:';
85 91
         } elseif (is_object($compound)) {
86 92
             //var_dump("SPECIAL");
87
-            if ($compound instanceof Tagged)     return $this->dumpTagged($compound, $indent);
93
+            if ($compound instanceof Tagged) {
94
+                return $this->dumpTagged($compound, $indent);
95
+            }
88 96
             //TODO:  consider dumping datetime as date strings according to a format provided by user
89
-            if ($compound instanceof \DateTime)  return $compound->format(self::DATE_FORMAT);
97
+            if ($compound instanceof \DateTime) {
98
+                return $compound->format(self::DATE_FORMAT);
99
+            }
90 100
             // $iterator = new \ArrayIterator($compound);
91 101
             $iterator = new \ArrayIterator(get_object_vars($compound));
92 102
         }
Please login to merge, or discard this patch.