__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace Webauthn\MetadataService\Statement;
use function array_key_exists;
use function is_int;
use JsonSerializable;
use Webauthn\MetadataService\Exception\MetadataStatementLoadingException;
/**
* @final
*/
class RgbPaletteEntry implements JsonSerializable
{
private readonly int $r;
private readonly int $g;
private readonly int $b;
public function __construct(int $r, int $g, int $b)
{
($r >= 0 && $r <= 255) || throw MetadataStatementLoadingException::create('The key "r" is invalid');
($g >= 0 && $g <= 255) || throw MetadataStatementLoadingException::create('The key "g" is invalid');
($b >= 0 && $b <= 255) || throw MetadataStatementLoadingException::create('The key "b" is invalid');
$this->r = $r;
$this->g = $g;
$this->b = $b;
}
public function getR(): int
{
return $this->r;
}
public function getG(): int
{
return $this->g;
}
public function getB(): int
{
return $this->b;
}
/**
* @param array<string, mixed> $data
*/
public static function createFromArray(array $data): self
{
foreach (['r', 'g', 'b'] as $key) {
array_key_exists($key, $data) || throw MetadataStatementLoadingException::create(sprintf(
'The key "%s" is missing',
$key
));
is_int($data[$key]) || throw MetadataStatementLoadingException::create(
sprintf('The key "%s" is invalid', $key)
);
}
return new self($data['r'], $data['g'], $data['b']);
}
/**
* @return array<string, int>
*/
public function jsonSerialize(): array
{
return [
'r' => $this->r,
'g' => $this->g,
'b' => $this->b,
];
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AbstractDescriptor.php | File | 1.02 KB | 0664 |
|
| AlternativeDescriptions.php | File | 997 B | 0664 |
|
| AuthenticatorGetInfo.php | File | 773 B | 0664 |
|
| AuthenticatorStatus.php | File | 2.05 KB | 0664 |
|
| BiometricAccuracyDescriptor.php | File | 1.63 KB | 0664 |
|
| BiometricStatusReport.php | File | 2.59 KB | 0664 |
|
| CodeAccuracyDescriptor.php | File | 2.05 KB | 0664 |
|
| DisplayPNGCharacteristicsDescriptor.php | File | 4.57 KB | 0664 |
|
| EcdaaTrustAnchor.php | File | 2.44 KB | 0664 |
|
| ExtensionDescriptor.php | File | 2.03 KB | 0664 |
|
| MetadataStatement.php | File | 17.56 KB | 0664 |
|
| PatternAccuracyDescriptor.php | File | 1.97 KB | 0664 |
|
| RgbPaletteEntry.php | File | 1.83 KB | 0664 |
|
| RogueListEntry.php | File | 1.42 KB | 0664 |
|
| StatusReport.php | File | 4.2 KB | 0664 |
|
| VerificationMethodANDCombinations.php | File | 1.47 KB | 0664 |
|
| VerificationMethodDescriptor.php | File | 5.67 KB | 0664 |
|
| Version.php | File | 1.82 KB | 0664 |
|