Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class UnexpectedTypeException extends LogicException implements SevereExceptionInterface, LocatableExceptionInterface |
||
17 | { |
||
18 | use HasSeverity; |
||
19 | |||
20 | /** |
||
21 | * Exception thrown when a value is not of an expected type. |
||
22 | * |
||
23 | * @param mixed $value Actual value. |
||
24 | * @param string $expected The name of the expected type. |
||
25 | * @param int $code The Exception code. |
||
26 | * @param \Throwable $previous The previous throwable used for the exception chaining. |
||
27 | */ |
||
28 | public function __construct($value, string $expected, int $code = 0, Throwable $previous = null) |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * If required, set the file and line where the Exception was thrown. |
||
41 | * |
||
42 | * @param string $file |
||
43 | * @param int $line |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function onFileLine(string $file, int $line): LocatableExceptionInterface |
||
57 |