Lines
100.00%
2 / 2
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | ||
| 16 | final class MultipleRecordsFoundException extends \RuntimeException | |
| 17 | { | |
| 18 | /** @var int The number of rows the query matched (always >= 2). */ | |
| 19 | public readonly int $count; | |
| 20 | ||
| 21 | /** | |
| 22 | * @param int $count | |
| 23 | * @param class-string<\BlueprintAU\Radiant\Model> $modelClass | |
| 24 | */ | |
| 25 | public function __construct(int $count, string $modelClass) | |
| 26 | { | |
| 27 | $this->count = $count; | |
| 28 | ||
| 29 | parent::__construct('Query returned '.$count.' rows for model ['.$modelClass.'], expected exactly 1.'); | |
| 30 | } | |
| 31 | } |