| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class InvalidElementKeyException extends RuntimeException implements ExceptionInterface, PathAwareInterface |
||
| 17 | { |
||
| 18 | |||
| 19 | use PathAwareExceptionTrait; |
||
| 20 | |||
| 21 | private $key; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param mixed $key |
||
| 25 | * @param PathInterface $path |
||
| 26 | * @param Throwable|null $previous |
||
| 27 | */ |
||
| 28 | public function __construct($key, PathInterface $path, Throwable $previous = null) |
||
| 29 | { |
||
| 30 | $this->key = $key; |
||
| 31 | $this->path = $path; |
||
| 32 | parent::__construct($this->buildMessage(), 0, $previous); |
||
| 33 | } |
||
| 34 | |||
| 35 | private function buildMessage(): string |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getKey() |
||
| 41 | { |
||
| 42 | return $this->key; |
||
| 43 | } |
||
| 44 | |||
| 45 | private function buildKey(): string |
||
| 58 | } |
||
| 59 | } |
||
| 60 |