Passed
Push — master ( 956756...b9396f )
by Mihail
04:20
created
src/Network/Request/MvcFeatures.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         if (array_key_exists($pathway, $routing['Redirect'])) {
39 39
             $target = $this->getSchemeAndHttpHost(); // . $this->getBasePath() . '/' . rtrim($routing['Redirect'][$pathway], '/');
40 40
             if ($this->getBasePath() !== null && !Str::likeEmpty($this->getBasePath())) {
41
-                $target .= '/' . $this->getBasePath();
41
+                $target .= '/'.$this->getBasePath();
42 42
             }
43 43
             $target .= rtrim($routing['Redirect'][$pathway], '/');
44 44
             $redirect = new RedirectResponse($target);
Please login to merge, or discard this patch.
src/Network/Request/RouteMapFeatures.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
             // find "new path" as binding uri slug
71 71
             $binding = array_search($pathway, $map, true);
72 72
             // build url to redirection
73
-            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
73
+            $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
74 74
             if (App::$Properties->get('multiLanguage')) {
75
-                $url .= $this->language . '/';
75
+                $url .= $this->language.'/';
76 76
             }
77 77
             $url .= ltrim($binding, '/');
78 78
 
Please login to merge, or discard this patch.
src/Network/Request/MultiLanguageFeatures.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         // try to find language in pathway
45 45
         foreach (App::$Properties->get('languages') as $lang) {
46
-            if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
46
+            if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
47 47
                 $this->language = $lang;
48 48
                 $this->languageInPath = true;
49 49
             }
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
         // parse query string
81 81
         $queryString = null;
82 82
         if (count($this->query->all()) > 0) {
83
-            $queryString = '?' . http_build_query($this->query->all());
83
+            $queryString = '?'.http_build_query($this->query->all());
84 84
         }
85 85
 
86 86
         // build response with redirect to language-based path
87
-        $redirectUrl = $this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString;
87
+        $redirectUrl = $this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString;
88 88
         $response = new RedirectResponse($redirectUrl);
89 89
         $response->send();
90 90
         exit();
Please login to merge, or discard this patch.
src/Network/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 
57 57
         $basePath = trim(App::$Properties->get('basePath'), '/');
58 58
         if ($basePath !== null && Str::length($basePath) > 0) {
59
-            $basePath = '/' . $basePath;
59
+            $basePath = '/'.$basePath;
60 60
         }
61 61
 
62 62
         if (!defined('env_no_uri') || env_no_uri === false) {
63
-            $basePath .= '/' . strtolower(env_name);
63
+            $basePath .= '/'.strtolower(env_name);
64 64
         }
65 65
 
66 66
         // we never try to use path's without friendly url's
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
95 95
         if (!Str::startsWith('/', $route)) {
96
-            $route = '/' . $route;
96
+            $route = '/'.$route;
97 97
         }
98 98
         return $route;
99 99
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function getFullUrl(): string
129 129
     {
130
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
130
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
131 131
     }
132 132
 
133 133
     /**
Please login to merge, or discard this patch.
src/Alias.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $this->baseDomain = App::$Properties->get('baseDomain');
63 63
         }
64 64
         // build script url
65
-        $this->scriptUrl = App::$Request->getScheme() . '://' . $this->baseDomain;
65
+        $this->scriptUrl = App::$Request->getScheme().'://'.$this->baseDomain;
66 66
         if (App::$Properties->get('basePath') !== '/') {
67 67
             $this->scriptUrl .= rtrim(App::$Properties->get('basePath'), '/');
68 68
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $this->baseUrlNoLang = $this->baseUrl;
76 76
         if (App::$Request->languageInPath() && App::$Request->getLanguage() !== null) {
77
-            $this->baseUrl .= '/' . App::$Request->getLanguage();
77
+            $this->baseUrl .= '/'.App::$Request->getLanguage();
78 78
         }
79 79
 
80 80
         // @todo: add cron initiation from user if enabled -> move to layout
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
         if (!isset($themeAll[env_name]) || Str::length($themeAll[env_name]) < 1) {
87 87
             $themeAll[env_name] = 'default';
88 88
         }
89
-        $this->currentViewUrl = $this->scriptUrl . '/Apps/View/' . env_name . '/' . $themeAll[env_name];
89
+        $this->currentViewUrl = $this->scriptUrl.'/Apps/View/'.env_name.'/'.$themeAll[env_name];
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/Arch/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $theme = App::$Properties->get('theme')[env_name] ?? 'default';
33 33
         $env = ucfirst(Str::lowerCase(env_name));
34 34
 
35
-        $this->path = root . DIRECTORY_SEPARATOR . 'Apps' . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . $env . DIRECTORY_SEPARATOR . $theme;
35
+        $this->path = root.DIRECTORY_SEPARATOR.'Apps'.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.$env.DIRECTORY_SEPARATOR.$theme;
36 36
 
37 37
         // initialize template engine with path and load default extensions
38 38
         parent::__construct($this->path);
Please login to merge, or discard this patch.
src/App.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
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 = $this->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
@@ -204,10 +204,10 @@  discard block
 block discarded – undo
204 204
                 ]));
205 205
             }
206 206
 
207
-            $this->startMeasure(get_class($callClass) . '::' . $callMethod);
207
+            $this->startMeasure(get_class($callClass).'::'.$callMethod);
208 208
             // make callback call to action in controller and get response
209 209
             $response = call_user_func_array([$callClass, $callMethod], $arguments);
210
-            $this->stopMeasure(get_class($callClass) . '::' . $callMethod);
210
+            $this->stopMeasure(get_class($callClass).'::'.$callMethod);
211 211
 
212 212
             // if no response - throw 404 not found
213 213
             if (!$response) {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 $response = $e->display();
220 220
             } else { // or hook exception to system based :)))
221 221
                 if (App::$Debug) {
222
-                    $msg = $e->getMessage() . $e->getTraceAsString();
222
+                    $msg = $e->getMessage().$e->getTraceAsString();
223 223
                     $response = (new NativeException($msg))->display();
224 224
                 } else {
225 225
                     $response = (new NativeException($e->getMessage()))->display();
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
     private function getCallbackClass()
242 242
     {
243 243
         // define callback class namespace/name full path
244
-        $cName = (self::$Request->getCallbackAlias() ?? '\Apps\Controller\\' . env_name . '\\' . self::$Request->getController());
244
+        $cName = (self::$Request->getCallbackAlias() ?? '\Apps\Controller\\'.env_name.'\\'.self::$Request->getController());
245 245
         if (!class_exists($cName)) {
246
-            throw new NotFoundException('Callback class not found: ' . App::$Security->strip_tags($cName));
246
+            throw new NotFoundException('Callback class not found: '.App::$Security->strip_tags($cName));
247 247
         }
248 248
 
249 249
         return new $cName;
Please login to merge, or discard this patch.
src/Exception/TemplateException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     protected function buildFakePage()
50 50
     {
51 51
         try {
52
-            $rawResponse = App::$View->render('native/errors/' . $this->tpl, ['msg' => $this->text]);
52
+            $rawResponse = App::$View->render('native/errors/'.$this->tpl, ['msg' => $this->text]);
53 53
             if (Str::likeEmpty($rawResponse)) {
54 54
                 $rawResponse = $this->text;
55 55
             }
Please login to merge, or discard this patch.