11<?php
2+
23declare (strict_types=1 );
34
45namespace Translation \Bundle \Command ;
1516use Translation \Bundle \Model \Configuration ;
1617use Translation \Bundle \Service \ConfigurationManager ;
1718use Translation \Bundle \Service \Importer ;
18- use function array_filter ;
19- use function count ;
2019
2120final class CheckCommand extends Command
2221{
@@ -92,7 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9291 $ io = new SymfonyStyle ($ input , $ output );
9392
9493 if ($ newMessages > 0 ) {
95- $ io ->error (sprintf ('%d new message(s) have been found, run bin/console translation:extract ' , $ newMessages ));
94+ $ io ->error (\ sprintf ('%d new message(s) have been found, run bin/console translation:extract ' , $ newMessages ));
9695
9796 return 1 ;
9897 }
@@ -101,7 +100,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
101100
102101 if ($ emptyTranslations > 0 ) {
103102 $ io ->error (
104- sprintf ('%d messages have empty translations, please provide translations for them ' , $ emptyTranslations )
103+ \ sprintf ('%d messages have empty translations, please provide translations for them ' , $ emptyTranslations )
105104 );
106105
107106 return 1 ;
@@ -133,14 +132,14 @@ private function countEmptyTranslations(MessageCatalogueInterface $catalogue): i
133132 $ total = 0 ;
134133
135134 foreach ($ catalogue ->getDomains () as $ domain ) {
136- $ emptyTranslations = array_filter (
135+ $ emptyTranslations = \ array_filter (
137136 $ catalogue ->all ($ domain ),
138137 function (string $ message ): bool {
139- return $ message === '' ;
138+ return '' === $ message ;
140139 }
141140 );
142141
143- $ total += count ($ emptyTranslations );
142+ $ total += \ count ($ emptyTranslations );
144143 }
145144
146145 return $ total ;
0 commit comments