| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 2 | public function getClient(string $name, string $databaseName = null): Client |
|
| 43 | { |
||
| 44 | 2 | $clientKey = !is_null($databaseName) ? $name.'.'.$databaseName : $name; |
|
| 45 | |||
| 46 | 2 | if (!isset($this->clients[$clientKey])) { |
|
| 47 | 2 | $conf = $this->configurations[$name]; |
|
| 48 | 2 | $this->clients[$clientKey] = new Client($conf->getConnectionUri($databaseName)); |
|
| 49 | } |
||
| 50 | |||
| 51 | 2 | return $this->clients[$clientKey]; |
|
| 52 | } |
||
| 53 | |||
| 65 |