Passed
Push — master ( c0f452...2dd991 )
by Luiz Kim
32:06 queued 29:47
created
src/Command/MigrateCommand.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@
 block discarded – undo
42 42
     protected function execute(InputInterface $input, OutputInterface $output)
43 43
     {
44 44
         $domain = $input->getArgument('domain');
45
-        if ($domain)
46
-            return $this->migrateByDomain($domain, $input, $output);
45
+        if ($domain) {
46
+                    return $this->migrateByDomain($domain, $input, $output);
47
+        }
47 48
 
48 49
         $domains = $this->databaseSwitchService->getAllDomains();
49 50
 
Please login to merge, or discard this patch.
src/Service/DatabaseSwitchService.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
     public function __construct(Connection $connection)
27 27
     {
28 28
         $this->connection = $connection;
29
-        if (!self::$originalDbParams)
30
-            self::$originalDbParams = $connection->getParams();
29
+        if (!self::$originalDbParams) {
30
+                    self::$originalDbParams = $connection->getParams();
31
+        }
31 32
     }
32 33
 
33 34
     /* @param string $domain
@@ -53,8 +54,9 @@  discard block
 block discarded – undo
53 54
      */
54 55
     private function switchDatabase($dbData)
55 56
     {
56
-        if ($this->connection->isConnected())
57
-            $this->connection->close();
57
+        if ($this->connection->isConnected()) {
58
+                    $this->connection->close();
59
+        }
58 60
 
59 61
         $this->connection->__construct(
60 62
             $dbData,
Please login to merge, or discard this patch.
src/EventListener/DatabaseSwitchListener.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,11 @@
 block discarded – undo
22 22
     public function onKernelRequest(RequestEvent $event)
23 23
     {
24 24
         try {
25
-            if (!self::$tenency_params)
26
-                self::$tenency_params = $this->databaseSwitchService->switchDatabaseByDomain(
25
+            if (!self::$tenency_params) {
26
+                            self::$tenency_params = $this->databaseSwitchService->switchDatabaseByDomain(
27 27
                     $this->domainService->getDomain()
28 28
                 );
29
+            }
29 30
         } catch (Exception $e) {
30 31
             throw new Exception(sprintf('%s', $e), 1);
31 32
         }
Please login to merge, or discard this patch.