@@ -26,7 +26,7 @@ |
||
26 | 26 | if ($handle = opendir($root)) { |
27 | 27 | while (false !== ($entry = readdir($handle))) { |
28 | 28 | if ($entry != "." && $entry != "..") { |
29 | - $path = $root . '/' . $entry . '/view/cache'; |
|
29 | + $path = $root.'/'.$entry.'/view/cache'; |
|
30 | 30 | if (file_exists($path)) { |
31 | 31 | self::removeFromDir($path); |
32 | 32 | } |
@@ -23,10 +23,10 @@ |
||
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 | } |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |