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