Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
27 | 1 | private function buildElasticsearchClient() : Client |
|
28 | { |
||
29 | 1 | $config = config('triadev-elasticsearch'); |
|
30 | |||
31 | 1 | $clientBuilder = ClientBuilder::create(); |
|
32 | 1 | $clientBuilder->setHosts([ |
|
33 | [ |
||
34 | 1 | 'host' => array_get($config, 'host'), |
|
35 | 1 | 'port' => array_get($config, 'port'), |
|
36 | 1 | 'scheme' => array_get($config, 'scheme'), |
|
37 | 1 | 'user' => array_get($config, 'user'), |
|
38 | 1 | 'pass' => array_get($config, 'password') |
|
39 | ] |
||
40 | ]); |
||
41 | |||
42 | 1 | return $clientBuilder->build(); |
|
43 | } |
||
45 |