Completed
Push — master ( 1fd9bf...1ba521 )
by Mihail
04:08
created
src/Ffcms/Core/Network/Request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
         $basePath = trim(App::$Properties->get('basePath'), '/');
62 62
         if ($basePath !== null && Str::length($basePath) > 0) {
63
-            $basePath = '/' . $basePath;
63
+            $basePath = '/'.$basePath;
64 64
         }
65 65
 
66 66
         if (!defined('env_no_uri') || env_no_uri === false) {
67
-            $basePath .= '/' . strtolower(env_name);
67
+            $basePath .= '/'.strtolower(env_name);
68 68
         }
69 69
 
70 70
         // we never try to use path's without friendly url's
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             } else {
91 91
                 // try to find language in pathway
92 92
                 foreach (App::$Properties->get('languages') as $lang) {
93
-                    if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
93
+                    if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
94 94
                         $this->language = $lang;
95 95
                         $this->languageInPath = true;
96 96
                     }
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                     // parse query string
118 118
                     $queryString = null;
119 119
                     if (count($this->query->all()) > 0) {
120
-                        $queryString = '?' . http_build_query($this->query->all());
120
+                        $queryString = '?'.http_build_query($this->query->all());
121 121
                     }
122 122
 
123 123
                     // build response with redirect to language-based path
124
-                    $response = new Redirect($this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString);
124
+                    $response = new Redirect($this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString);
125 125
                     $response->send();
126 126
                     exit();
127 127
                 }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         if (array_key_exists($pathway, $routing['Redirect'])) {
181 181
             $target = $this->getSchemeAndHttpHost(); // . $this->getBasePath() . '/' . rtrim($routing['Redirect'][$pathway], '/');
182 182
             if ($this->getBasePath() !== null && !Str::likeEmpty($this->getBasePath())) {
183
-                $target .= '/' . $this->getBasePath();
183
+                $target .= '/'.$this->getBasePath();
184 184
             }
185 185
             $target .= rtrim($routing['Redirect'][$pathway], '/');
186 186
             $redirect = new Redirect($target);
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
             // find "new path" as binding uri slug
207 207
             $binding = array_search($pathway, $map, true);
208 208
             // build url to redirection
209
-            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
209
+            $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
210 210
             if (App::$Properties->get('multiLanguage')) {
211
-                $url .= $this->language . '/';
211
+                $url .= $this->language.'/';
212 212
             }
213 213
             $url .= ltrim($binding, '/');
214 214
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     {
303 303
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
304 304
         if (!Str::startsWith('/', $route)) {
305
-            $route = '/' . $route;
305
+            $route = '/'.$route;
306 306
         }
307 307
         return $route;
308 308
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
      */
428 428
     public function getFullUrl()
429 429
     {
430
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
430
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
431 431
     }
432 432
 
433 433
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/System/NativeGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $purifier = App::$Memory->get('object.purifier.helpers');
24 24
         } else {
25 25
             $config = \HTMLPurifier_Config::createDefault();
26
-            $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/');
26
+            $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/');
27 27
             $config->set('AutoFormat.AutoParagraph', false);
28 28
 
29 29
             // allow use target=_blank for links
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
         $build = null;
66 66
         foreach ($property as $p => $v) {
67 67
             if ($v === null || $v === false || $v === true) {
68
-                $build .= ' ' . self::nohtml($p);
68
+                $build .= ' '.self::nohtml($p);
69 69
             } else {
70
-                $build .= ' ' . self::nohtml($p) . '="' . self::nohtml($v) . '"';
70
+                $build .= ' '.self::nohtml($p).'="'.self::nohtml($v).'"';
71 71
             }
72 72
         }
73 73
         return $build;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public static function buildSingleTag($tagName, array $property = null, $closeSlash = true)
84 84
     {
85
-        return '<' . self::nohtml($tagName) . self::applyProperty($property) . ($closeSlash ? '/>' : '>');
85
+        return '<'.self::nohtml($tagName).self::applyProperty($property).($closeSlash ? '/>' : '>');
86 86
     }
87 87
 
88 88
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $value = self::nohtml($value);
101 101
         }
102 102
         
103
-        return '<' . $tagName . self::applyProperty($property) . '>' . $value . '</' . $tagName . '>';
103
+        return '<'.$tagName.self::applyProperty($property).'>'.$value.'</'.$tagName.'>';
104 104
     }
105 105
 
106 106
     /**
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
                 if (!Str::contains('/', $elementPoint) || count($elementArray) < 2) {
143 143
                     $active = $elementPoint === $currentPoint;
144 144
                 } else {
145
-                    $elementPoint = $elementArray[0] . '/' . $elementArray[1];
145
+                    $elementPoint = $elementArray[0].'/'.$elementArray[1];
146 146
                     $active = Str::startsWith($elementPoint, $currentPoint);
147 147
                 }
148 148
                 break;
149 149
             case 'id':
150 150
                 $elementArray = explode('/', $elementPoint);
151
-                $elementPoint = $elementArray[0] . '/' . $elementArray[1];
151
+                $elementPoint = $elementArray[0].'/'.$elementArray[1];
152 152
                 if ($elementArray[2] === null) { // looks like id is not defined in element
153 153
                     if (Str::contains('?', $currentPoint)) {
154 154
                         $currentPoint = Str::firstIn($currentPoint, '?');
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                     $currentToId = implode('/', array_slice($currentArray, 0, 3));
158 158
                     $active = $elementPoint === $currentToId;
159 159
                 } else {
160
-                    $elementPoint .= '/' . $elementArray[2];
160
+                    $elementPoint .= '/'.$elementArray[2];
161 161
                     $active = Str::startsWith($elementPoint, $currentPoint);
162 162
                 }
163 163
                 break;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public static function convertLink($uri)
214 214
     {
215
-        $link = App::$Alias->baseUrl . '/';
215
+        $link = App::$Alias->baseUrl.'/';
216 216
         if (Obj::isArray($uri)) {
217 217
             $link .= Url::buildPathway($uri);
218 218
         } elseif (Str::startsWith('http', $uri)) {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     public static function encode($uri)
234 234
     {
235
-        return implode('/', array_map(function($v){
235
+        return implode('/', array_map(function($v) {
236 236
             return urlencode($v);
237 237
         }, explode('/', $uri)));
238 238
     }
Please login to merge, or discard this patch.