@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function config($key) |
| 102 | 102 | { |
| 103 | - return collect($this->getManifest())->flatMap(function ($configuration) use ($key) { |
|
| 104 | - return (array)($configuration[$key] ?? []); |
|
| 103 | + return collect($this->getManifest())->flatMap(function($configuration) use ($key) { |
|
| 104 | + return (array) ($configuration[$key] ?? []); |
|
| 105 | 105 | })->filter()->all(); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -112,11 +112,11 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | protected function getManifest() |
| 114 | 114 | { |
| 115 | - if (! is_null($this->manifest)) { |
|
| 115 | + if (!is_null($this->manifest)) { |
|
| 116 | 116 | return $this->manifest; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if (! is_file($this->manifestPath)) { |
|
| 119 | + if (!is_file($this->manifestPath)) { |
|
| 120 | 120 | $this->build(); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | protected function write(array $manifest): void |
| 157 | 157 | { |
| 158 | - if (! is_writable($dirname = dirname($this->manifestPath))) { |
|
| 158 | + if (!is_writable($dirname = dirname($this->manifestPath))) { |
|
| 159 | 159 | throw new Exception("The {$dirname} directory must be present and writable."); |
| 160 | 160 | } |
| 161 | 161 | $this->files->replace( |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | { |
| 169 | 169 | //todo check this section store on module.php or not? |
| 170 | 170 | $this->getModulesData() |
| 171 | - ->each(function (array $manifest) { |
|
| 171 | + ->each(function(array $manifest) { |
|
| 172 | 172 | if (empty($manifest['files'])) { |
| 173 | 173 | return; |
| 174 | 174 | } |
@@ -181,17 +181,17 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | public function getModulesData(): Collection |
| 183 | 183 | { |
| 184 | - if (! empty(self::$manifestData) && ! app()->runningUnitTests()) { |
|
| 184 | + if (!empty(self::$manifestData) && !app()->runningUnitTests()) { |
|
| 185 | 185 | return self::$manifestData; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | self::$manifestData = $this->paths |
| 189 | - ->flatMap(function ($path) { |
|
| 189 | + ->flatMap(function($path) { |
|
| 190 | 190 | $manifests = $this->files->glob("{$path}/module.json"); |
| 191 | 191 | is_array($manifests) || $manifests = []; |
| 192 | 192 | |
| 193 | 193 | return collect($manifests) |
| 194 | - ->map(function ($manifest) { |
|
| 194 | + ->map(function($manifest) { |
|
| 195 | 195 | return [ |
| 196 | 196 | 'module_directory' => dirname($manifest), |
| 197 | 197 | ...$this->files->json($manifest), |