@@ -71,10 +71,10 @@ |
||
71 | 71 | */ |
72 | 72 | public function loadRoutes(Map $router): void |
73 | 73 | { |
74 | - $router->attach('', '', static function (Map $router): void { |
|
74 | + $router->attach('', '', static function(Map $router): void { |
|
75 | 75 | |
76 | 76 | |
77 | - $router->attach('', '/module-maj/translationtool', static function (Map $router): void { |
|
77 | + $router->attach('', '/module-maj/translationtool', static function(Map $router): void { |
|
78 | 78 | |
79 | 79 | $router->extras([ |
80 | 80 | 'middleware' => [ |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function sourceCodePaths(): Collection |
61 | 61 | { |
62 | 62 | $paths = app(ModuleService::class)->findByInterface(ModuleMyArtJaubInterface::class) |
63 | - ->mapWithKeys(function (ModuleMyArtJaubInterface $module): array { |
|
63 | + ->mapWithKeys(function(ModuleMyArtJaubInterface $module): array { |
|
64 | 64 | return [$module->name() => [realpath($module->resourcesFolder())]]; |
65 | 65 | }); |
66 | 66 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | foreach ($maj_packages as list($maj_package, $psr4_paths)) { |
70 | 70 | /** @var PackageInterface $maj_package */ |
71 | 71 | $installer_name = $maj_package->getExtra()['installer-name'] ?? ''; |
72 | - $key = $installer_name === '' ? $maj_package->getName() : '_' . $installer_name . '_'; |
|
72 | + $key = $installer_name === '' ? $maj_package->getName() : '_'.$installer_name.'_'; |
|
73 | 73 | if (count($psr4_paths) > 0) { |
74 | 74 | $paths->put($key, array_merge($paths->get($key, []), $psr4_paths)); |
75 | 75 | } |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | foreach ($source_code_paths as $package => $paths) { |
94 | 94 | $php_files = array(); |
95 | 95 | foreach ($paths as $path) { |
96 | - $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.php') ?: array()); |
|
97 | - $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.phtml') ?: array()); |
|
96 | + $php_files = array_merge($php_files, $this->glob_recursive($path.'/*.php') ?: array()); |
|
97 | + $php_files = array_merge($php_files, $this->glob_recursive($path.'/*.phtml') ?: array()); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | $php_scanner = new PhpScanner(Translations::create($package)); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | public function listMyArtJaubTranslations(string $language): Collection |
129 | 129 | { |
130 | 130 | return app(ModuleService::class)->findByInterface(ModuleMyArtJaubInterface::class) |
131 | - ->mapWithKeys(function (ModuleMyArtJaubInterface $module) use ($language): array { |
|
131 | + ->mapWithKeys(function(ModuleMyArtJaubInterface $module) use ($language): array { |
|
132 | 132 | return [$module->name() => $module->customTranslations($language)]; |
133 | 133 | }); |
134 | 134 | } |
@@ -145,10 +145,10 @@ discard block |
||
145 | 145 | protected function glob_recursive(string $pattern, int $flags = 0): array |
146 | 146 | { |
147 | 147 | $files = glob($pattern, $flags) ?: []; |
148 | - $dirs = glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: []; |
|
148 | + $dirs = glob(dirname($pattern).'/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: []; |
|
149 | 149 | |
150 | 150 | foreach ($dirs as $dir) { |
151 | - $files = array_merge($files, $this->glob_recursive($dir . '/' . basename($pattern), $flags)); |
|
151 | + $files = array_merge($files, $this->glob_recursive($dir.'/'.basename($pattern), $flags)); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | return $files; |
@@ -91,11 +91,11 @@ |
||
91 | 91 | $key = $translation->getOriginal(); |
92 | 92 | $translation_plural = $translation->getPlural(); |
93 | 93 | if ($translation_plural !== null && strlen($translation_plural) > 0) { |
94 | - $key .= I18N::PLURAL . $translation_plural; |
|
94 | + $key .= I18N::PLURAL.$translation_plural; |
|
95 | 95 | } |
96 | 96 | $translation_context = $translation->getContext(); |
97 | 97 | if ($translation_context !== null && strlen($translation_context) > 0) { |
98 | - $key = $translation_context . I18N::CONTEXT . $key; |
|
98 | + $key = $translation_context.I18N::CONTEXT.$key; |
|
99 | 99 | } |
100 | 100 | return $key; |
101 | 101 | } |