Passed
Branch master (539d05)
by Alfred
02:00
created
Elements/YesNo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class YesNo extends Radio
13 13
 {
14
-    public function __construct($label, $attributes=[])
14
+    public function __construct($label, $attributes = [])
15 15
     {
16 16
         $options = [
17 17
             '1' => 'Yes',
Please login to merge, or discard this patch.
Elements/Month.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
     public function __construct($label, $attributes)
17 17
     {
18 18
         parent::__construct($label, $attributes);
19
-        $this->Attributes()->set('type','month');
20
-        $this->Attributes()->set('pattern','\d{4}-\d{2}');
21
-        $this->Attributes()->set('placeholder','YYYY-MM (e.g. ' . date('Y-m') . ')');
19
+        $this->Attributes()->set('type', 'month');
20
+        $this->Attributes()->set('pattern', '\d{4}-\d{2}');
21
+        $this->Attributes()->set('placeholder', 'YYYY-MM (e.g. '.date('Y-m').')');
22 22
     }
23 23
 
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/Editor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
     public function __construct($label, $attributes = [])
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $class = $this->Attributes()->get('class','');
18
-        $this->Attributes()->set('class',$class? $class.' editor':'editor');
17
+        $class = $this->Attributes()->get('class', '');
18
+        $this->Attributes()->set('class', $class ? $class.' editor' : 'editor');
19 19
     }
20 20
 
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/Video.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function __construct($label, $attributes)
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $this->Attributes()->set('accept','video/*');
17
+        $this->Attributes()->set('accept', 'video/*');
18 18
     }
19 19
 
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/Reset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function __construct($label, $attributes)
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $this->Attributes()->set('type','reset');
17
+        $this->Attributes()->set('type', 'reset');
18 18
     }
19 19
 
20 20
 
Please login to merge, or discard this patch.
Elements/DatetimeLocal.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
     public function __construct($label, $attributes)
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $this->Attributes()->set('type','datetime-local');
18
-        $this->Attributes()->set('pattern','[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}');
19
-        $this->Attributes()->set('placeholder','YYYY-dd-MMTHH:i(e.g. ' . date('Y-m-dTH:i') . ')');
17
+        $this->Attributes()->set('type', 'datetime-local');
18
+        $this->Attributes()->set('pattern', '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}');
19
+        $this->Attributes()->set('placeholder', 'YYYY-dd-MMTHH:i(e.g. '.date('Y-m-dTH:i').')');
20 20
     }
21 21
 
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function __construct($label, $attributes)
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $this->Attributes()->set('type','file');
17
+        $this->Attributes()->set('type', 'file');
18 18
     }
19 19
 
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/Datetime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
     public function __construct($label, $attributes)
14 14
     {
15 15
         parent::__construct($label, $attributes);
16
-        $this->Attributes()->set('type','datetime');
17
-        $this->Attributes()->set('placeholder','YYYY-dd-MM H:i:s(e.g. ' . date('Y-m-d H:i:s') . ')');
16
+        $this->Attributes()->set('type', 'datetime');
17
+        $this->Attributes()->set('placeholder', 'YYYY-dd-MM H:i:s(e.g. '.date('Y-m-d H:i:s').')');
18 18
     }
19 19
 
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Elements/Textarea.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
     public function __construct($label, $attributes = [])
15 15
     {
16 16
         parent::__construct($label, $attributes);
17
-        $this->Attributes()->set('type','textarea');
18
-        $this->Attributes()->set('rows',$this->Attributes()->get('rows',6));
19
-        $this->Attributes()->set('cols',$this->Attributes()->get('cols',60));
17
+        $this->Attributes()->set('type', 'textarea');
18
+        $this->Attributes()->set('rows', $this->Attributes()->get('rows', 6));
19
+        $this->Attributes()->set('cols', $this->Attributes()->get('cols', 60));
20 20
         $this->Attributes()->Ignore('value');
21 21
         $this->Label()->Attribute()->add(['style'=>'vertical-align: top;']);
22 22
     }
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
         $this->label()->Attribute()->set('for', $this->Attributes()->get('id'));
33 33
 
34 34
         $html  = $this->Label()->RenderHtml();
35
-        $html .= '<textarea'. $this->Attributes()->RenderHtml().'>';
36
-        $html .= $this->Attributes()->get('value','');
35
+        $html .= '<textarea'.$this->Attributes()->RenderHtml().'>';
36
+        $html .= $this->Attributes()->get('value', '');
37 37
         $html .= '</textarea>';
38 38
         return $html;
39 39
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@
 block discarded – undo
26 26
      */
27 27
     public function RenderHtml(): string
28 28
     {
29
-        if (!$this->Attributes()->has('id'))
30
-            $this->Attributes()->createElementID($this->Attributes()->get('name', $this->label()->getItemID()));
29
+        if (!$this->Attributes()->has('id')) {
30
+                    $this->Attributes()->createElementID($this->Attributes()->get('name', $this->label()->getItemID()));
31
+        }
31 32
         $this->label()->Attribute()->set('fieldtype', $this->Attributes()->get('type'));
32 33
         $this->label()->Attribute()->set('for', $this->Attributes()->get('id'));
33 34
 
Please login to merge, or discard this patch.