@@ -42,9 +42,9 @@ |
||
42 | 42 | $extension !== 'module') { |
43 | 43 | return null; |
44 | 44 | } |
45 | - $zip=new ZipArchive; |
|
45 | + $zip = new ZipArchive; |
|
46 | 46 | if ($zip->open($path, ZipArchive::CHECKCONS)) { |
47 | - $unzipPath = $unpackPath.'/'. pathinfo($path, PATHINFO_FILENAME) .'-'.substr(md5_file($path), 0, 8); |
|
47 | + $unzipPath = $unpackPath.'/'.pathinfo($path, PATHINFO_FILENAME).'-'.substr(md5_file($path), 0, 8); |
|
48 | 48 | $zip->extractTo($unzipPath); |
49 | 49 | $zip->close(); |
50 | 50 | return Config::resolve($unzipPath.'/module'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | public function registerModule() |
118 | 118 | { |
119 | 119 | $scan = $this->getApp()->getConfig('app.module.scan-path', []); |
120 | - $cache = $this->getDataPath() .'/module-cache'; |
|
120 | + $cache = $this->getDataPath().'/module-cache'; |
|
121 | 121 | FileSystem::makes($cache); |
122 | 122 | foreach (Builder::scan($scan, $cache) as $module) { |
123 | 123 | $this->finder->add($module->getName(), $module->getVersion()); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @param string $name |
134 | 134 | * @return Module|null |
135 | 135 | */ |
136 | - public function find(string $name):?Module { |
|
136 | + public function find(string $name): ?Module { |
|
137 | 137 | $fullName = $this->finder->getFullName($name); |
138 | 138 | return $this->module[$fullName] ?? null; |
139 | 139 | } |