| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class DecodedValue |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Retrieve a successfully decoded value |
||
| 15 | * |
||
| 16 | * @param mixed $value |
||
| 17 | * @return self |
||
| 18 | */ |
||
| 19 | 260 | public static function succeeded(mixed $value): self |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Retrieve a value failed to be decoded |
||
| 26 | * |
||
| 27 | * @param Throwable $e |
||
| 28 | * @param string $json |
||
| 29 | * @return self |
||
| 30 | */ |
||
| 31 | 8 | public static function failed(Throwable $e, string $json): self |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Instantiate the class. |
||
| 38 | * |
||
| 39 | * @param mixed $value |
||
| 40 | */ |
||
| 41 | 264 | private function __construct( |
|
| 51 |