| Conditions | 4 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 12 | public function __construct(Type $type, DocumentProvider $documentProvider, $mapping) |
|
| 24 | { |
||
| 25 | 12 | if (!is_array($mapping) && !$mapping instanceof MappingProvider && !$mapping instanceof Mapping) { |
|
| 26 | 1 | throw new \InvalidArgumentException('The mapping must be an array, an instance of Zenstruck\ElasticaBundle\Elastica\MappingProvider or an instance of Elastica\Type\Mapping.'); |
|
| 27 | } |
||
| 28 | |||
| 29 | 11 | $this->type = $type; |
|
| 30 | 11 | $this->documentProvider = $documentProvider; |
|
| 31 | 11 | $this->mapping = $mapping; |
|
| 32 | 11 | } |
|
| 33 | |||
| 62 |