Skip to content

Commit 00dc9fd

Browse files
committed
refactor: add assert() for clarity
1 parent ef713d7 commit 00dc9fd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

system/Database/Config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public static function connect($group = null, bool $getShared = true)
6262
$group = (ENVIRONMENT === 'testing') ? 'tests' : $dbConfig->defaultGroup;
6363
}
6464

65+
assert(is_string($group));
66+
6567
if (! isset($dbConfig->{$group})) {
6668
throw new InvalidArgumentException($group . ' is not a valid database connection group.');
6769
}

0 commit comments

Comments
 (0)