| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function __construct($entityName) |
||
| 31 | { |
||
| 32 | $this->entityReflectionClass = new \ReflectionClass($entityName); |
||
| 33 | if (!$this->entityReflectionClass->isSubclassOf(AggregateRootInterface::class)) { |
||
| 34 | throw new \LogicException(\sprintf( |
||
| 35 | '%s not implement %s, only the aggregate roots can have a repository class', |
||
| 36 | $this->entityReflectionClass->name, |
||
| 37 | AggregateRootInterface::class |
||
| 38 | )); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 58 |