From bd32b5918050602fe2a8f863e5cb84c3d934b1ea Mon Sep 17 00:00:00 2001 From: lasse Date: Wed, 4 Nov 2020 06:18:22 +0100 Subject: [PATCH] Civi\Setup\DbUtil Fix CodeStyle --- setup/src/Setup/DbUtil.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup/src/Setup/DbUtil.php b/setup/src/Setup/DbUtil.php index 6c35dbca87..6c23c25165 100644 --- a/setup/src/Setup/DbUtil.php +++ b/setup/src/Setup/DbUtil.php @@ -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); -- 2.25.1