| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 93.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class ClassExtractorException extends \RuntimeException |
||
| 12 | { |
||
| 13 | 2 | #[Pure] |
|
| 14 | public function __construct(private string $property, string $message, int $code = 0, ?Throwable $previous = null) |
||
| 15 | { |
||
| 16 | 2 | parent::__construct($message, $code, $previous); |
|
| 17 | 2 | } |
|
| 18 | |||
| 19 | 1 | #[Pure] |
|
| 20 | public static function fromDiscriminatorMapWhenParameterIsNull(DiscriminatorMap $discriminatorMap): self |
||
| 21 | { |
||
| 22 | 1 | $property = $discriminatorMap->getTypeProperty(); |
|
| 23 | 1 | $message = sprintf('%s cannot be null or empty', $property); |
|
| 24 | |||
| 25 | 1 | return new self($property, $message); |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | #[Pure] |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function getProperty(): string |
|
| 41 | } |
||
| 42 | } |
||
| 43 |