@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $basePath = trim(App::$Properties->get('basePath'), '/'); |
| 60 | 60 | if ($basePath !== null && Str::length($basePath) > 0) { |
| 61 | - $basePath = '/' . $basePath; |
|
| 61 | + $basePath = '/'.$basePath; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if (!defined('env_no_uri') || env_no_uri === false) { |
| 65 | - $basePath .= '/' . strtolower(env_name); |
|
| 65 | + $basePath .= '/'.strtolower(env_name); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // we never try to use path's without friendly url's |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); |
| 97 | 97 | if (!Str::startsWith('/', $route)) { |
| 98 | - $route = '/' . $route; |
|
| 98 | + $route = '/'.$route; |
|
| 99 | 99 | } |
| 100 | 100 | return $route; |
| 101 | 101 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getFullUrl(): string |
| 131 | 131 | { |
| 132 | - return $this->getSchemeAndHttpHost() . $this->getRequestUri(); |
|
| 132 | + return $this->getSchemeAndHttpHost().$this->getRequestUri(); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $url = $this->getSchemeAndHttpHost(); |
| 157 | 157 | $sub = null; |
| 158 | 158 | if ($this->getInterfaceSlug() && Str::length($this->getInterfaceSlug()) > 0) { |
| 159 | - $sub = $this->getInterfaceSlug() . '/'; |
|
| 159 | + $sub = $this->getInterfaceSlug().'/'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if ($this->languageInPath()) { |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | // check if class exist |
| 37 | 37 | if (!class_exists(self::$class)) { |
| 38 | - return 'Error: Widget is not founded: ' . self::$class; |
|
| 38 | + return 'Error: Widget is not founded: '.self::$class; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** @var iWidget $object */ |
@@ -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(); |