src/AbstractValidator.php
protected function getInvalidResult(string $code, array $parameters = null): ResultInterface
    {
        $templates = $this->getTemplates();
        if (array_key_exists($code, $templates) === false) {
            throw new TemplateNotFound($code);
        }

        return new InvalidResult($code, $templates[$code], $parameters ?? []);
    }
protected function getInvalidResult(string $code, array $parameters = null): ResultInterface
    {
        $templates = $this->getTemplates();
        if (array_key_exists($code, $templates) === false) {
            throw new TemplateNotFound($code);
        }

        return new InvalidResult($code, $templates[$code], $parameters ?? []);
    }
Create invalid result.

When template can not be found, an exception will be thrown.

@param string $code
@param array  $parameters
@return ResultInterface
@throws TemplateNotFound