| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 16 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 19 | public function init($adapter, $client = null) | ||
| 20 |     { | ||
| 21 | // set the server adapter | ||
| 22 | $this->adapter = $adapter; | ||
| 23 | |||
| 24 | // for ease of use we can fallback to a default http client | ||
| 25 |         if (!$client) { | ||
| 26 | $client = new \PeterColes\Cluster\HttpClients\GuzzleHttp; | ||
| 27 | } | ||
| 28 | |||
| 29 | // initialise the http client with the authentication header options | ||
| 30 | $client->initClient($this->adapter->getHeaders()); | ||
| 31 | |||
| 32 | // make the initialised http client available to the adapter | ||
| 33 | $this->adapter->setClient($client); | ||
| 34 | } | ||
| 35 | } | ||
| 36 |