Completed
Push — master ( 48735e...1bc6cd )
by Mihail
02:17
created
src/Helper/Environment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,6 +66,6 @@
 block discarded – undo
66 66
             return 'error';
67 67
         }
68 68
 
69
-        return (int)$load . '%';
69
+        return (int)$load.'%';
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
src/Helper/Mailer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         } catch (\Exception $e) {
85 85
             if (App::$Debug) {
86 86
                 App::$Debug->addException($e);
87
-                App::$Debug->addMessage('Send mail failed! Info: ' . $e->getMessage(), 'error');
87
+                App::$Debug->addMessage('Send mail failed! Info: '.$e->getMessage(), 'error');
88 88
             }
89 89
             return false;
90 90
         }
Please login to merge, or discard this patch.
src/Helper/HTML/Bootstrap/Nav.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             } elseif ($item['type'] === 'tab') {
63 63
                 $activeObject = false;
64 64
                 $item['type'] = 'link'; // fix for global Listing builder
65
-                $item['link'] = '#' . $elements['tabAnchor'] . $tabIdx;
65
+                $item['link'] = '#'.$elements['tabAnchor'].$tabIdx;
66 66
 
67 67
                 $item['property']['role'] = 'presentation';
68 68
 
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
                 // mark active tab
79 79
                 if ($activeObject === true) {
80
-                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null) . 'active';
80
+                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null).'active';
81 81
                 }
82 82
 
83 83
                 // tab special properties for bootstrap
84
-                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'] . $tabIdx;
84
+                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'].$tabIdx;
85 85
                 $item['linkProperty']['role'] = 'tab';
86 86
                 $item['linkProperty']['data-toggle'] = 'tab';
87 87
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 $items[] = $item;
91 91
 
92 92
                 // draw tab content
93
-                $tabContent .= $dom->div(function () use ($item, $itemContent) {
93
+                $tabContent .= $dom->div(function() use ($item, $itemContent) {
94 94
                     if ($item['html'] === true) {
95 95
                         if ($item['!secure'] === true) {
96 96
                             return $itemContent;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                     } else {
101 101
                         return self::nohtml($itemContent);
102 102
                     }
103
-                }, ['role' => 'tabpanel', 'class' => 'tab-pane fade' . ($activeObject === true ? ' in active' : null), 'id' => $elements['tabAnchor'] . $tabIdx]);
103
+                }, ['role' => 'tabpanel', 'class' => 'tab-pane fade'.($activeObject === true ? ' in active' : null), 'id' => $elements['tabAnchor'].$tabIdx]);
104 104
                 $tabIdx++;
105 105
             }
106 106
         }
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
         // check if global class "nav" isset
109 109
         if ($elements['property']['class'] !== null) {
110 110
             if (!Str::contains('nav ', $elements['property']['class'])) {
111
-                $elements['property']['class'] = 'nav ' . $elements['property']['class'];
111
+                $elements['property']['class'] = 'nav '.$elements['property']['class'];
112 112
             }
113 113
         } else {
114 114
             $elements['property']['class'] = 'nav';
115 115
         }
116 116
 
117 117
         // render final output
