Skip to content

Commit 02b5021

Browse files
committed
refactor: move the line down
1 parent 90ad66f commit 02b5021

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/Database/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public static function connect($group = null, bool $getShared = true)
7171
return static::$instances[$group];
7272
}
7373

74-
static::ensureFactory();
75-
7674
if (isset($dbConfig->{$group})) {
7775
$config = $dbConfig->{$group};
7876
}
@@ -81,6 +79,8 @@ public static function connect($group = null, bool $getShared = true)
8179
throw new InvalidArgumentException('There is no valid database config.');
8280
}
8381

82+
static::ensureFactory();
83+
8484
$connection = static::$factory->load($config, $group);
8585

8686
static::$instances[$group] = &$connection;

0 commit comments

Comments
 (0)