CoreFiles by mySites.guru
BiometricAccuracyDescriptor.php68 lines, 1,664 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
f9a0f573493c289ee36c847ad7a4902a
sha1
07eefb502b754769cc3b4cff1d862754f410a4dd
sha256
52d16904a7104a0e7aa043d2b9c2c237f92dc2b1b9460eca34cf14b76c355192
<?php

declare(strict_types=1);

namespace Webauthn\MetadataService\Statement;

use Webauthn\MetadataService\Utils;

/**
 * @final
 */
class BiometricAccuracyDescriptor extends AbstractDescriptor
{
    public function __construct(
        private readonly ?float $selfAttestedFRR,
        private readonly ?float $selfAttestedFAR,
        private readonly ?float $maxTemplates,
        ?int $maxRetries = null,
        ?int $blockSlowdown = null
    ) {
        parent::__construct($maxRetries, $blockSlowdown);
    }

    public function getSelfAttestedFRR(): ?float
    {
        return $this->selfAttestedFRR;
    }

    public function getSelfAttestedFAR(): ?float
    {
        return $this->selfAttestedFAR;
    }

    public function getMaxTemplates(): ?float
    {
        return $this->maxTemplates;
    }

    /**
     * @param array<string, mixed> $data
     */
    public static function createFromArray(array $data): self
    {
        return new self(
            $data['selfAttestedFRR'] ?? null,
            $data['selfAttestedFAR'] ?? null,
            $data['maxTemplates'] ?? null,
            $data['maxRetries'] ?? null,
            $data['blockSlowdown'] ?? null
        );
    }

    /**
     * @return array<string, mixed>
     */
    public function jsonSerialize(): array
    {
        $data = [
            'selfAttestedFRR' => $this->selfAttestedFRR,
            'selfAttestedFAR' => $this->selfAttestedFAR,
            'maxTemplates' => $this->maxTemplates,
            'maxRetries' => $this->getMaxRetries(),
            'blockSlowdown' => $this->getBlockSlowdown(),
        ];

        return Utils::filterNullValues($data);
    }
}

The same content is in 152 releases, Joomla 5.0.0-beta3 to 6.3.0-alpha1. See them all, or every version of this file.