<?php
namespace Fifa\ConnectId\Sdk\Util\Builder\Error;

/**
 * Interface CompositeErrorBuilderInterface
 * @package Fifa\ConnectId\Sdk\Util\Builder\Error
 */
interface CompositeErrorBuilderInterface
{
    /**
     * Adds a message to collection
     *
     * @param boolean $shouldAdd
     * @param string $message
     * @return CompositeErrorBuilderInterface
     */
    public function addMessageForCase(bool $shouldAdd, string $message): CompositeErrorBuilderInterface;

    /**
     * Returns full error message
     *
     * @return string|null
     */
    public function build(): ?string;
}