src/Validator/AbstractValidator.php
public function setMessageTemplate($message, $key = null)
    {
        $message = (string) $message;

        if ($key === null) {
            $keys = array_keys($this->messageTemplates);
            foreach ($keys as $key) {
                $this->setMessageTemplate($message, $key);
            }

            return $this;
        } else {
            $this->messageTemplates[$key] = $message;
        }
    }
public function setMessageTemplate($message, $key = null)
    {
        $message = (string) $message;

        if ($key === null) {
            $keys = array_keys($this->messageTemplates);
            foreach ($keys as $key) {
                $this->setMessageTemplate($message, $key);
            }

            return $this;
        } else {
            $this->messageTemplates[$key] = $message;
        }
    }
{@inheritdoc}