HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //var/www/html/dashboard.orbiwheels.com/vendor/lcobucci/jwt/src/Token/DataSet.php
<?php
declare(strict_types=1);

namespace Lcobucci\JWT\Token;

use function array_key_exists;

final class DataSet
{
    /** @param array<non-empty-string, mixed> $data */
    public function __construct(private readonly array $data, private readonly string $encoded)
    {
    }

    /** @param non-empty-string $name */
    public function get(string $name, mixed $default = null): mixed
    {
        return $this->data[$name] ?? $default;
    }

    /** @param non-empty-string $name */
    public function has(string $name): bool
    {
        return array_key_exists($name, $this->data);
    }

    /** @return array<non-empty-string, mixed> */
    public function all(): array
    {
        return $this->data;
    }

    public function toString(): string
    {
        return $this->encoded;
    }
}