@@ -24,17 +24,17 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct(string $appRoot) |
| 26 | 26 | { |
| 27 | - $appRoot = rtrim($appRoot, '/') . '/'; |
|
| 27 | + $appRoot = rtrim($appRoot, '/').'/'; |
|
| 28 | 28 | $this->packageRoot = $appRoot; |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Register autoload to app/package/$package/src dir's. |
| 32 | 32 | */ |
| 33 | - spl_autoload_register(function ($path) use ($appRoot) { |
|
| 33 | + spl_autoload_register(function($path) use ($appRoot) { |
|
| 34 | 34 | $path = explode('\\', $path); |
| 35 | - array_shift($path); // Vendor |
|
| 36 | - $package = $appRoot . 'package/' . array_shift($path); // Package |
|
| 37 | - $path = $package . '/src/' . implode('/', $path) . '.php'; |
|
| 35 | + array_shift($path); // Vendor |
|
| 36 | + $package = $appRoot.'package/'.array_shift($path); // Package |
|
| 37 | + $path = $package.'/src/'.implode('/', $path).'.php'; |
|
| 38 | 38 | if (file_exists($path)) { |
| 39 | 39 | require_once $path; |
| 40 | 40 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $request = new Request($languageList, $packageList, $url); |
| 58 | 58 | |
| 59 | - $this->packageRoot .= 'package/' . $request->package() . '/'; |
|
| 59 | + $this->packageRoot .= 'package/'.$request->package().'/'; |
|
| 60 | 60 | |
| 61 | 61 | try { |
| 62 | 62 | /** |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | /** |
| 67 | 67 | * Path to custom router class. |
| 68 | 68 | */ |
| 69 | - $path = $this->packageRoot . 'CustomRoute.php'; |
|
| 69 | + $path = $this->packageRoot.'CustomRoute.php'; |
|
| 70 | 70 | if (file_exists($path)) { |
| 71 | 71 | require $path; |
| 72 | - $route = $request->package() . '\\CustomRoute'; |
|
| 72 | + $route = $request->package().'\\CustomRoute'; |
|
| 73 | 73 | /** |
| 74 | 74 | * @var IRoute $route |
| 75 | 75 | */ |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | $this->response->setStatusCode(404); |
| 109 | 109 | $content = '404 Not Found'; |
| 110 | - if (file_exists($this->packageRoot . '/view/404.html.php')) { |
|
| 110 | + if (file_exists($this->packageRoot.'/view/404.html.php')) { |
|
| 111 | 111 | $content = (new Native($this->packageRoot))->getContent('404.html.php'); |
| 112 | 112 | } |
| 113 | 113 | $this->response->setContent($content); |