Completed
Push — master ( 936c9e...5ab2c2 )
by Igor
02:37
created
src/Core/Application.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct($packageRoot, array $languageList = [], array $packageList = [])
26 26
     {
27
-        $packageRoot = rtrim($packageRoot, '/') . '/';
27
+        $packageRoot = rtrim($packageRoot, '/').'/';
28 28
 
29 29
         self::$packagePath = $packageRoot;
30 30
         self::$languageList = $languageList;
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         /**
34 34
          * Register autoload to app/$package/src dir's.
35 35
          */
36
-        spl_autoload_register(function ($path) use ($packageRoot) {
36
+        spl_autoload_register(function($path) use ($packageRoot) {
37 37
             $path = explode('\\', $path);
38
-            array_shift($path);                           // Vendor
39
-            $package = $packageRoot . array_shift($path); // Package
40
-            $path = $package . '/src/' . implode('/', $path) . '.php';
38
+            array_shift($path); // Vendor
39
+            $package = $packageRoot.array_shift($path); // Package
40
+            $path = $package.'/src/'.implode('/', $path).'.php';
41 41
             if (file_exists($path)) {
42 42
                 require_once $path;
43 43
             }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         self::$request = new Request(self::$languageList, self::$packageList, $url);
58 58
 
59
-        self::$packagePath .= self::$request->package() . '/';
59
+        self::$packagePath .= self::$request->package().'/';
60 60
 
61 61
         /**
62 62
          * Process request.
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
             /**
69 69
              * Path to router class.
70 70
              */
71
-            $path = self::$packagePath . $packageClassList[self::$request->package()] . '.php';
71
+            $path = self::$packagePath.$packageClassList[self::$request->package()].'.php';
72 72
             if (file_exists($path)) {
73 73
                 require $path;
74 74
                 /**
75 75
                  * Name of router class.
76 76
                  */
77
-                $route = self::$request->package() . '\\' .  $packageClassList[self::$request->package()];
77
+                $route = self::$request->package().'\\'.$packageClassList[self::$request->package()];
78 78
                 /**
79 79
                  * @var DefaultRoute $route
80 80
                  */
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $response->headerStatus(404);
101 101
 
102 102
         $content = '404 Not Found';
103
-        if (file_exists(self::$packagePath . '/view/404.html.php')) {
103
+        if (file_exists(self::$packagePath.'/view/404.html.php')) {
104 104
             $content = (new Native(self::$packagePath))->getContent('404.html.php');
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/Bundle/Common/TFileSystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
             $objects = scandir($dir);
24 24
             foreach ($objects as $object) {
25 25
                 if ('.' != $object && '..' != $object) {
26
-                    if ('dir' == filetype($dir . '/' .$object)) {
27
-                        self::removeFromDir($dir . '/' . $object, true);
26
+                    if ('dir' == filetype($dir.'/'.$object)) {
27
+                        self::removeFromDir($dir.'/'.$object, true);
28 28
                     } else {
29
-                        unlink($dir . '/' . $object);
29
+                        unlink($dir.'/'.$object);
30 30
                     }
31 31
                 }
32 32
             }
Please login to merge, or discard this patch.
src/Core/Request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         /**
76 76
          * Request URL.
77 77
          */
78
-        $this->url = '/' . $url;
78
+        $this->url = '/'.$url;
79 79
 
80 80
         /**
81 81
          * Get method.
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
         $controller = '';
164 164
         if (false !== strpos($this->url, '.php')) {
165 165
             $controller = explode('.php', $this->url);
166
-            $controller = ltrim($controller[0], '/') . '.php';
166
+            $controller = ltrim($controller[0], '/').'.php';
167 167
         }
168 168
         $route = trim($route, '/');
169 169
         if ('Original' == $this->package) {
170 170
             if ($this->languageCode != $this->languageDefault) {
171
-                $url = trim('/' . $this->languageCode . '/' . $route, '/');
171
+                $url = trim('/'.$this->languageCode.'/'.$route, '/');
172 172
             } else {
173
-                $url = trim('/' . $route, '/');
173
+                $url = trim('/'.$route, '/');
174 174
             }
175 175
         } else {
176 176
             if ($this->languageCode != $this->languageDefault) {
177
-                $url = trim('/' . $this->languageCode . '/' . lcfirst($this->package) . '/' . $route, '/');
177
+                $url = trim('/'.$this->languageCode.'/'.lcfirst($this->package).'/'.$route, '/');
178 178
             } else {
179
-                $url = trim('/' . lcfirst($this->package) . '/' . $route, '/');
179
+                $url = trim('/'.lcfirst($this->package).'/'.$route, '/');
180 180
             }
181 181
         }
182 182
         if ($domain) {
@@ -194,15 +194,15 @@  discard block
 block discarded – undo
194 194
                 $protocol = 'https://';
195 195
             }
196 196
             if (empty($controller)) {
197
-                $url = $protocol . $host . '/' . $url;
197
+                $url = $protocol.$host.'/'.$url;
198 198
             } else {
199
-                $url = $protocol . $host . '/' . $controller . '/' . $url;
199
+                $url = $protocol.$host.'/'.$controller.'/'.$url;
200 200
             }
201 201
         } else {
202 202
             if (empty($controller)) {
203
-                $url = '/' . $url;
203
+                $url = '/'.$url;
204 204
             } else {
205
-                $url = '/' . $controller . '/' . $url;
205
+                $url = '/'.$controller.'/'.$url;
206 206
             }
207 207
         }
208 208
 
Please login to merge, or discard this patch.