| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class InvalidPropertyConfigException extends DomainException implements ExceptionInterface |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $propertyName; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var mixed |
||
| 22 | */ |
||
| 23 | private $propertyFile; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * InvalidPropertyConfigException constructor. |
||
| 27 | * |
||
| 28 | * @param string $propertyName |
||
| 29 | * @param mixed $propertyFile |
||
| 30 | * @param Throwable|null $previous |
||
| 31 | */ |
||
| 32 | public function __construct(string $propertyName, $propertyFile, Throwable $previous = null) |
||
| 33 | { |
||
| 34 | $this->propertyName = $propertyName; |
||
| 35 | $this->propertyFile = $propertyFile; |
||
| 36 | parent::__construct($this->buildMessage(), 0, $previous); |
||
| 37 | } |
||
| 38 | |||
| 39 | private function buildMessage(): string |
||
| 40 | { |
||
| 41 | $fileNameType = gettype($this->propertyFile); |
||
| 42 | |||
| 43 | return |
||
| 44 | "Invalid config for Unicode property '{$this->propertyName}': " . |
||
| 45 | "{$fileNameType} instead of string filename"; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getPropertyName(): string |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | public function getPropertyFile() |
||
| 59 | } |
||
| 60 | } |
||
| 61 |