Commit f2ce3d4f authored by Ditty's avatar Ditty

Fix styleci

parent d9375e30
......@@ -127,8 +127,7 @@ class Connection extends BaseConnection
*/
protected function getDefaultDatabaseName($dsn, $config)
{
if(empty($config['database'])){
if (empty($config['database'])) {
if (preg_match('/^mongodb:\\/\\/.+\\/([^?&]+)/s', $dsn, $matches)) {
$config['database'] = $matches[1];
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment