| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 1 | public function create(array $names): ClientInterface |
|
| 45 | { |
||
| 46 | // Create a new connection manager specific for this client |
||
| 47 | 1 | $clientConnectionManager = new ConnectionManager(); |
|
| 48 | 1 | foreach ($names as $name) { |
|
| 49 | 1 | $clientConnectionManager->registerExistingConnection($name, $this->connectionManager->getConnection($name)); |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | $firstName = reset($names); |
|
| 53 | 1 | $clientConnectionManager->setMaster($firstName); |
|
| 54 | |||
| 55 | 1 | return new Client($clientConnectionManager, $this->eventDispatcher); |
|
| 56 | } |
||
| 57 | } |
||
| 58 |