@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | if (array_key_exists($pathway, $routing['Redirect'])) { |
37 | 37 | $target = $this->getSchemeAndHttpHost(); // . $this->getBasePath() . '/' . rtrim($routing['Redirect'][$pathway], '/'); |
38 | 38 | if ($this->getBasePath() !== null && !Str::likeEmpty($this->getBasePath())) { |
39 | - $target .= '/' . $this->getBasePath(); |
|
39 | + $target .= '/'.$this->getBasePath(); |
|
40 | 40 | } |
41 | 41 | $target .= rtrim($routing['Redirect'][$pathway], '/'); |
42 | 42 | $redirect = new RedirectResponse($target); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | // safe other parts to arguments if exist |
66 | 66 | if (count($pathArray) > 0) { |
67 | - $this->args = array_map(function ($in) { |
|
67 | + $this->args = array_map(function($in) { |
|
68 | 68 | return Any::isStr($in) ? urldecode($in) : $in; |
69 | 69 | }, $pathArray); |
70 | 70 | } |
@@ -184,12 +184,12 @@ discard block |
||
184 | 184 | try { |
185 | 185 | /** @var \Ffcms\Core\Arch\Controller $callClass */ |
186 | 186 | $callClass = $this->getCallbackClass(); |
187 | - $callMethod = 'action' . self::$Request->getAction(); |
|
187 | + $callMethod = 'action'.self::$Request->getAction(); |
|
188 | 188 | $arguments = self::$Request->getArguments(); |
189 | 189 | |
190 | 190 | // check if callback method (action) is exist in class object |
191 | 191 | if (!method_exists($callClass, $callMethod)) { |
192 | - throw new NotFoundException('Method "' . App::$Security->strip_tags($callMethod) . '()" not founded in "' . get_class($callClass) . '"'); |
|
192 | + throw new NotFoundException('Method "'.App::$Security->strip_tags($callMethod).'()" not founded in "'.get_class($callClass).'"'); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | // check if method arguments counts equals passed count |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $response = $e->display(); |
221 | 221 | } else { // or hook exception to system based :))) |
222 | 222 | if (App::$Debug) { |
223 | - $msg = $e->getMessage() . $e->getTraceAsString(); |
|
223 | + $msg = $e->getMessage().$e->getTraceAsString(); |
|
224 | 224 | $response = (new NativeException($msg))->display(); |
225 | 225 | } else { |
226 | 226 | $response = (new NativeException($e->getMessage()))->display(); |
@@ -242,9 +242,9 @@ discard block |
||
242 | 242 | private function getCallbackClass() |
243 | 243 | { |
244 | 244 | // define callback class namespace/name full path |
245 | - $cName = (self::$Request->getCallbackAlias() ?? '\Apps\Controller\\' . env_name . '\\' . self::$Request->getController()); |
|
245 | + $cName = (self::$Request->getCallbackAlias() ?? '\Apps\Controller\\'.env_name.'\\'.self::$Request->getController()); |
|
246 | 246 | if (!class_exists($cName)) { |
247 | - throw new NotFoundException('Callback class not found: ' . App::$Security->strip_tags($cName)); |
|
247 | + throw new NotFoundException('Callback class not found: '.App::$Security->strip_tags($cName)); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return new $cName; |
@@ -49,7 +49,7 @@ |
||
49 | 49 | protected function buildFakePage() |
50 | 50 | { |
51 | 51 | try { |
52 | - $rawResponse = App::$View->render('_core/exceptions/' . $this->tpl, ['msg' => $this->text]); |
|
52 | + $rawResponse = App::$View->render('_core/exceptions/'.$this->tpl, ['msg' => $this->text]); |
|
53 | 53 | if (Str::likeEmpty($rawResponse)) { |
54 | 54 | $rawResponse = $this->text; |
55 | 55 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | protected function sendHTML($message = null) |
59 | 59 | { |
60 | 60 | //header('HTTP/1.1 404 Not Found'); |
61 | - 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>'; |
|
61 | + 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>'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | if (App::$Debug) { |
33 | 33 | App::$Debug->startMeasure(get_class($this)); |
34 | - App::$Debug->bar->getCollector('messages')->info('Use controller: ' . get_class($this)); |
|
34 | + App::$Debug->bar->getCollector('messages')->info('Use controller: '.get_class($this)); |
|
35 | 35 | } |
36 | 36 | $this->lang = App::$Request->getLanguage(); |
37 | 37 | $this->request = App::$Request; |
@@ -33,10 +33,10 @@ |
||
33 | 33 | $theme = App::$Properties->get('theme')[env_name] ?? 'default'; |
34 | 34 | $env = ucfirst(Str::lowerCase(env_name)); |
35 | 35 | |
36 | - $this->path = root . DIRECTORY_SEPARATOR . 'Apps' . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . $env . DIRECTORY_SEPARATOR . $theme; |
|
36 | + $this->path = root.DIRECTORY_SEPARATOR.'Apps'.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.$env.DIRECTORY_SEPARATOR.$theme; |
|
37 | 37 | if (!Directory::exist($this->path)) { |
38 | 38 | if (App::$Debug) { |
39 | - App::$Debug->addMessage('Template root directory is not exist: ' . $this->path, 'error'); |
|
39 | + App::$Debug->addMessage('Template root directory is not exist: '.$this->path, 'error'); |
|
40 | 40 | } |
41 | 41 | return; |
42 | 42 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | { |
50 | 50 | foreach (Error::all() as $file => $error) { |
51 | 51 | foreach ($error as $line) { |
52 | - $this->addMessage('Template error: ' . $line . '(' . $file . ')', 'error'); |
|
52 | + $this->addMessage('Template error: '.$line.'('.$file.')', 'error'); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | return $this->render->render(); |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | |
60 | 60 | $basePath = trim(App::$Properties->get('basePath'), '/'); |
61 | 61 | if ($basePath !== null && Str::length($basePath) > 0) { |
62 | - $basePath = '/' . $basePath; |
|
62 | + $basePath = '/'.$basePath; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | if (!defined('env_no_uri') || env_no_uri === false) { |
66 | - $basePath .= '/' . strtolower(env_name); |
|
66 | + $basePath .= '/'.strtolower(env_name); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | // we never try to use path's without friendly url's |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | { |
109 | 109 | $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); |
110 | 110 | if (!Str::startsWith('/', $route)) { |
111 | - $route = '/' . $route; |
|
111 | + $route = '/'.$route; |
|
112 | 112 | } |
113 | 113 | return $route; |
114 | 114 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function getFullUrl(): string |
144 | 144 | { |
145 | - return $this->getSchemeAndHttpHost() . $this->getRequestUri(); |
|
145 | + return $this->getSchemeAndHttpHost().$this->getRequestUri(); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | { |
169 | 169 | $sub = null; |
170 | 170 | if ($this->getInterfaceSlug() && Str::length($this->getInterfaceSlug()) > 0) { |
171 | - $sub = $this->getInterfaceSlug() . '/'; |
|
171 | + $sub = $this->getInterfaceSlug().'/'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | if ($this->languageInPath()) { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | if (Any::isArray($value)) { |
25 | 25 | $value = implode('.', $value); |
26 | 26 | } |
27 | - $hash = md5($hash . $property . '=' . $value); |
|
27 | + $hash = md5($hash.$property.'='.$value); |
|
28 | 28 | } |
29 | 29 | return $hash; |
30 | 30 | } |