Completed
Pull Request — master (#35)
by Mathieu
02:03
created

RetryDriver::getSchemaManager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ez\DbLinker\Driver;
4
5
use Ez\DbLinker\Driver\Connection\RetryConnection;
6
7
trait RetryDriver
8
{
9
    use WrapperDriver;
10
11
    /**
12
     * Attempts to create a connection with the database.
13
     *
14
     * @param array       $params        All connection parameters passed by the user.
15
     * @param string|null $username      The username to use when connecting.
16
     * @param string|null $password      The password to use when connecting.
17
     * @param array       $driverOptions The driver options to use when connecting.
18
     *
19
     * @return \Doctrine\DBAL\Driver\Connection The database connection.
20
     */
21
    public function connect(Array $params, $username = null, $password = null, Array $driverOptions = []) {
22
        return new RetryConnection($params['connectionParams'], $params['retryStrategy']);
23
    }
24
}
25