Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
plib
/
modules
/
wp-toolkit
/
vendor
/
cerbero
/
json-parser
/
src
/
Decoders
/
File Content:
DecodedValue.php
<?php namespace WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Decoders; use Throwable; /** * The decoded value. * */ final class DecodedValue { /** * Retrieve a successfully decoded value * * @param mixed $value * @return self */ public static function succeeded(mixed $value) : self { return new self(\true, $value); } /** * Retrieve a value failed to be decoded * * @param Throwable $e * @param string $json * @return self */ public static function failed(Throwable $e, string $json) : self { return new self(\false, null, $e->getMessage(), $e->getCode(), $e, $json); } /** * Instantiate the class. * * @param mixed $value */ private function __construct(public readonly bool $succeeded, public mixed $value = null, public readonly ?string $error = null, public readonly ?int $code = null, public readonly ?Throwable $exception = null, public readonly ?string $json = null) { } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
AbstractDecoder.php
808 bytes
0644
ConfigurableDecoder.php
927 bytes
0644
DecodedValue.php
1036 bytes
0644
Decoder.php
313 bytes
0644
JsonDecoder.php
754 bytes
0644
SimdjsonDecoder.php
728 bytes
0644
N4ST4R_ID | Naxtarrr