Passed
Push — master ( 3aa121...7cc354 )
by stéphane
03:44
created
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):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';
@@ -77,9 +83,13 @@  discard block
 block discarded – undo
77 83
         } elseif (is_iterable($compound)) {
78 84
             $iterator = $compound;
79 85
         } elseif (is_object($compound)) {
80
-            if ($compound instanceof Tagged)     return $this->dumpTagged($compound, $indent);
86
+            if ($compound instanceof Tagged) {
87
+                return $this->dumpTagged($compound, $indent);
88
+            }
81 89
             //TODO:  consider dumping datetime as date strings according to a format provided by user
82
-            if ($compound instanceof \DateTime)  return $compound->format(self::DATE_FORMAT);
90
+            if ($compound instanceof \DateTime) {
91
+                return $compound->format(self::DATE_FORMAT);
92
+            }
83 93
             $iterator = new \ArrayIterator(get_object_vars($compound));
84 94
         }
85 95
         return $this->iteratorToString($iterator, $mask, $indent);
Please login to merge, or discard this patch.