$references */ private function __construct( public mixed $value, public int $path, public array $references, public ?string $message = NULL, public ?string $code = NULL, ) {} /** * @param array $references */ public static function value(mixed $value, int $path, array $references = []): self { return new self($value, $path, $references); } public static function violation(int $path, string $message, string $code): self { return new self(NULL, $path, [], $message, $code); } }