Skip to content

Commit 23f4fe6

Browse files
authored
Fix more optional parameters
1 parent 03a1071 commit 23f4fe6

File tree

1 file changed

+2
-2
lines changed
  • src/Codeception/Lib/Driver

1 file changed

+2
-2
lines changed

src/Codeception/Lib/Driver/Db.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Db
3131
*/
3232
protected array $primaryKeys = [];
3333

34-
public static function connect(string $dsn, string $user, string $password, array $options = null): PDO
34+
public static function connect(string $dsn, string $user = null, string $password = null, array $options = null): PDO
3535
{
3636
$dbh = new PDO($dsn, $user, $password, $options);
3737
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@@ -47,7 +47,7 @@ public static function connect(string $dsn, string $user, string $password, arra
4747
*
4848
* @return Db|SqlSrv|MySql|Oci|PostgreSql|Sqlite
4949
*/
50-
public static function create(string $dsn, string $user, string $password, array $options = null): Db
50+
public static function create(string $dsn, string $user = null, string $password = null, array $options = null): Db
5151
{
5252
$provider = self::getProvider($dsn);
5353

0 commit comments

Comments
 (0)