Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 3 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
||
| ConversionException | |
0.00% |
0 / 3 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
||
| __construct | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| getPath | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| getValue | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Exception; |
| 4 | |
| 5 | /** |
| 6 | * @author Wilhelm Zwertvaegher |
| 7 | */ |
| 8 | class ConversionException extends \Exception |
| 9 | { |
| 10 | public function __construct(private readonly string $path, private readonly string $value, int $code = 0, ?\Throwable $previous = null) |
| 11 | { |
| 12 | parent::__construct('Conversion failed: '.$path.': '.$value, $code, $previous); |
| 13 | } |
| 14 | |
| 15 | public function getPath(): string |
| 16 | { |
| 17 | return $this->path; |
| 18 | } |
| 19 | |
| 20 | public function getValue(): string |
| 21 | { |
| 22 | return $this->value; |
| 23 | } |
| 24 | } |