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