Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
10 | 1 | public static function create(string $host, int $port, string $index): Adapter |
|
11 | { |
||
12 | 1 | AnnotationRegistry::registerLoader('class_exists'); |
|
13 | |||
14 | 1 | return new Adapter( |
|
15 | 1 | ClientBuilder::create() |
|
16 | 1 | ->setSerializer(new JsonSerializer()) |
|
17 | 1 | ->setHosts(["$host:$port"]) |
|
18 | 1 | ->build(), |
|
19 | $index |
||
20 | ); |
||
21 | } |
||
22 | } |
||
23 |