Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
43 | public function handle() |
||
44 | { |
||
45 | $targetLanguages = Arr::wrap(config('auto-translate.target_language')); |
||
46 | |||
47 | $this->line('Found '.count($targetLanguages).' languages to translate'); |
||
48 | |||
49 | $bar = $this->output->createProgressBar(count($targetLanguages)); |
||
50 | $bar->start(); |
||
51 | |||
52 | foreach ($targetLanguages as $targetLanguage) { |
||
53 | $sourceTranslations = $this->autoTranslator->getSourceTranslations(); |
||
54 | |||
55 | $translated = $this->autoTranslator->translate($targetLanguage, $sourceTranslations); |
||
56 | |||
57 | $this->autoTranslator->fillLanguageFiles($targetLanguage, $translated); |
||
58 | |||
59 | $bar->advance(); |
||
60 | } |
||
61 | |||
62 | $bar->finish(); |
||
63 | |||
64 | $this->info('Translated '.count(Arr::dot($sourceTranslations)).' language keys.'); |
||
65 | } |
||
66 | } |
||
67 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.