@@ -18,10 +18,10 @@ |
||
18 | 18 | |
19 | 19 | public function modifyAll(TokenCollection $tokenCollection): TokenCollection |
20 | 20 | { |
21 | - $pathParts = explode('/', str_replace($this->basePath . '/', '', $tokenCollection->getFilePath())); |
|
21 | + $pathParts = explode('/', str_replace($this->basePath.'/', '', $tokenCollection->getFilePath())); |
|
22 | 22 | array_pop($pathParts); |
23 | 23 | foreach ($tokenCollection->getTokens() as $token) { |
24 | - $newKeyParts = array_filter(array_map('strtolower', $pathParts), function ($pathPart) { |
|
24 | + $newKeyParts = array_filter(array_map('strtolower', $pathParts), function($pathPart) { |
|
25 | 25 | return !in_array($pathPart, $this->excludeDirectoryNames); |
26 | 26 | }); |
27 | 27 | $newKeyParts[] = $token->getTranslationKey(); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | protected function modify(Token $token): Token |
18 | 18 | { |
19 | - $token->changeTranslationKey($this->translationKeyPrefix . $token->getTranslationKey()); |
|
19 | + $token->changeTranslationKey($this->translationKeyPrefix.$token->getTranslationKey()); |
|
20 | 20 | return $token; |
21 | 21 | } |
22 | 22 | } |
@@ -12,14 +12,14 @@ |
||
12 | 12 | use Efabrica\TranslationsAutomatization\TokenModifier\PrefixTranslationKeyTokenModifier; |
13 | 13 | use Efabrica\TranslationsAutomatization\TranslationFinder; |
14 | 14 | |
15 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
15 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
16 | 16 | |
17 | 17 | $basePath = rtrim($argv[1] ?? __DIR__, '/'); |
18 | 18 | |
19 | -$saver = new OneFileTranslationSaver($basePath . '/app/lang/dictionary.sk_SK.neon'); |
|
19 | +$saver = new OneFileTranslationSaver($basePath.'/app/lang/dictionary.sk_SK.neon'); |
|
20 | 20 | $translationFinder = new TranslationFinder($saver); |
21 | 21 | |
22 | -$fileFinder = new FileFinder([$basePath . '/app'], ['latte']); |
|
22 | +$fileFinder = new FileFinder([$basePath.'/app'], ['latte']); |
|
23 | 23 | |
24 | 24 | $textFinder = new RegexTextFinder(); |
25 | 25 | $textFinder->addPattern('/\>([\p{L}\s\.\,\!\?\/\_\-]+)\</siu'); |