| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 9 | public function __construct($name, array $types, array $config) |
|
| 29 | { |
||
| 30 | 9 | $this->elasticSearchName = $config['elasticSearchName'] ?? $name; |
|
| 31 | 9 | $this->name = $name; |
|
| 32 | 9 | $this->settings = $config['settings'] ?? array(); |
|
| 33 | |||
| 34 | 9 | if (!isset($config['template'])) { |
|
| 35 | 1 | throw new \InvalidArgumentException('Index template value must be set'); |
|
| 36 | } |
||
| 37 | |||
| 38 | 8 | $this->template = $config['template']; |
|
| 39 | 8 | $this->types = $types; |
|
| 40 | 8 | } |
|
| 41 | |||
| 52 |