Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
36 | 78 | public function connect(array $servers): Cluster |
|
37 | { |
||
38 | 78 | $configure = array_merge($this->configure, $servers); |
|
39 | 78 | $cluster = new Cluster($configure['host']); |
|
40 | 78 | if (!empty($configure['user']) && !empty($configure['password'])) { |
|
41 | 76 | $cluster->authenticateAs(strval($configure['user']), strval($configure['password'])); |
|
42 | } |
||
43 | |||
44 | 78 | return $cluster; |
|
45 | } |
||
46 | } |
||
47 |