Completed
Push — master ( 1494ba...ff2012 )
by Igor
03:38 queued 01:33
created
src/Core/Application.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct($appRoot)
24 24
     {
25
-        $appRoot = rtrim($appRoot, '/') . '/';
25
+        $appRoot = rtrim($appRoot, '/').'/';
26 26
         $this->packageRoot = $appRoot;
27 27
 
28 28
         /**
29 29
          * Register autoload to app/$package/src dir's.
30 30
          */
31
-        spl_autoload_register(function ($path) use ($appRoot) {
31
+        spl_autoload_register(function($path) use ($appRoot) {
32 32
             $path = explode('\\', $path);
33
-            array_shift($path);                           // Vendor
34
-            $package = $appRoot . array_shift($path); // Package
35
-            $path = $package . '/src/' . implode('/', $path) . '.php';
33
+            array_shift($path); // Vendor
34
+            $package = $appRoot.array_shift($path); // Package
35
+            $path = $package.'/src/'.implode('/', $path).'.php';
36 36
             if (file_exists($path)) {
37 37
                 require_once $path;
38 38
             }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $request = new Request($languageList, $packageList, $url);
55 55
 
56
-        $this->packageRoot .= $request->package() . '/';
56
+        $this->packageRoot .= $request->package().'/';
57 57
 
58 58
         /**
59 59
          * Process request.
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
             /**
66 66
              * Path to router class.
67 67
              */
68
-            $path = $this->packageRoot . $routeClassList[$request->package()] . '.php';
68
+            $path = $this->packageRoot.$routeClassList[$request->package()].'.php';
69 69
             if (file_exists($path)) {
70 70
                 require $path;
71 71
                 /**
72 72
                  * Name of router class.
73 73
                  */
74
-                $route = $request->package() . '\\' .  $routeClassList[$request->package()];
74
+                $route = $request->package().'\\'.$routeClassList[$request->package()];
75 75
                 /**
76 76
                  * @var IRoute $route
77 77
                  */
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $response->headerStatus(404);
99 99
 
100 100
         $content = '404 Not Found';
101
-        if (file_exists($this->packageRoot . '/view/404.html.php')) {
101
+        if (file_exists($this->packageRoot.'/view/404.html.php')) {
102 102
             $content = (new Native($this->packageRoot))->getContent('404.html.php');
103 103
         }
104 104
 
Please login to merge, or discard this patch.
src/Core/DefaultRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
     {
26 26
         $packageRoot = rtrim($packageRoot, '/');
27 27
         $route = preg_replace('/\/\d+/u', '/D', $request->route());
28
-        $path = $packageRoot . '/Route/' . $route . '/' . $request->method() . '.php';
28
+        $path = $packageRoot.'/Route/'.$route.'/'.$request->method().'.php';
29 29
         if (file_exists($path)) {
30 30
             require $path;
31
-            $controllerClass = $request->package() . '\\Route_' . str_replace('/', '_', $route) . '\\' . $request->method();
31
+            $controllerClass = $request->package().'\\Route_'.str_replace('/', '_', $route).'\\'.$request->method();
32 32
             /**
33 33
              * @var BaseController $controller
34 34
              */
Please login to merge, or discard this patch.