Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | private static function changeHost(string $dsn, string $host): string |
||
35 | { |
||
36 | preg_match(AuraSqlModule::PARSE_PDO_DSN_REGEX, $dsn, $parts); |
||
37 | if (! $parts) { |
||
38 | // @codeCoverageIgnoreStart |
||
39 | return $dsn; |
||
40 | // @codeCoverageIgnoreEnd |
||
41 | } |
||
42 | |||
43 | return sprintf('%s:%s=%s;%s', $parts[1], $parts[2], $host, $parts[3]); |
||
44 | } |
||
46 |