Passed
Push — master ( 8a1920...1fe3b5 )
by Petr
07:20 queued 04:48
created
php-tests/HtmlTests/HtmlTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 {
17 17
     public function testSimple1()
18 18
     {
19
-        $data = HtmlElement::init('<hr align="left">', ['width' => '80',]);
19
+        $data = HtmlElement::init('<hr align="left">', ['width' => '80', ]);
20 20
         $this->assertNotEmpty($data->getAttributes());
21 21
         $this->assertEquals('left', $data->getAttribute('align'));
22 22
         $this->assertEquals('80', $data->getAttribute('width'));
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function testSimple2()
26 26
     {
27
-        $data = HtmlElement::init('span', ['height' => '80',]);
27
+        $data = HtmlElement::init('span', ['height' => '80', ]);
28 28
         $this->assertNotEmpty($data->getAttributes());
29 29
         $this->assertEmpty($data->getAttribute('width'));
30 30
         $this->assertEquals('80', $data->getAttribute('height'));
Please login to merge, or discard this patch.
php-src/HtmlElement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     use TCss, TStyles;
20 20
 
21 21
     /** @var string[] */
22
-    protected static $emptyElements = ['img','hr','br','input','meta','area','embed','keygen','link','param','frame'];
22
+    protected static $emptyElements = ['img', 'hr', 'br', 'input', 'meta', 'area', 'embed', 'keygen', 'link', 'param', 'frame'];
23 23
 
24 24
     /** @var string  element's name */
25 25
     private $name = '';
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function __construct(string $name, array $attributes = [])
43 43
     {
44
-        $name = str_ireplace(['<','>'],'', $name);
44
+        $name = str_ireplace(['<', '>'], '', $name);
45 45
         $parts = explode(' ', $name, 2);
46 46
         $name = $parts[0];
47 47
 
Please login to merge, or discard this patch.
php-src/Template/Item.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function getKey(): string
39 39
     {
40
-        return $this->key ;
40
+        return $this->key;
41 41
     }
42 42
 
43 43
     public function getDefault(): string
@@ -47,6 +47,6 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function getValue(): string
49 49
     {
50
-        return $this->value ?? $this->default ;
50
+        return $this->value ?? $this->default;
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
php-src/HtmlElement/TAttributes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      */
128 128
     public function getAttribute(string $name): ?string
129 129
     {
130
-        return isset($this->attributes[$name]) ? $this->attributes[$name] : null ;
130
+        return isset($this->attributes[$name]) ? $this->attributes[$name] : null;
131 131
     }
132 132
 
133 133
     /**
Please login to merge, or discard this patch.
php-src/HtmlElement/THtmlElement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 $alias = $child->getAlias();
81 81
             }
82 82
         } else {
83
-            $alias = $this->checkAlias($alias) ? strval($alias) : null ;
83
+            $alias = $this->checkAlias($alias) ? strval($alias) : null;
84 84
             $child = new Text(strval($child), $alias);
85 85
         }
86 86
         if (method_exists($child, 'setParent') && $this instanceof IHtmlElement) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             if ($merge && $this->__isset(strval($alias))) {
92 92
                 $this->children[strval($alias)]->merge($child);
93 93
             }
94
-            $this->children[strval($alias)] = $inherit ? $this->inherit($child) : $child ;
94
+            $this->children[strval($alias)] = $inherit ? $this->inherit($child) : $child;
95 95
         } else {
96 96
             $this->children[] = $child;
97 97
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function checkAlias($alias): bool
106 106
     {
107
-        return !(is_null($alias) || ('' === $alias) || (is_object($alias)) || is_resource($alias) );
107
+        return !(is_null($alias) || ('' === $alias) || (is_object($alias)) || is_resource($alias));
108 108
     }
109 109
 
110 110
     /**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function lastChild(): ?IHtmlElement
149 149
     {
150 150
         $last = end($this->children);
151
-        return (false === $last) ? null : $last ;
151
+        return (false === $last) ? null : $last;
152 152
     }
153 153
 
154 154
     /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      */
186 186
     public function __get($alias): ?IHtmlElement
187 187
     {
188
-        return $this->__isset($alias) ? $this->children[$alias] : null ;
188
+        return $this->__isset($alias) ? $this->children[$alias] : null;
189 189
     }
190 190
 
191 191
     /**
Please login to merge, or discard this patch.
php-src/ATemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
     protected function getItem(string $key): ?Template\Item
67 67
     {
68
-        return isset($this->items[$key]) ? $this->items[$key] : null ;
68
+        return isset($this->items[$key]) ? $this->items[$key] : null;
69 69
     }
70 70
 
71 71
     protected function updateItem(string $key, ?string $value): self
Please login to merge, or discard this patch.