Passed
Branch master (a4c265)
by Anton
02:03
created
src/Command/Translator/ExportCommand.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function perform(TranslatorConfig $config, CatalogueManager $manager)
41 41
     {
42
-        if (!$config->hasDumper($this->option('dumper'))) {
42
+        if (!$config->hasDumper($this->option('dumper')))
43
+        {
43 44
             $this->writeln("<fg=red>Undefined dumper '{$this->option('dumper')}'.</fg=red>");
44 45
 
45 46
             return;
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
             $manager->get($this->argument('locale'))
52 53
         );
53 54
 
54
-        if ($this->isVerbose() && !empty($mc->getDomains())) {
55
+        if ($this->isVerbose() && !empty($mc->getDomains()))
56
+        {
55 57
             $this->sprintf("<info>Exporting domain(s):</info> %s\n",
56 58
                 join(',', $mc->getDomains())
57 59
             );
@@ -85,10 +87,14 @@  discard block
 block discarded – undo
85 87
             $catalogue->getData()
86 88
         );
87 89
 
88
-        if ($this->option('fallback')) {
89
-            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) {
90
-                foreach ($messages as $id => $message) {
91
-                    if (!$messageCatalogue->defines($id, $domain)) {
90
+        if ($this->option('fallback'))
91
+        {
92
+            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages)
93
+            {
94
+                foreach ($messages as $id => $message)
95
+                {
96
+                    if (!$messageCatalogue->defines($id, $domain))
97
+                    {
92 98
                         $messageCatalogue->set($id, $message, $domain);
93 99
                     }
94 100
                 }
Please login to merge, or discard this patch.
src/Bootloader/CommandBootloader.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -70,31 +70,38 @@  discard block
 block discarded – undo
70 70
      */
71 71
     private function configureExtensions(ConsoleBootloader $console, Container $container): void
72 72
     {
73
-        if ($container->has(DatabaseProviderInterface::class)) {
73
+        if ($container->has(DatabaseProviderInterface::class))
74
+        {
74 75
             $this->configureDatabase($console);
75 76
         }
76 77
 
77
-        if ($container->has(ORMInterface::class)) {
78
+        if ($container->has(ORMInterface::class))
79
+        {
78 80
             $this->configureCycle($console, $container);
79 81
         }
80 82
 
81
-        if ($container->has(TranslatorInterface::class)) {
83
+        if ($container->has(TranslatorInterface::class))
84
+        {
82 85
             $this->configureTranslator($console);
83 86
         }
84 87
 
85
-        if ($container->has(ViewsInterface::class)) {
88
+        if ($container->has(ViewsInterface::class))
89
+        {
86 90
             $this->configureViews($console);
87 91
         }
88 92
 
89
-        if ($container->has(Migrator::class)) {
93
+        if ($container->has(Migrator::class))
94
+        {
90 95
             $this->configureMigrations($console);
91 96
         }
92 97
 
93
-        if ($container->has(InvokerInterface::class)) {
98
+        if ($container->has(InvokerInterface::class))
99
+        {
94 100
             $this->configureGRPC($console);
95 101
         }
96 102
 
97
-        if ($container->has(EncryptionInterface::class)) {
103
+        if ($container->has(EncryptionInterface::class))
104
+        {
98 105
             $this->configureEncrypter($console);
99 106
         }
100 107
     }
@@ -123,7 +130,8 @@  discard block
 block discarded – undo
123 130
 
124 131
         $console->addCommand(Cycle\SyncCommand::class);
125 132
 
126
-        if ($container->has(Migrator::class)) {
133
+        if ($container->has(Migrator::class))
134
+        {
127 135
             $console->addCommand(Cycle\MigrateCommand::class);
128 136
         }
129 137
     }
@@ -138,7 +146,8 @@  discard block
 block discarded – undo
138 146
         $console->addCommand(Translator\ResetCommand::class);
139 147
 
140 148
         $console->addConfigureSequence(
141
-            function (FilesInterface $files, TranslatorConfig $config, OutputInterface $output) {
149
+            function (FilesInterface $files, TranslatorConfig $config, OutputInterface $output)
150
+            {
142 151
                 $files->ensureDirectory($config->getLocaleDirectory($config->getDefaultLocale()));
143 152
                 $output->writeln("<info>The default locale directory has been ensured.</info>");
144 153
             },
Please login to merge, or discard this patch.