| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class InvalidPropertyConfigException extends DomainException implements ExceptionInterface |
||
| 13 | { |
||
| 14 | |||
| 15 | private $propertyName; |
||
| 16 | |||
| 17 | private $propertyFile; |
||
| 18 | |||
| 19 | public function __construct(string $propertyName, $propertyFile, Throwable $previous = null) |
||
| 20 | { |
||
| 21 | $this->propertyName = $propertyName; |
||
| 22 | $this->propertyFile = $propertyFile; |
||
| 23 | parent::__construct($this->buildMessage(), 0, $previous); |
||
| 24 | } |
||
| 25 | |||
| 26 | private function buildMessage(): string |
||
| 27 | { |
||
| 28 | $fileNameType = gettype($this->propertyFile); |
||
| 29 | |||
| 30 | return |
||
| 31 | "Invalid config for Unicode property '{$this->propertyName}': " . |
||
| 32 | "{$fileNameType} instead of string filename"; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getPropertyName(): string |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getPropertyFile(): string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |