final protected function addFailureMessage(string $messageKey) : void
    {
        $messages = $this->getPossibleMessages();

        if (! isset($messages[$messageKey])) {
            throw new \RuntimeException('Unknown message key: ' . $messageKey);
        }

        $this->failureMessages[$messageKey] = $messages[$messageKey];
    }
final protected function addFailureMessage(string $messageKey) : void
    {
        $messages = $this->getPossibleMessages();

        if (! isset($messages[$messageKey])) {
            throw new \RuntimeException('Unknown message key: ' . $messageKey);
        }

        $this->failureMessages[$messageKey] = $messages[$messageKey];
    }
final protected function addFailureMessage ( string $ messageKey ) : void { $ messages = $ this -> getPossibleMessages ( ) ; if ( ! isset ( $ messages [ $ messageKey ] ) ) { throw new \ RuntimeException ( 'Unknown message key: ' . $ messageKey ) ; } $ this -> failureMessages [ $ messageKey ] = $ messages [ $ messageKey ] ; }
Adds a failure message.

@param string $messageKey The message key.

@return void

@throws \RuntimeException If the message key is unknown.
Adds a failure message .