/**
* @var array
*/
- private static $singletons = array();
+ private static $singletons = [];
/**
* Get the data source used for testing.
/**
* Get a connection to the test database.
*
- * @return PDO
+ * @return \PDO
*/
public static function pdo() {
if (!isset(self::$singletons['pdo'])) {
try {
self::$singletons['pdo'] = new PDO("mysql:host={$host}" . ($port ? ";port=$port" : ""),
$dsninfo['username'], $dsninfo['password'],
- array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE)
+ [PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE]
);
}
catch (PDOException $e) {
return self::$singletons['schema'];
}
-
/**
* @return \Civi\Test\Data
*/