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 | } |
Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not
necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once.
Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.