| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 9 | public function __construct(array $config) |
|
| 34 | { |
||
| 35 | 9 | $this->elasticSearchName = $config['elasticsearch_name'] ?? $config['name']; |
|
| 36 | 9 | $this->name = $config['name']; |
|
| 37 | 9 | $this->settings = $config['settings'] ?? []; |
|
| 38 | 9 | $this->config = $config['config']; |
|
| 39 | 9 | $this->mapping = $config['mapping']; |
|
| 40 | |||
| 41 | 9 | if (!isset($config['template'])) { |
|
| 42 | 1 | throw new \InvalidArgumentException('Index template value must be set'); |
|
| 43 | } |
||
| 44 | |||
| 45 | 8 | $this->template = $config['template']; |
|
| 46 | 8 | } |
|
| 47 | |||
| 56 |