| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class DiscriminatorColumnNotPresentException extends TableInheritanceException implements FriendlyExceptionInterface |
||
| 12 | { |
||
| 13 | 4 | public function __construct(private Entity $entity) |
|
| 14 | { |
||
| 15 | 4 | parent::__construct(sprintf( |
|
| 16 | 4 | 'Discriminator column for the `%s` role should be defined.', |
|
| 17 | 4 | (string) ($this->entity->getRole() ?? $this->entity->getClass()), |
|
| 18 | )); |
||
| 19 | 4 | } |
|
| 20 | |||
| 21 | 2 | public function getName(): string |
|
| 22 | { |
||
| 23 | 2 | return 'Discriminator column is not present.'; |
|
| 24 | } |
||
| 25 | |||
| 26 | 2 | public function getSolution(): ?string |
|
| 35 | ); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |