Completed
Push — master ( 098b79...486bc3 )
by Michal
02:06
created
config_examples/Nette/latte_kdyby_one_file_saver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
 use Efabrica\TranslationsAutomatization\TokenModifier\PrefixTranslationKeyTokenModifier;
15 15
 use Efabrica\TranslationsAutomatization\TranslationFinder;
16 16
 
17
-$storage = new NeonFileStorage($basePath . '/app/lang/dictionary.sk_SK.neon', '    ');
17
+$storage = new NeonFileStorage($basePath.'/app/lang/dictionary.sk_SK.neon', '    ');
18 18
 $saver = new OneFileTranslationSaver($storage);
19 19
 $translationFinder = new TranslationFinder($saver);
20 20
 
21
-$fileFinder = new FileFinder([$basePath . '/app'], ['latte']);
21
+$fileFinder = new FileFinder([$basePath.'/app'], ['latte']);
22 22
 
23 23
 $textFinder = new RegexTextFinder();
24 24
 $textFinder->addPattern('/\{\_(.*?)\}/', null);
Please login to merge, or discard this patch.
src/composer_autoloader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function () {
3
+return function() {
4 4
     $files = [
5
-        __DIR__ . '/../../../autoload.php',  // composer dependency
6
-        __DIR__ . '/../vendor/autoload.php', // stand-alone package
5
+        __DIR__.'/../../../autoload.php', // composer dependency
6
+        __DIR__.'/../vendor/autoload.php', // stand-alone package
7 7
     ];
8 8
     foreach ($files as $file) {
9 9
         if (is_file($file)) {
Please login to merge, or discard this patch.
src/Command/TranslationFinderCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
     protected function execute(InputInterface $input, OutputInterface $output)
23 23
     {
24 24
         if (!is_file($input->getOption('config'))) {
25
-            throw new InvalidArgumentException('File "' . $input->getOption('config') . '" does not exist');
25
+            throw new InvalidArgumentException('File "'.$input->getOption('config').'" does not exist');
26 26
         }
27 27
         parse_str($input->getOption('params'), $params);
28 28
         extract($params);
29 29
 
30 30
         $translationFinder = require_once $input->getOption('config');
31 31
         if (!$translationFinder instanceof TranslationFinder) {
32
-            throw new InvalidConfigInstanceReturnedException('"' . (is_object($translationFinder) ? get_class($translationFinder) : $translationFinder) . '" is not instance of ' . TranslationFinder::class);
32
+            throw new InvalidConfigInstanceReturnedException('"'.(is_object($translationFinder) ? get_class($translationFinder) : $translationFinder).'" is not instance of '.TranslationFinder::class);
33 33
         }
34 34
 
35 35
         $result = $translationFinder->translate();
36
-        $output->writeln('<comment>' . $result . ' tokens replaced</comment>');
36
+        $output->writeln('<comment>'.$result.' tokens replaced</comment>');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/Bridge/KdybyTranslation/Storage/NeonFileStorage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         foreach ($texts as $key => $value) {
51 51
             if (!is_array($value)) {
52
-                $translations[$this->prefix . $key] = $value;
52
+                $translations[$this->prefix.$key] = $value;
53 53
                 continue;
54 54
             }
55 55
             $translations = $this->arrayToFlat($this->shiftArrayKey($value, $key), $translations);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $newTexts = [];
63 63
         foreach ($texts as $key => $value) {
64
-            $newTexts[$parentKey . '.' . $key] = $value;
64
+            $newTexts[$parentKey.'.'.$key] = $value;
65 65
         }
66 66
         return $newTexts;
67 67
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             return $translations;
75 75
         }
76 76
         if (isset($translations[$keyPart]) && is_string($translations[$keyPart])) {
77
-            $translations[$keyPart . '.' . implode('.', $translationKeyParts)] = $text;
77
+            $translations[$keyPart.'.'.implode('.', $translationKeyParts)] = $text;
78 78
             return $translations;
79 79
         }
80 80
         $translations[$keyPart] = $this->addToTranslations($translations[$keyPart] ?? [], $translationKeyParts, $text);
Please login to merge, or discard this patch.