| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.0054 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function handle(Client $client, $index) |
||
| 35 | { |
||
| 36 | 1 | $config = $this->configurationRepository->get($index); |
|
| 37 | |||
| 38 | 1 | if (null === $config) { |
|
| 39 | throw new \InvalidArgumentException(); |
||
| 40 | } |
||
| 41 | |||
| 42 | $client |
||
| 43 | 1 | ->indices() |
|
| 44 | 1 | ->create([ |
|
| 45 | 1 | 'index' => $index, |
|
| 46 | 1 | 'body' => $config, |
|
| 47 | 1 | ]) |
|
| 48 | ; |
||
| 49 | 1 | } |
|
| 50 | } |
||
| 51 |