File: DbalFactory.php Lines 8 to 22
8        return [
9            \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
10            \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
11            \PDO::ATTR_AUTOCOMMIT => false,
12
13            \PDO::ATTR_EMULATE_PREPARES => true,
14            \PDO::ATTR_CASE => \PDO::CASE_LOWER,
15        ];
16    }
Type Class Description
pmd ShortVariable Avoid variables with short names like $pw. Configured minimum length is 3.
17
Type Class Description
pmd ShortVariable Avoid variables with short names like $pw. Configured minimum length is 3.
    public static function mysql($host, $dbname, $user, $pw, $charset=null) {
18        $strDsn = sprintf('mysql:host=%s;dbname=%s;charset=%s', $host, $dbname, $charset);
19        $pdo = new \PDO($strDsn, $user, $pw, self::getPdoOptions());
20        return new Dbal($pdo);
21    }
22}