Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
36 | 63 | public function add( |
|
37 | string $esClientKey, |
||
38 | string $host, |
||
39 | int $port, |
||
40 | string $scheme, |
||
41 | ?string $user = null, |
||
42 | ?string $password = null, |
||
43 | int $retries = 1 |
||
44 | ) { |
||
45 | 63 | $this->elasticsearchClients[$esClientKey] = $this->clientBuilder->setHosts([ |
|
46 | [ |
||
47 | 63 | 'host' => $host, |
|
48 | 63 | 'port' => $port, |
|
49 | 63 | 'scheme' => $scheme, |
|
50 | 63 | 'user' => $user, |
|
51 | 63 | 'pass' => $password |
|
52 | ] |
||
53 | 63 | ])->setRetries($retries)->build(); |
|
54 | 63 | } |
|
77 |