| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class InvalidVOArgumentException extends \InvalidArgumentException implements ExceptionVO |
||
| 11 | { |
||
| 12 | /** @var mixed */ |
||
| 13 | private $object; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * InvalidVOArgumentException constructor. |
||
| 17 | * @param string $message |
||
| 18 | * @param mixed $object |
||
| 19 | * @param int $code |
||
| 20 | * @param Throwable|null $previous |
||
| 21 | */ |
||
| 22 | 19 | public function __construct(string $message = '', $object = null, int $code = 0, Throwable $previous = null) |
|
| 23 | { |
||
| 24 | 19 | if (!$message) { |
|
| 25 | 1 | throw new $this('Unknown '.\get_class($this)); |
|
| 26 | } |
||
| 27 | 19 | $this->object = $object; |
|
| 28 | 19 | parent::__construct($message, $code, $previous); |
|
| 29 | 19 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 2 | public function __toString(): string |
|
| 44 | } |
||
| 45 | } |
||
| 46 |