@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | $sourcePath => $viewPath, |
| 69 | 69 | ], 'views'); |
| 70 | 70 | |
| 71 | - $this->loadViewsFrom(array_merge(array_map(function ($path) { |
|
| 72 | - return $path . '/modules/user'; |
|
| 73 | - }, \Config::get('view.paths')), [$sourcePath]), 'user'); |
|
| 71 | + $this->loadViewsFrom(array_merge(array_map(function($path) { |
|
| 72 | + return $path.'/modules/user'; |
|
| 73 | + }, \Config::get('view.paths')), [ $sourcePath ]), 'user'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -108,6 +108,6 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function provides() |
| 110 | 110 | { |
| 111 | - return []; |
|
| 111 | + return [ ]; |
|
| 112 | 112 | } |
| 113 | 113 | } |
@@ -36,22 +36,22 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function scanDirectories(): array |
| 38 | 38 | { |
| 39 | - $bootstrap = []; |
|
| 39 | + $bootstrap = [ ]; |
|
| 40 | 40 | |
| 41 | 41 | foreach (\Module::all() as $module) { |
| 42 | 42 | foreach ($this->moduleEntityDirectories as $directory) { |
| 43 | 43 | $directory = ucfirst($directory); |
| 44 | - $directoryPath = $module->getPath() . '/' . $directory; |
|
| 45 | - $namespace = 'Modules' . '\\' . $module->getName(); |
|
| 44 | + $directoryPath = $module->getPath().'/'.$directory; |
|
| 45 | + $namespace = 'Modules'.'\\'.$module->getName(); |
|
| 46 | 46 | if (file_exists($directoryPath)) { |
| 47 | 47 | $files = scandir($directoryPath); |
| 48 | 48 | foreach ($files as $fileName) { |
| 49 | 49 | if ($this->isPhpFile($fileName)) { |
| 50 | 50 | $className = basename($fileName, '.php'); |
| 51 | - $class = $namespace . '\\' . $directory . '\\' . $className; |
|
| 51 | + $class = $namespace.'\\'.$directory.'\\'.$className; |
|
| 52 | 52 | try { |
| 53 | 53 | if (new $class() instanceof Command) { |
| 54 | - $bootstrap['commands'][] = $class; |
|
| 54 | + $bootstrap[ 'commands' ][ ] = $class; |
|
| 55 | 55 | } |
| 56 | 56 | } catch (\Exception $e) { |
| 57 | 57 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | private function isPhpFile(string $fileName): bool |
| 68 | 68 | { |
| 69 | - return strlen($fileName) > 5 && '.php' === ($fileName[-4] . $fileName[-3] . $fileName[-2] . $fileName[-1]); |
|
| 69 | + return strlen($fileName) > 5 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | private function loadBootstrapFromCache() |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | public function getCommands(): array |
| 86 | 86 | { |
| 87 | - return $this->loadBootstrapFromCache()['commands']; |
|
| 87 | + return $this->loadBootstrapFromCache()[ 'commands' ]; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | public function getCachePath(): string |
| 91 | 91 | { |
| 92 | - return app()->bootstrapPath() . '/cache/' . $this->cacheFile; |
|
| 92 | + return app()->bootstrapPath().'/cache/'.$this->cacheFile; |
|
| 93 | 93 | } |
| 94 | 94 | } |