Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
46 | 6 | public function addEntityMetadata(EntityMetadata $entityMetadata) |
|
47 | { |
||
48 | 6 | if (array_key_exists($entityMetadata->getEntityClass(), $this->entityMetadatas)) { |
|
49 | 1 | throw new Exception\InvalidArgumentException(sprintf( |
|
50 | 1 | 'Entity "%s" is already defined', |
|
51 | 1 | $entityMetadata->getEntityClass() |
|
52 | )); |
||
53 | } |
||
54 | 6 | $this->entityMetadatas[$entityMetadata->getEntityClass()] = $entityMetadata; |
|
55 | 6 | } |
|
56 | |||
67 |