Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| UnexpectedResultCount | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| none | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| multiple | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celemas\Quma\Exception; |
| 6 | |
| 7 | use RuntimeException; |
| 8 | |
| 9 | /** @api */ |
| 10 | final class UnexpectedResultCount extends RuntimeException |
| 11 | { |
| 12 | public static function none(): self |
| 13 | { |
| 14 | return new self('Expected exactly one result, got none.'); |
| 15 | } |
| 16 | |
| 17 | public static function multiple(): self |
| 18 | { |
| 19 | return new self('Expected exactly one result, got more than one.'); |
| 20 | } |
| 21 | } |
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.
| 19 | return new self('Expected exactly one result, got more than one.'); |
| 20 | } |
| 14 | return new self('Expected exactly one result, got none.'); |
| 15 | } |