<?php

declare(strict_types=1);

namespace PpPhp\Core\Platform\Metadata\ValueObjects;

final class PlatformVersionInfo
{
    public function __construct(
        private readonly string $version = '1.0.0',
        private readonly string $since = '2.0.0',
        private readonly bool $deprecated = false,
        private readonly bool $experimental = false
    ) {}

    public function version(): string
    {
        return $this->version;
    }
    public function since(): string
    {
        return $this->since;
    }
    public function deprecated(): bool
    {
        return $this->deprecated;
    }
    public function experimental(): bool
    {
        return $this->experimental;
    }

    public function toArray(): array
    {
        return [
            'version' => $this->version,
            'since' => $this->since,
            'deprecated' => $this->deprecated,
            'experimental' => $this->experimental,
        ];
    }
}
