Lines
0.00%
0 / 3
Functions and Methods
0.00%
0 / 3
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| StoreException | 0.00% | 0 / 3 | 0.00% | 0 / 3 | 12 | 0.00% | 0 / 1 | |||
| unreachable | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| valueNotIncrementable | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| findDetail | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Exception; | |
| 6 | ||
| 7 | use Throwable; | |
| 8 | ||
| 9 | /** @extends StewartException<StoreError> */ | |
| 10 | final class StoreException extends StewartException | |
| 11 | { | |
| 12 | public static function unreachable(string $target, string $detail, ?Throwable $previous = null): self | |
| 13 | { | |
| 14 | return self::createForReason(StoreError::Unreachable, $previous, target: $target, detail: $detail); | |
| 15 | } | |
| 16 | ||
| 17 | public static function valueNotIncrementable(string $detail, ?Throwable $previous = null): self | |
| 18 | { | |
| 19 | return self::createForReason(StoreError::ValueNotIncrementable, $previous, detail: $detail); | |
| 20 | } | |
| 21 | ||
| 22 | public function findDetail(): ?string | |
| 23 | { | |
| 24 | return $this->findContextString('detail'); | |
| 25 | } | |
| 26 | } |