@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true) |
26 | 26 | { |
27 | 27 | $pathway = self::buildPathway([$controller_action, $id, $add, $params], $encode); |
28 | - return App::$Alias->baseUrl . '/' . $pathway; |
|
28 | + return App::$Alias->baseUrl.'/'.$pathway; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $controller = Str::lastIn($controller, '\\', true); |
62 | 62 | } |
63 | 63 | |
64 | - $response = $controller . '/' . $action; |
|
64 | + $response = $controller.'/'.$action; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // check if controller and action is defined |
@@ -71,17 +71,17 @@ discard block |
||
71 | 71 | |
72 | 72 | // id is defined? |
73 | 73 | if (isset($to[1]) && !Str::likeEmpty($to[1])) { |
74 | - $response .= '/' . self::safeUri($to[1], $encode); |
|
74 | + $response .= '/'.self::safeUri($to[1], $encode); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | // add param is defined? |
78 | 78 | if (isset($to[2]) && !Str::likeEmpty($to[2])) { |
79 | - $response .= '/' . self::safeUri($to[2], $encode); |
|
79 | + $response .= '/'.self::safeUri($to[2], $encode); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | // try to find static alias |
83 | - if (isset($routing['Alias'][env_name]) && Arr::in('/' . $response, $routing['Alias'][env_name])) { |
|
84 | - $pathAlias = array_search('/' . $response, $routing['Alias'][env_name]); |
|
83 | + if (isset($routing['Alias'][env_name]) && Arr::in('/'.$response, $routing['Alias'][env_name])) { |
|
84 | + $pathAlias = array_search('/'.$response, $routing['Alias'][env_name]); |
|
85 | 85 | if ($pathAlias !== false) { |
86 | 86 | $response = Str::lowerCase(trim($pathAlias, '/')); |
87 | 87 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | $queryString = http_build_query($to[3]); |
99 | 99 | if (Str::length($queryString) > 0) { |
100 | - $response .= '?' . http_build_query($to[3]); |
|
100 | + $response .= '?'.http_build_query($to[3]); |
|
101 | 101 | } |
102 | 102 | if ($anchor !== false) { |
103 | 103 | $response .= $anchor; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public static function buildPathwayFromRequest() |
120 | 120 | { |
121 | 121 | return self::buildPathway([ |
122 | - Str::lowerCase(App::$Request->getController()) . '/' . Str::lowerCase(App::$Request->getAction()), |
|
122 | + Str::lowerCase(App::$Request->getController()).'/'.Str::lowerCase(App::$Request->getAction()), |
|
123 | 123 | App::$Request->getID(), |
124 | 124 | App::$Request->getAdd(), |
125 | 125 | App::$Request->query->all() |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | // call Url::to(args) |
144 | - $callbackTo = call_user_func_array([__NAMESPACE__ . '\Url', 'to'], $to); |
|
144 | + $callbackTo = call_user_func_array([__NAMESPACE__.'\Url', 'to'], $to); |
|
145 | 145 | |
146 | - return '<a href="' . $callbackTo . '"' . $compile_property . '>' . $name . '</a>'; |
|
146 | + return '<a href="'.$callbackTo.'"'.$compile_property.'>'.$name.'</a>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -156,19 +156,19 @@ discard block |
||
156 | 156 | { |
157 | 157 | /** @var array $configs */ |
158 | 158 | $configs = \App::$Properties->getAll('default'); |
159 | - $httpHost = $configs['baseProto'] . '://' . $configs['baseDomain']; |
|
159 | + $httpHost = $configs['baseProto'].'://'.$configs['baseDomain']; |
|
160 | 160 | if ($configs['basePath'] !== '/') { |
161 | - $httpHost .= $configs['basePath'] . '/'; |
|
161 | + $httpHost .= $configs['basePath'].'/'; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | // check if is this is URI not URL |
165 | 165 | if (!Str::startsWith($httpHost, $uri)) { |
166 | 166 | // check if lang is defined in URI or define it |
167 | 167 | if ($lang !== null && $configs['multiLanguage'] && !Str::startsWith($lang, $uri)) { |
168 | - $uri = $lang . '/' . ltrim($uri, '/'); |
|
168 | + $uri = $lang.'/'.ltrim($uri, '/'); |
|
169 | 169 | } |
170 | 170 | // add basic httpHost data |
171 | - $uri = rtrim($httpHost, '/') . '/' . ltrim($uri, '/'); |
|
171 | + $uri = rtrim($httpHost, '/').'/'.ltrim($uri, '/'); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | return $uri; |
@@ -66,6 +66,6 @@ |
||
66 | 66 | return 'error'; |
67 | 67 | } |
68 | 68 | |
69 | - return (int)$load . '%'; |
|
69 | + return (int)$load.'%'; |
|
70 | 70 | } |
71 | 71 | } |
@@ -84,7 +84,7 @@ |
||
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 | } |
@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -38,7 +38,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -31,7 +31,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -37,7 +37,7 @@ |
||
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']); |
@@ -43,7 +43,7 @@ discard block |
||
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 |
||
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 |
@@ -36,7 +36,7 @@ |
||
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']); |