Completed
Push — master ( 7446b8...d37fab )
by Igor
02:28
created
src/Core/Application.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@  discard block
 block discarded – undo
32 32
         /**
33 33
          * Register autoload to app/$package/src dir's.
34 34
          */
35
-        spl_autoload_register(function ($path) use ($packageRoot) {
36
-            $package = rtrim($packageRoot, '/') . '/';
35
+        spl_autoload_register(function($path) use ($packageRoot) {
36
+            $package = rtrim($packageRoot, '/').'/';
37 37
             $path = explode('\\', $path);
38
-            array_shift($path);             // Vendor
38
+            array_shift($path); // Vendor
39 39
             $package .= array_shift($path); // Package
40
-            $path = $package . '/src/' . implode('/', $path) . '.php';
40
+            $path = $package.'/src/'.implode('/', $path).'.php';
41 41
             if (file_exists($path)) {
42 42
                 require_once $path;
43 43
             }
44 44
         });
45 45
 
46
-        $packageRoot .= $request->package() . '/';
46
+        $packageRoot .= $request->package().'/';
47 47
 
48 48
         /**
49 49
          * Process request.
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
             /**
56 56
              * Path to router class.
57 57
              */
58
-            $path = $packageRoot . $request->packageRoute()  . '.php';
58
+            $path = $packageRoot.$request->packageRoute().'.php';
59 59
             if (file_exists($path)) {
60 60
                 require $path;
61 61
                 /**
62 62
                  * Name of router class.
63 63
                  */
64
-                $route = $request->package() . '\\' . $request->packageRoute();
64
+                $route = $request->package().'\\'.$request->packageRoute();
65 65
                 /**
66 66
                  * @var DefaultRoute $route
67 67
                  */
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $response->headerStatus(404);
88 88
 
89 89
         $content = '404 Not Found';
90
-        if (file_exists($packageRoot . '/view/404.html.php')) {
90
+        if (file_exists($packageRoot.'/view/404.html.php')) {
91 91
             $template = new Native($packageRoot);
92 92
             $content = $template->getContent('404.html.php');
93 93
         }
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
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         /**
73 73
          * Request URL.
74 74
          */
75
-        $this->url = '/' . $url;
75
+        $this->url = '/'.$url;
76 76
 
77 77
         /**
78 78
          * Get method.
@@ -109,20 +109,20 @@  discard block
 block discarded – undo
109 109
         $controller = '';
110 110
         if (false !== strpos($this->url, '.php')) {
111 111
             $controller = explode('.php', $this->url);
112
-            $controller = ltrim($controller[0], '/') . '.php';
112
+            $controller = ltrim($controller[0], '/').'.php';
113 113
         }
114 114
         $route = trim($route, '/');
115 115
         if ('Original' == $this->package) {
116 116
             if ($this->languageCode != $this->languageDefault) {
117
-                $url = trim('/' . $this->languageCode . '/' . $route, '/');
117
+                $url = trim('/'.$this->languageCode.'/'.$route, '/');
118 118
             } else {
119
-                $url = trim('/' . $route, '/');
119
+                $url = trim('/'.$route, '/');
120 120
             }
121 121
         } else {
122 122
             if ($this->languageCode != $this->languageDefault) {
123
-                $url = trim('/' . $this->languageCode . '/' . lcfirst($this->package) . '/' . $route, '/');
123
+                $url = trim('/'.$this->languageCode.'/'.lcfirst($this->package).'/'.$route, '/');
124 124
             } else {
125
-                $url = trim('/' . lcfirst($this->package) . '/' . $route, '/');
125
+                $url = trim('/'.lcfirst($this->package).'/'.$route, '/');
126 126
             }
127 127
         }
128 128
         if ($domain) {
@@ -141,15 +141,15 @@  discard block
 block discarded – undo
141 141
                 $url = 'http://';
142 142
             }
143 143
             if (empty($controller)) {
144
-                $url .= $host . '/' . $url;
144
+                $url .= $host.'/'.$url;
145 145
             } else {
146
-                $url .= $host . '/' . $controller . '/' . $url;
146
+                $url .= $host.'/'.$controller.'/'.$url;
147 147
             }
148 148
         } else {
149 149
             if (empty($controller)) {
150
-                $url = '/' . $url;
150
+                $url = '/'.$url;
151 151
             } else {
152
-                $url = '/' . $controller . '/' . $url;
152
+                $url = '/'.$controller.'/'.$url;
153 153
             }
154 154
         }
155 155
 
Please login to merge, or discard this patch.