Passed
Push — main ( f09874...08f4c3 )
by Sammy
07:02
created
src/Element.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $this->tag = $tag;
38 38
         $this->inner = $inner;
39
-        foreach($attributes as $name => $value)
39
+        foreach ($attributes as $name => $value)
40 40
         {
41 41
             // is boolean attribute ?
42
-            if(is_int($name))
42
+            if (is_int($name))
43 43
             {
44 44
                 $this->$value = true;
45 45
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             }
50 50
         }
51 51
 
52
-        $this->formatter = $formatter ?? function($value){
52
+        $this->formatter = $formatter ?? function($value) {
53 53
             return htmlspecialchars($value, ENT_QUOTES);
54 54
         };
55 55
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         
83 83
         foreach ($this->attributes as $name => $value) {
84 84
             $name = call_user_func($this->formatter, $name);
85
-            $attributes .= ' ' . ($value === true ? $name : sprintf('%s="%s"', $name, call_user_func($this->formatter, (string)$value)));
85
+            $attributes .= ' '.($value === true ? $name : sprintf('%s="%s"', $name, call_user_func($this->formatter, (string)$value)));
86 86
         }
87 87
 
88 88
         return $this->inner === null
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
             if(is_int($name))
43 43
             {
44 44
                 $this->$value = true;
45
-            }
46
-            else
45
+            } else
47 46
             {
48 47
                 $this->$name = $value;
49 48
             }
Please login to merge, or discard this patch.