@@ -97,9 +97,9 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | // looks like a single tag, <img src="" class="" />, <hr class="" /> |
| 99 | 99 | if (Arr::in($name, self::$singleTags)) { |
| 100 | - return '<' . $name . self::applyProperties($properties) . ' />'; |
|
| 101 | - } elseif(Arr::in($name, self::$containerTags)) { // looks like a container tag, <div class=""></div> |
|
| 102 | - return '<' . $name . self::applyProperties($properties) . '>' . $content . '</' . $name . '>'; |
|
| 100 | + return '<'.$name.self::applyProperties($properties).' />'; |
|
| 101 | + } elseif (Arr::in($name, self::$containerTags)) { // looks like a container tag, <div class=""></div> |
|
| 102 | + return '<'.$name.self::applyProperties($properties).'>'.$content.'</'.$name.'>'; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // empty response |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | // sounds like single standalone property, ex required, selected etc |
| 128 | 128 | if ($value === null || $value === false) { |
| 129 | - $build .= ' ' . htmlentities($property, ENT_QUOTES); |
|
| 129 | + $build .= ' '.htmlentities($property, ENT_QUOTES); |
|
| 130 | 130 | } else { // sounds like a classic key="value" property |
| 131 | - $build .= ' ' . htmlentities($property, ENT_QUOTES) . '="' . htmlentities($value, ENT_QUOTES) . '"'; |
|
| 131 | + $build .= ' '.htmlentities($property, ENT_QUOTES).'="'.htmlentities($value, ENT_QUOTES).'"'; |
|
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | return $build; |
@@ -118,16 +118,16 @@ |
||
| 118 | 118 | return 'true'; |
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | - return '\'' . $var . '\''; |
|
| 121 | + return '\''.$var.'\''; |
|
| 122 | 122 | case 'array': |
| 123 | 123 | $indexed = array_keys($var) === range(0, count($var) - 1); |
| 124 | 124 | $row = []; |
| 125 | 125 | foreach ($var as $key => $value) { |
| 126 | - $row[] = $indent . "\t" |
|
| 127 | - . ($indexed ? null : self::exportVar($key, null, $guessTypes) . ' => ') |
|
| 128 | - . self::exportVar($value, $indent . "\t", $guessTypes); |
|
| 126 | + $row[] = $indent."\t" |
|
| 127 | + . ($indexed ? null : self::exportVar($key, null, $guessTypes).' => ') |
|
| 128 | + . self::exportVar($value, $indent."\t", $guessTypes); |
|
| 129 | 129 | } |
| 130 | - return "[\n" . implode(",\n", $row) . "\n" . $indent . ']'; |
|
| 130 | + return "[\n".implode(",\n", $row)."\n".$indent.']'; |
|
| 131 | 131 | case 'boolean': |
| 132 | 132 | return $var ? 'true' : 'false'; |
| 133 | 133 | default: |
@@ -67,6 +67,6 @@ |
||
| 67 | 67 | return 'error'; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - return (int)$load . '%'; |
|
| 70 | + return (int)$load.'%'; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | \ No newline at end of file |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | if ($this->layout === null) { |
| 50 | 50 | $content = $this->response; |
| 51 | 51 | } else { |
| 52 | - $layoutPath = App::$Alias->currentViewPath . '/layout/' . $this->layout . '.php'; |
|
| 52 | + $layoutPath = App::$Alias->currentViewPath.'/layout/'.$this->layout.'.php'; |
|
| 53 | 53 | if (!File::exist($layoutPath)) { |
| 54 | - throw new NativeException('Layout not founded: ' . $layoutPath); |
|
| 54 | + throw new NativeException('Layout not founded: '.$layoutPath); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $body = $this->response; |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | // set custom css library's not included on static call |
| 71 | 71 | $cssIncludeCode = App::$View->showCodeLink('css'); |
| 72 | 72 | if (!Str::likeEmpty($cssIncludeCode)) { |
| 73 | - $content = Str::replace('</head>', $cssIncludeCode . '</head>', $content); |
|
| 73 | + $content = Str::replace('</head>', $cssIncludeCode.'</head>', $content); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | // add debug bar |
| 77 | 77 | if (App::$Debug !== null) { |
| 78 | 78 | $content = Str::replace( |
| 79 | 79 | ['</body>', '</head>'], |
| 80 | - [App::$Debug->renderOut() . '</body>', App::$Debug->renderHead() . '</head>'], |
|
| 80 | + [App::$Debug->renderOut().'</body>', App::$Debug->renderHead().'</head>'], |
|
| 81 | 81 | $content); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | // check if class exist |
| 28 | 28 | if (!class_exists(self::$class)) { |
| 29 | - return 'Error: Widget is not founded: ' . App::$Security->strip_tags(self::$class); |
|
| 29 | + return 'Error: Widget is not founded: '.App::$Security->strip_tags(self::$class); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // init class and pass properties |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $to = trim($to, '/'); |
| 24 | 24 | if (false === $full && !Str::startsWith(App::$Alias->baseUrl, $to)) { |
| 25 | - $to = App::$Alias->baseUrl . '/' . $to; |
|
| 25 | + $to = App::$Alias->baseUrl.'/'.$to; |
|
| 26 | 26 | } |
| 27 | 27 | $redirect = new FoundationRedirect($to); |
| 28 | 28 | $redirect->send(); |
| 29 | - exit('Redirecting to ' . $to . ' ...'); |
|
| 29 | + exit('Redirecting to '.$to.' ...'); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | // build error text |
| 63 | 63 | $rawResponse = 'error'; |
| 64 | 64 | try { |
| 65 | - $rawResponse = App::$View->render('native/errors/' . $this->tpl, ['msg' => $this->text]); |
|
| 65 | + $rawResponse = App::$View->render('native/errors/'.$this->tpl, ['msg' => $this->text]); |
|
| 66 | 66 | if (Str::likeEmpty($rawResponse)) { |
| 67 | 67 | $rawResponse = $this->text; |
| 68 | 68 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | protected function sendHTML($message = null) |
| 56 | 56 | { |
| 57 | 57 | header('HTTP/1.1 404 Not Found'); |
| 58 | - return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>' . $message . '</p></div></body></html>'; |
|
| 58 | + return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>'.$message.'</p></div></body></html>'; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | // initialize new DOM model |
| 31 | 31 | $dom = new Dom(); |
| 32 | 32 | // return DOM-HTML, build based on closures! |
| 33 | - return $dom->{$elements['type']}(function () use ($dom, $elements) { |
|
| 33 | + return $dom->{$elements['type']}(function() use ($dom, $elements) { |
|
| 34 | 34 | // prepare output avg variable |
| 35 | 35 | $itemHTML = null; |
| 36 | 36 | // get active order level |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | return $dom->li(function() use($dom, $item){ |
| 69 | 69 | $dropdownLink = $dom->a(function() use ($dom, $item){ |
| 70 | - return self::applyEscape($item['text'], $item['html'], $item['!secure']) . ' ' . $dom->span(function(){}, ['class' => 'caret']); |
|
| 70 | + return self::applyEscape($item['text'], $item['html'], $item['!secure']).' '.$dom->span(function() {}, ['class' => 'caret']); |
|
| 71 | 71 | }, $item['dropdown']); |
| 72 | 72 | |
| 73 | 73 | $dropdownElements = $dom->ul(function() use ($dom, $item){ |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | return $resp; |
| 79 | 79 | }, ['class' => 'dropdown-menu']); |
| 80 | 80 | |
| 81 | - return $dropdownLink . $dropdownElements; |
|
| 81 | + return $dropdownLink.$dropdownElements; |
|
| 82 | 82 | }, $item['property']); |
| 83 | 83 | |
| 84 | 84 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $item['linkProperty']['href'] = self::convertLink($item['link']); |
| 131 | 131 | |
| 132 | 132 | // build output <li@params><a @params>@text</li> |
| 133 | - return $dom->li(function () use ($dom, $text, $item) { |
|
| 133 | + return $dom->li(function() use ($dom, $text, $item) { |
|
| 134 | 134 | return $dom->a(function() use ($text) { |
| 135 | 135 | return $text; |
| 136 | 136 | }, $item['linkProperty']); |