x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Passed
Pull Request — master (#20)
by Michal
06:42
created
src/Command/Translator/TranslatorCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,21 +16,21 @@
 block discarded – undo
16 16
     {
17 17
         $this->setName('translate')
18 18
             ->setDescription('Creates new language version of translated texts')
19
-            ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of ' . TranslatorConfig::class  . ' have to be returned')
19
+            ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of '.TranslatorConfig::class.' have to be returned')
20 20
             ->addOption('params', null, InputOption::VALUE_REQUIRED, 'Params for config in format a=b&c=d');
21 21
     }
22 22
 
23 23
     protected function execute(InputInterface $input, OutputInterface $output)
24 24
     {
25 25
         if (!is_file($input->getArgument('config'))) {
26
-            throw new InvalidArgumentException('File "' . $input->getArgument('config') . '" does not exist');
26
+            throw new InvalidArgumentException('File "'.$input->getArgument('config').'" does not exist');
27 27
         }
28 28
         parse_str($input->getOption('params'), $params);
29 29
         extract($params);
30 30
 
31 31
         $translatorConfig = require_once $input->getArgument('config');
32 32
         if (!$translatorConfig instanceof TranslatorConfig) {
33
-            throw new InvalidConfigInstanceReturnedException('"' . (is_object($translatorConfig) ? get_class($translatorConfig) : $translatorConfig) . '" is not instance of ' . TranslatorConfig::class);
33
+            throw new InvalidConfigInstanceReturnedException('"'.(is_object($translatorConfig) ? get_class($translatorConfig) : $translatorConfig).'" is not instance of '.TranslatorConfig::class);
34 34
         }
35 35
 
36 36
         $translatorConfig->translate();
Please login to merge, or discard this patch.
src/Command/Extractor/ExtractorCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@
 block discarded – undo
16 16
     {
17 17
         $this->setName('extract')
18 18
             ->setDescription('Finds non-translated texts, replaces them with translate tokens and store these texts to storage')
19
-            ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of ' . ExtractorConfig::class  . ' have to be returned')
19
+            ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of '.ExtractorConfig::class.' have to be returned')
20 20
             ->addOption('params', null, InputOption::VALUE_REQUIRED, 'Params for config in format --params="a=b&c=d"');
21 21
     }
22 22
 
23 23
     protected function execute(InputInterface $input, OutputInterface $output)
24 24
     {
25 25
         if (!is_file($input->getArgument('config'))) {
26
-            throw new InvalidArgumentException('File "' . $input->getArgument('config') . '" does not exist');
26
+            throw new InvalidArgumentException('File "'.$input->getArgument('config').'" does not exist');
27 27
         }
28 28
         parse_str($input->getOption('params'), $params);
29 29
         extract($params);
30 30
 
31 31
         $extractorConfig = require_once $input->getArgument('config');
32 32
         if (!$extractorConfig instanceof ExtractorConfig) {
33
-            throw new InvalidConfigInstanceReturnedException('"' . (is_object($extractorConfig) ? get_class($extractorConfig) : $extractorConfig) . '" is not instance of ' . ExtractorConfig::class);
33
+            throw new InvalidConfigInstanceReturnedException('"'.(is_object($extractorConfig) ? get_class($extractorConfig) : $extractorConfig).'" is not instance of '.ExtractorConfig::class);
34 34
         }
35 35
 
36 36
         $result = $extractorConfig->extract();
37
-        $output->writeln('<comment>' . $result . ' tokens replaced</comment>');
37
+        $output->writeln('<comment>'.$result.' tokens replaced</comment>');
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
config_examples/Nette/latte_kdyby_one_file_saver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 use Efabrica\TranslationsAutomatization\TokenModifier\PrefixTranslationKeyTokenModifier;
16 16
 
17 17
 $basePath = rtrim($basePath, '/');
18
-$storage = new NeonFileStorage($basePath . '/app/lang/dictionary.sk_SK.neon', '    ');
18
+$storage = new NeonFileStorage($basePath.'/app/lang/dictionary.sk_SK.neon', '    ');
19 19
 $saver = new OneFileTranslationSaver($storage);
20 20
 $extractorConfig = new ExtractorConfig($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('/\{\_(.*?)\}/', null);
Please login to merge, or discard this patch.