|
@@ -59,7 +59,7 @@ discard block |
|
|
block discarded – undo |
|
59
|
59
|
public function sourceCodePaths(): Collection |
|
60
|
60
|
{ |
|
61
|
61
|
$paths = app(ModuleService::class)->findByInterface(ModuleMyArtJaubInterface::class) |
|
62
|
|
- ->mapWithKeys(function (ModuleMyArtJaubInterface $module): array { |
|
|
62
|
+ ->mapWithKeys(function(ModuleMyArtJaubInterface $module): array { |
|
63
|
63
|
return [$module->name() => [realpath($module->resourcesFolder())]]; |
|
64
|
64
|
}); |
|
65
|
65
|
|
|
@@ -68,7 +68,7 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
foreach ($maj_packages as list($maj_package, $psr4_paths)) { |
|
69
|
69
|
/** @var PackageInterface $maj_package */ |
|
70
|
70
|
$installer_name = $maj_package->getExtra()['installer-name'] ?? ''; |
|
71
|
|
- $key = $installer_name === '' ? $maj_package->getName() : '_' . $installer_name . '_'; |
|
|
71
|
+ $key = $installer_name === '' ? $maj_package->getName() : '_'.$installer_name.'_'; |
|
72
|
72
|
if (count($psr4_paths) > 0) { |
|
73
|
73
|
$paths->put($key, array_merge($paths->get($key, []), $psr4_paths)); |
|
74
|
74
|
} |
|
@@ -92,8 +92,8 @@ discard block |
|
|
block discarded – undo |
|
92
|
92
|
foreach ($source_code_paths as $package => $paths) { |
|
93
|
93
|
$php_files = array(); |
|
94
|
94
|
foreach ($paths as $path) { |
|
95
|
|
- $php_files = [...$php_files, ...$this->glob_recursive($path . '/*.php')]; |
|
96
|
|
- $php_files = [...$php_files, ...$this->glob_recursive($path . '/*.phtml')]; |
|
|
95
|
+ $php_files = [...$php_files, ...$this->glob_recursive($path.'/*.php')]; |
|
|
96
|
+ $php_files = [...$php_files, ...$this->glob_recursive($path.'/*.phtml')]; |
|
97
|
97
|
} |
|
98
|
98
|
|
|
99
|
99
|
$php_scanner = new PhpScanner(Translations::create($package)); |
|
@@ -127,7 +127,7 @@ discard block |
|
|
block discarded – undo |
|
127
|
127
|
public function listMyArtJaubTranslations(string $language): Collection |
|
128
|
128
|
{ |
|
129
|
129
|
return app(ModuleService::class)->findByInterface(ModuleMyArtJaubInterface::class) |
|
130
|
|
- ->mapWithKeys(function (ModuleMyArtJaubInterface $module) use ($language): array { |
|
|
130
|
+ ->mapWithKeys(function(ModuleMyArtJaubInterface $module) use ($language): array { |
|
131
|
131
|
return [$module->name() => $module->customTranslations($language)]; |
|
132
|
132
|
}); |
|
133
|
133
|
} |
|
@@ -144,10 +144,10 @@ discard block |
|
|
block discarded – undo |
|
144
|
144
|
protected function glob_recursive(string $pattern, int $flags = 0): array |
|
145
|
145
|
{ |
|
146
|
146
|
$files = glob($pattern, $flags) ?: []; |
|
147
|
|
- $dirs = glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: []; |
|
|
147
|
+ $dirs = glob(dirname($pattern).'/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: []; |
|
148
|
148
|
|
|
149
|
149
|
foreach ($dirs as $dir) { |
|
150
|
|
- $files = [...$files, ...$this->glob_recursive($dir . '/' . basename($pattern), $flags)]; |
|
|
150
|
+ $files = [...$files, ...$this->glob_recursive($dir.'/'.basename($pattern), $flags)]; |
|
151
|
151
|
} |
|
152
|
152
|
|
|
153
|
153
|
return $files; |