| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function handle($client, $index) |
||
| 36 | { |
||
| 37 | 1 | $config = $this->configurationRepository->get($index); |
|
| 38 | |||
| 39 | 1 | if (null === $client || null === $config) { |
|
| 40 | throw new \InvalidArgumentException(); |
||
| 41 | } |
||
| 42 | |||
| 43 | 1 | $client |
|
| 44 | 1 | ->indices() |
|
| 45 | 1 | ->putSettings([ |
|
| 46 | 1 | 'index' => $index, |
|
| 47 | 'body' => [ |
||
| 48 | 1 | 'settings' => $this->extractSettings($config), |
|
| 49 | 1 | ], |
|
| 50 | 1 | ]) |
|
| 51 | ; |
||
| 52 | 1 | } |
|
| 53 | |||
| 66 |