| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php declare(strict_types=1); |
||
| 28 | class InvalidValueException extends HydrationException |
||
| 29 | { |
||
| 30 | |||
| 31 | /** |
||
| 32 | * The problem property |
||
| 33 | * |
||
| 34 | * @var ReflectionProperty |
||
| 35 | */ |
||
| 36 | private $property; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Constructor of the class |
||
| 40 | * |
||
| 41 | 14 | * @param ReflectionProperty $property |
|
| 42 | * @param string $message |
||
| 43 | * @param int $code |
||
| 44 | * @param Throwable|null $previous |
||
| 45 | */ |
||
| 46 | public function __construct( |
||
| 47 | 14 | ReflectionProperty $property, |
|
| 48 | string $message, |
||
| 49 | 14 | int $code = 0, |
|
| 50 | ?Throwable $previous = null |
||
| 51 | 14 | ) { |
|
| 52 | parent::__construct($message, $code, $previous); |
||
| 53 | |||
| 54 | $property->setAccessible(false); |
||
| 55 | $this->property = $property; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | 1 | * Gets the problem property |
|
| 60 | * |
||
| 61 | 1 | * @return ReflectionProperty |
|
| 62 | */ |
||
| 63 | final public function getProperty() : ReflectionProperty |
||
| 64 | { |
||
| 65 | return $this->property; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Gets the problem property path |
||
| 70 | * |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | final public function getPropertyPath() : string |
||
| 76 | } |
||
| 77 | } |
||
| 78 |