CoreFiles by mySites.guru
AuthenticatorGetInfo.php46 lines, 773 bytes, from Joomla_5.4.11-Stable-Full_Package.zip
Raw History Compare with 5.4.10
md5
de9dd8ac498885c791e00c17e378ea74
sha1
6ab8041569ca77ab90530f62a021dd06e740c822
sha256
4e8d1368b647d5b1330598503b6dba2b20d496e9d87a6211593ce9980992bf4e
<?php

declare(strict_types=1);

namespace Webauthn\MetadataService\Statement;

use JsonSerializable;

/**
 * @final
 */
class AuthenticatorGetInfo implements JsonSerializable
{
    /**
     * @var string[]
     */
    private array $info = [];

    /**
     * @param array<string|int, mixed> $data
     */
    public static function create(array $data = []): self
    {
        $object = new self();
        foreach ($data as $k => $v) {
            $object->add($k, $v);
        }

        return $object;
    }

    public function add(string|int $key, mixed $value): self
    {
        $this->info[$key] = $value;

        return $this;
    }

    /**
     * @return string[]
     */
    public function jsonSerialize(): array
    {
        return $this->info;
    }
}

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.