@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | { |
19 | 19 | $this->setName('check:dictionaries') |
20 | 20 | ->setDescription('Compare all dictionaries for all languages if there are all translation keys in all of them') |
21 | - ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of ' . CheckDictionariesConfig::class . ' have to be returned') |
|
21 | + ->addArgument('config', InputArgument::REQUIRED, 'Path to config file. Instance of '.CheckDictionariesConfig::class.' have to be returned') |
|
22 | 22 | ->addOption('params', null, InputOption::VALUE_REQUIRED, 'Params for config in format --params="a=b&c=d"'); |
23 | 23 | } |
24 | 24 | |
25 | 25 | protected function execute(InputInterface $input, OutputInterface $output) |
26 | 26 | { |
27 | 27 | if (!is_file($input->getArgument('config'))) { |
28 | - throw new InvalidArgumentException('File "' . $input->getArgument('config') . '" does not exist'); |
|
28 | + throw new InvalidArgumentException('File "'.$input->getArgument('config').'" does not exist'); |
|
29 | 29 | } |
30 | 30 | parse_str($input->getOption('params'), $params); |
31 | 31 | extract($params); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | throw $checkDictionariesConfig; |
36 | 36 | } |
37 | 37 | if (!$checkDictionariesConfig instanceof CheckDictionariesConfig) { |
38 | - throw new InvalidConfigInstanceReturnedException('"' . (is_object($checkDictionariesConfig) ? get_class($checkDictionariesConfig) : $checkDictionariesConfig) . '" is not instance of ' . CheckDictionariesConfig::class); |
|
38 | + throw new InvalidConfigInstanceReturnedException('"'.(is_object($checkDictionariesConfig) ? get_class($checkDictionariesConfig) : $checkDictionariesConfig).'" is not instance of '.CheckDictionariesConfig::class); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $output->writeln(''); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | $missingTranslations = array_diff(array_keys($dictionary1), array_keys($dictionary2)); |
52 | 52 | foreach ($missingTranslations as $missingTranslation) { |
53 | - $errors[] = 'Missing translation for key ' . $missingTranslation . ' for language ' . $lang2; |
|
53 | + $errors[] = 'Missing translation for key '.$missingTranslation.' for language '.$lang2; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $output->writeln(''); |
64 | - $output->writeln('<comment>' . count($errors) . ' errors found</comment>'); |
|
64 | + $output->writeln('<comment>'.count($errors).' errors found</comment>'); |
|
65 | 65 | return count($errors); |
66 | 66 | } |
67 | 67 | } |