Passed
Push — master ( 18384e...c250c5 )
by Mihail
02:44
created
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/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/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/Arch/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
             return;
39 39
         }
Please login to merge, or discard this patch.
src/Network/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
     {
23 23
         $to = trim($to, '/');
24 24
         if (!$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
 }
Please login to merge, or discard this patch.
src/Network/Request.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()) {
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('_exceptions/' . $this->tpl, ['msg' => $this->text]);
52
+            $rawResponse = App::$View->render('_exceptions/'.$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.