3 declare(strict_types=1);
5 namespace CuyZ\Valinor\Type\Parser\Exception\Iterable;
7 use CuyZ\Valinor\Type\Parser\Exception\InvalidType;
8 use CuyZ\Valinor\Type\Types\ShapedArrayElement;
14 final class ShapedArrayClosingBracketMissing extends RuntimeException implements InvalidType
17 * @param ShapedArrayElement[] $elements
19 public function __construct(array $elements)
21 $signature = 'array{' . implode(', ', array_map(fn (ShapedArrayElement $element) => $element->toString(), $elements));
24 "Missing closing curly bracket in shaped array signature `$signature`.",