<?php

declare(strict_types=1);

namespace KupShop\CatalogElasticBundle\Exception;

class NotImplemented extends \RuntimeException
{
    public static function sprintf(string $what, string $class, string $format = '', mixed ...$args): self
    {
        $shortClassName = explode('\\', $class);

        return new self(sprintf(
            '%s: %s not implemented. '.$format,
            end($shortClassName),
            $what,
            ...$args,
        ));
    }
}
