CoreFiles by mySites.guru
PublicKeyCredentialEntity.php41 lines, 689 bytes, from Joomla_5.4.10-Stable-Full_Package.zip
Raw History Compare with 5.4.9
md5
7e847099cbeb63711492668ce82c06da
sha1
ebcca246d97b8d415c577d1d960a6dfd6c1c4114
sha256
0f5443f37432198c7353af4cc5d23357c3a21e62caf9eef19581e83db95f3820
<?php

declare(strict_types=1);

namespace Webauthn;

use JsonSerializable;

abstract class PublicKeyCredentialEntity implements JsonSerializable
{
    public function __construct(
        protected string $name,
        protected ?string $icon
    ) {
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function getIcon(): ?string
    {
        return $this->icon;
    }

    /**
     * @return mixed[]
     */
    public function jsonSerialize(): array
    {
        $json = [
            'name' => $this->name,
        ];
        if ($this->icon !== null) {
            $json['icon'] = $this->icon;
        }

        return $json;
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.