Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| CastSafety | n/a | 0 / 0 | n/a | 0 / 0 | 0 | n/a | 0 / 0 | |||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace BlueprintAU\Radiant\Database\Schema\Enums; | |
| 6 | ||
| 7 | /** | |
| 8 | * How safely a live column's values convert to a desired type. | |
| 9 | */ | |
| 10 | enum CastSafety | |
| 11 | { | |
| 12 | /** Every value converts losslessly (or near enough) — no gate. */ | |
| 13 | case Safe; | |
| 14 | ||
| 15 | /** The cast is legal but may lose data or fail on some values — destructive. */ | |
| 16 | case Risky; | |
| 17 | ||
| 18 | /** No value of the live type can become the desired type — fail fast. */ | |
| 19 | case Uncastable; | |
| 20 | } |