<?php

declare(strict_types=1);

namespace PpPhp\Core\Platform\Runtime;

final class RuntimeEnvironment
{
    public function __construct(
        private readonly string $name = 'local',
        private readonly string $phpVersion = PHP_VERSION
    ) {
    }

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

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

    public function toArray(): array
    {
        return [
            'name' => $this->name,
            'phpVersion' => $this->phpVersion,
        ];
    }
}
