@@ -32,18 +32,18 @@ discard block |
||
| 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 |
||
| 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 BaseRoute $route |
| 67 | 67 | */ |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } else { |
| 73 | 73 | throw new \RuntimeException(sprintf('The file "%s" does not exist', $path)); |
| 74 | 74 | } |
| 75 | - } else { |
|
| 75 | + } else { |
|
| 76 | 76 | $route = new BaseRoute(); |
| 77 | 77 | $route->default($packageRoot, $request); |
| 78 | 78 | if (null !== $route->getResponse()) { |
@@ -87,7 +87,7 @@ discard block |
||
| 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 | } |