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 | } |