X

Create New Item

File Folder

X

Search Results

File "AppCheckToken.php"

Full path: /home/orbitecv/orbite-school.orbit.et/vendor/kreait/firebase-php/src/Firebase/AppCheck/AppCheckToken.php
File size: 500 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php

declare(strict_types=1);

namespace Kreait\Firebase\AppCheck;

/**
 * @phpstan-type AppCheckTokenShape array{
 *     token: string,
 *     ttl: string
 * }
 */
final class AppCheckToken
{
    private function __construct(
        public readonly string $token,
        public readonly string $ttl,
    ) {
    }

    /**
     * @param AppCheckTokenShape $data
     */
    public static function fromArray(array $data): self
    {
        return new self($data['token'], $data['ttl']);
    }
}