Test Failed
Branch master (51582e)
by Alexander
02:50
created
src/internals/debug/adapters/Html.php 1 patch
Braces   +16 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,9 +18,10 @@  discard block
 block discarded – undo
18 18
             $ret .= '<ul class="array">';
19 19
             if (in_array('array', $debug->options['avoid'])) {
20 20
                 $ret .= '<li><span class="empty"> -- Array Type Avoided -- </span></li>';
21
-            } else
22
-                foreach ($array as $key => $value) {
21
+            } else {
22
+                            foreach ($array as $key => $value) {
23 23
                     $ret .= '<li>[ <span class="key">' . $key . '</span> ] => ';
24
+            }
24 25
                     if (is_string($key) && in_array($key, $debug->options['blacklist']['key'])) {
25 26
                         $ret .= '<span class="empty"> -- Blacklisted Key Avoided -- </span></li>';
26 27
                         continue;
@@ -75,8 +76,11 @@  discard block
 block discarded – undo
75 76
                 $props .= self::dump_properties($reflection, $obj, $type, $rule, $debug);
76 77
         }
77 78
         $debug->current_depth--;
78
-        if ($props == '') return $ret .= '<li><span class="empty"> -- No properties -- </span></li></ul>';
79
-        else  $ret .=  $props;
79
+        if ($props == '') {
80
+            return $ret .= '<li><span class="empty"> -- No properties -- </span></li></ul>';
81
+        } else {
82
+            $ret .=  $props;
83
+        }
80 84
         $ret .= '</ul>';
81 85
         return  $ret;
82 86
     }
@@ -92,10 +96,11 @@  discard block
 block discarded – undo
92 96
             $value = $refProp->getValue($obj);
93 97
             $ret .= '<li>';
94 98
             $ret .= '<span class="access">' . $type . '</span> <span class="property">' . $property . '</span> ';
95
-            if (in_array($property, $debug->options['blacklist']['property']))
96
-                $ret .= ' : <span class="empty"> -- Blacklisted Property Avoided -- </span>';
97
-            else
98
-                $ret .= ' : ' . $debug->dump_it($value);
99
+            if (in_array($property, $debug->options['blacklist']['property'])) {
100
+                            $ret .= ' : <span class="empty"> -- Blacklisted Property Avoided -- </span>';
101
+            } else {
102
+                            $ret .= ' : ' . $debug->dump_it($value);
103
+            }
99 104
             $ret .= '</li>';
100 105
         }
101 106
         return $i ? $ret : '';
@@ -131,7 +136,9 @@  discard block
 block discarded – undo
131 136
 
132 137
     public static function top(array $outputs, ?string $key = null) : void
133 138
     {
134
-            if (empty($outputs)) return;
139
+            if (empty($outputs)) {
140
+                return;
141
+            }
135 142
             echo '<div id="debugger">';
136 143
             if ($key !== null) {
137 144
                     if (!isset($outputs[$key])) {
Please login to merge, or discard this patch.
src/internals/debug/Debug.php 1 patch
Braces   +34 added lines, -16 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
         $this->current_depth = 0;
55 55
         $this->object_references = array();
56 56
 
57
-        if (!$options['trace']) $options['trace'] = debug_backtrace();
57
+        if (!$options['trace']) {
58
+            $options['trace'] = debug_backtrace();
59
+        }
58 60
         extract($options);
59 61
         $location = $this->location($trace);
60 62
 
@@ -65,8 +67,9 @@  discard block
 block discarded – undo
65 67
 				$dump = array_merge($dump, array($this->dump_it($one), ' - '));
66 68
 			}
67 69
 			$dump = array_slice($dump, 0, -1);
68
-        } else
69
-            $dump[] = $this->dump_it($var);
70
+        } else {
71
+                    $dump[] = $this->dump_it($var);
72
+        }
70 73
 
71 74
         switch ($mode) {
72 75
 			default :
@@ -139,7 +142,9 @@  discard block
 block discarded – undo
139 142
         while ($def = array_slice($defines, $offset--, 1)) {
140 143
             $key = key($def);
141 144
             $value = current($def);
142
-            if ($key  == 'FIRST_APP_CONSTANT') break;
145
+            if ($key  == 'FIRST_APP_CONSTANT') {
146
+                break;
147
+            }
143 148
             $ret[$key ] = $value;
144 149
         }
145 150
         return $ret;
@@ -154,12 +159,13 @@  discard block
 block discarded – undo
154 159
     public function dump_it($var) : string
155 160
     {
156 161
 		$adapter = '\alkemann\h2l\internals\debug\adapters\\'. $this->options['mode'];
157
-        if (is_array($var))
158
-            return $adapter::dump_array($var, $this);
159
-        elseif (is_object($var))
160
-            return $adapter::dump_object($var, $this);
161
-        else
162
-            return $adapter::dump_other($var);
162
+        if (is_array($var)) {
163
+                    return $adapter::dump_array($var, $this);
164
+        } elseif (is_object($var)) {
165
+                    return $adapter::dump_object($var, $this);
166
+        } else {
167
+                    return $adapter::dump_other($var);
168
+        }
163 169
     }
164 170
 
165 171
 	/**
@@ -176,8 +182,12 @@  discard block
 block discarded – undo
176 182
             'file' => $file,
177 183
             'line' => $trace[0]['line']
178 184
         );
179
-        if (isset($trace[1]['function'])) $ret['function'] = $trace[1]['function'];
180
-        if (isset($trace[1]['class'])) $ret['class'] = $trace[1]['class'];
185
+        if (isset($trace[1]['function'])) {
186
+            $ret['function'] = $trace[1]['function'];
187
+        }
188
+        if (isset($trace[1]['class'])) {
189
+            $ret['class'] = $trace[1]['class'];
190
+        }
181 191
         return $ret;
182 192
     }
183 193
 
@@ -193,9 +203,15 @@  discard block
 block discarded – undo
193 203
                 $file = implode('/', array_diff(explode('/', $one['file']), explode('/', $root)));
194 204
                 $arr[$k]['file'] = $file;
195 205
             }
196
-            if (isset($one['line'])) $arr[$k]['line'] = $one['line'];
197
-            if (isset($one['class'])) $arr[$k-1]['class'] = $one['class'];
198
-            if (isset($one['function'])) $arr[$k-1]['function'] = $one['function'];
206
+            if (isset($one['line'])) {
207
+                $arr[$k]['line'] = $one['line'];
208
+            }
209
+            if (isset($one['class'])) {
210
+                $arr[$k-1]['class'] = $one['class'];
211
+            }
212
+            if (isset($one['function'])) {
213
+                $arr[$k-1]['function'] = $one['function'];
214
+            }
199 215
         }
200 216
         array_shift($arr);
201 217
         array_shift($arr);
@@ -283,7 +299,9 @@  discard block
 block discarded – undo
283 299
                         if ($tagArr[0] == 'param') {
284 300
                             $paramArr = preg_split("/[\s\t]+/", $tagArr[1]);
285 301
                             $type = array_shift($paramArr);
286
-                            if (empty($type)) $type = array_shift($paramArr);
302
+                            if (empty($type)) {
303
+                                $type = array_shift($paramArr);
304
+                            }
287 305
                             $name = array_shift($paramArr);
288 306
                             $info = implode(' ', $paramArr);
289 307
                             $tags['param'][$name] = compact('type', 'info');
Please login to merge, or discard this patch.