<?php

declare(strict_types=1);

namespace WPStack\Sandbox\Domain;

final class SandboxSlug
{
    public function generate(): string
    {
        $alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789';
        $slug = '';

        for ($i = 0; $i < 10; $i++) {
            $slug .= $alphabet[random_int(0, strlen($alphabet) - 1)];
        }

        return 'sandbox-' . $slug;
    }
}
