Civi\Setup\DbUtil Fix CodeStyle
authorlasse <lasse@dev-lasse>
Wed, 4 Nov 2020 05:18:22 +0000 (06:18 +0100)
committerlasse <lasse@dev-lasse>
Wed, 4 Nov 2020 05:18:22 +0000 (06:18 +0100)
setup/src/Setup/DbUtil.php

index 6c35dbca87bb814f4e664181725039cd5db1bd3d..6c23c251658c7ade05f8ae4cbbc96a8cf2ea2cf6 100644 (file)
@@ -18,9 +18,9 @@ class DbUtil {
     //   ...
     // ]
     if ($parsed['host'] == 'unix(') {
-       preg_match('/(unix\(.*\))(\/(.+)?)?$/', $dsn, $matches);
-       $server = $matches[1];
-       $database = $matches[3] ?? NULL;
+      preg_match('/(unix\(.*\))(\/(.+)?)?$/', $dsn, $matches);
+      $server = $matches[1];
+      $database = $matches[3] ?? NULL;
     }
     else {
       $server = self::encodeHostPort($parsed['host'], $parsed['port'] ?? NULL);
@@ -109,9 +109,9 @@ class DbUtil {
   public static function decodeHostPort($host) {
     $port = NULL;
     $socket = NULL;
-    if(preg_match('/^unix\(([^)]+)\)$/', $host, $matches) === 1) {
-       $host = 'localhost';
-       $socket = $matches[1];
+    if (preg_match('/^unix\(([^)]+)\)$/', $host, $matches) === 1) {
+      $host = 'localhost';
+      $socket = $matches[1];
     }
     else {
       $hostParts = explode(':', $host);