118
-        return $dom->div(function () use ($elements, $items, $tabContent, $dom) {
118
+        return $dom->div(function() use ($elements, $items, $tabContent, $dom) {
119 119
             // drow listing
120 120
             $listing = Listing::display([
121 121
                 'type' => 'ul',
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
                     $elements['tabProperty']['class'] = 'tab-content';
129 129
                 }
130 130
 
131
-                $tabContent = $dom->div(function () use ($tabContent) {
131
+                $tabContent = $dom->div(function() use ($tabContent) {
132 132
                     return $tabContent;
133 133
                 }, $elements['tabProperty']);
134 134
             }
135
-            return $listing . $tabContent;
135
+            return $listing.$tabContent;
136 136
         }, $blockProperty);
137 137
     }
138 138
 }
Please login to merge, or discard this patch.
src/Helper/HTML/Bootstrap/Navbar.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // set mobile collapse id for toggle
39 39
         $mobCollapseId = $elements['collapseId'];
40 40
         if (Any::isEmpty($mobCollapseId)) {
41
-            $mobCollapseId = Str::randomLatin(mt_rand(6, 12)) . mt_rand(1, 99);
41
+            $mobCollapseId = Str::randomLatin(mt_rand(6, 12)).mt_rand(1, 99);
42 42
         }
43 43
 
44 44
         // set element id for toggle
@@ -99,29 +99,29 @@  discard block
 block discarded – undo
99 99
 
100 100
         // generate output dom of bootstrap navbar
101 101
         $dom = new Dom();
102
-        $body = $dom->div(function () use ($leftBuild, $rightBuild, $itemsStatic) {
103
-            return $leftBuild . $itemsStatic . $rightBuild;
102
+        $body = $dom->div(function() use ($leftBuild, $rightBuild, $itemsStatic) {
103
+            return $leftBuild.$itemsStatic.$rightBuild;
104 104
         }, ['class' => 'collapse navbar-collapse', 'id' => $mobCollapseId]);
105 105
 
106 106
         // drow <nav @properties>@next</nav>
107
-        return $dom->nav(function () use ($dom, $elements, $mobCollapseId, $body) {
107
+        return $dom->nav(function() use ($dom, $elements, $mobCollapseId, $body) {
108 108
             // drow <div @container>@next</div>
109
-            return $dom->div(function () use ($dom, $elements, $mobCollapseId, $body) {
109
+            return $dom->div(function() use ($dom, $elements, $mobCollapseId, $body) {
110 110
                 // drow <div @navbar-header>@next</div>
111
-                $header = $dom->div(function () use ($dom, $elements, $mobCollapseId) {
111
+                $header = $dom->div(function() use ($dom, $elements, $mobCollapseId) {
112 112
                     // drow <button @collapse>@next</button>
113
-                    $collapseButton = $dom->button(function () use ($dom) {
114
-                        $toggleItem = $dom->span(function () {
113
+                    $collapseButton = $dom->button(function() use ($dom) {
114
+                        $toggleItem = $dom->span(function() {
115 115
                             return 'Toggle menu';
116 116
                         }, ['class' => 'sr-only']);
117 117
                         $toggleIcon = null;
118 118
                         for ($i = 0; $i < 3; $i++) {
119
-                            $toggleIcon .= $dom->span(function () {
119
+                            $toggleIcon .= $dom->span(function() {
120 120
                                 return null;
121 121
                             }, ['class' => 'icon-bar']);
122 122
                         }
123
-                        return $toggleItem . $toggleIcon;
124
-                    }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#' . $mobCollapseId]);
123
+                        return $toggleItem.$toggleIcon;
124
+                    }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#'.$mobCollapseId]);
125 125
                     // drow <div @brand>@brandtext<?div>
126 126
                     $brand = null;
127 127
                     if (isset($elements['brand'])) {
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
                         if (isset($elements['brand']['link'])) {
132 132
                             $brand = Url::link($elements['brand']['link'], $elements['brand']['text'], $elements['brand']['property']);
133 133
                         } else {
134
-                            $brand = (new Dom())->span(function () use ($elements) {
134
+                            $brand = (new Dom())->span(function() use ($elements) {
135 135
                                 return $elements['brand']['text'];
136 136
                             }, $elements['brand']['property']);
137 137
                         }
138 138
                     }
139
-                    return $collapseButton . $brand;
139
+                    return $collapseButton.$brand;
140 140
                 }, ['class' => 'navbar-header']);
141 141
                 // return header and body concat
142
-                return $header . $body;
142
+                return $header.$body;
143 143
             }, $elements['container']);
144 144
         }, $elements['nav']);
145 145
     }
Please login to merge, or discard this patch.
src/Helper/HTML/Listing.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         // initialize new DOM model
32 32
         $dom = new Dom();
33 33
         // return DOM-HTML, build based on closures!
34
-        return $dom->{$elements['type']}(function () use ($dom, $elements) {
34
+        return $dom->{$elements['type']}(function() use ($dom, $elements) {
35 35
             // prepare output avg variable
36 36
             $itemHTML = null;
37 37
             // get active order level
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
             $item['menuProperty']['class'] = 'dropdown-menu';
72 72
         }
73 73
 
74
-        return $dom->li(function () use ($dom, $item) {
75
-            $dropdownLink = $dom->a(function () use ($dom, $item) {
76
-                return self::applyEscape($item['text'], $item['html'], $item['!secure']) . ' ' . $dom->span(function () {
74
+        return $dom->li(function() use ($dom, $item) {
75
+            $dropdownLink = $dom->a(function() use ($dom, $item) {
76
+                return self::applyEscape($item['text'], $item['html'], $item['!secure']).' '.$dom->span(function() {
77 77
                 }, ['class' => 'caret']);
78 78
             }, $item['dropdown']);
79 79
 
80
-            $dropdownElements = $dom->ul(function () use ($dom, $item) {
80
+            $dropdownElements = $dom->ul(function() use ($dom, $item) {
81 81
                 $resp = null;
82 82
                 foreach ($item['items'] as $obj) {
83 83
                     $resp .= self::buildLink($dom, $obj, false);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 return $resp;
86 86
             }, $item['menuProperty']);
87 87
 
88
-            return $dropdownLink . $dropdownElements;
88
+            return $dropdownLink.$dropdownElements;
89 89
         }, $item['property']);
90 90
     }
91 91
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     private static function buildText($dom, $item)
99 99
     {
100 100
         $text = self::applyEscape($item['text'], $item['html'], $item['!secure']);
101
-        return $dom->li(function () use ($text) {
101
+        return $dom->li(function() use ($text) {
102 102
             return $text;
103 103
         }, $item['property']);
104 104
     }
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
         $item['linkProperty']['href'] = self::convertLink($item['link']);
139 139
 
140 140
         // build output <li@params><a @params>@text</li>
141
-        return $dom->li(function () use ($dom, $text, $item) {
142
-            return $dom->a(function () use ($text) {
141
+        return $dom->li(function() use ($dom, $text, $item) {
142
+            return $dom->a(function() use ($text) {
143 143
                 return $text;
144 144
             }, $item['linkProperty']);
145 145
         }, $properties);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/MultiSelectField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $options = $this->properties['options'];
38 38
         $optionsKey = (bool)$this->properties['optionsKey'];
39 39
         if (!Any::isIterable($options)) {
40
-            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
40
+            throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable');
41 41
         }
42 42
 
43 43
         unset($this->properties['options']);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/MultiCheckboxField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         // check if options is defined
44 44
         $options = $this->properties['options'];
45 45
         if (!Any::isIterable($options)) {
46
-            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
46
+            throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable');
47 47
         }
48 48
 
49 49
         unset($this->properties['options']);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $this->properties['value'] = $opt;
66 66
             // apply structured checkboxes style for each item
67 67
             $build .= App::$View->render('native/form/multi_checkboxes_list', [
68
-                'item' => self::buildSingleTag('input', $this->properties) . self::nohtml($opt)
68
+                'item' => self::buildSingleTag('input', $this->properties).self::nohtml($opt)
69 69
             ]);
70 70
         }
71 71
         
Please login to merge, or discard this patch.
src/Helper/HTML/Form/SelectField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $options = $this->properties['options'];
37 37
         unset($this->properties['options']);
38 38
         if (!Any::isIterable($options)) {
39
-            throw new SyntaxException('Select field ' . self::nohtml($this->name) . ' have no iterable options');
39
+            throw new SyntaxException('Select field '.self::nohtml($this->name).' have no iterable options');
40 40
         }
41 41
         // value is not used there
42 42
         unset($this->properties['value']);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/Constructor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 break;
109 109
             default:
110 110
                 if (App::$Debug) {
111
-                    App::$Debug->addMessage('Field has unknown type: ' . App::$Security->strip_tags($name));
111
+                    App::$Debug->addMessage('Field has unknown type: '.App::$Security->strip_tags($name));
112 112
                 }
113 113
         }
114 114
 
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
         if (Str::contains('.', $name)) {
161 161
             $splitedName = explode('.', $name);
162 162
             foreach ($splitedName as $nameKey) {
163
-                $properties['name'] .= '[' . $nameKey . ']';
164
-                $properties['id'] .= '-' . $nameKey;
163
+                $properties['name'] .= '['.$nameKey.']';
164
+                $properties['id'] .= '-'.$nameKey;
165 165
             }
166 166
         } else { // standard property definition - add field name
167
-            $properties['name'] .= '[' . $name . ']';
168
-            $properties['id'] .= '-' . $name;
167
+            $properties['name'] .= '['.$name.']';
168
+            $properties['id'] .= '-'.$name;
169 169
         }
170 170
     }
171 171
 }
Please login to merge, or discard this patch.