protected function validatePattern(/*# string */ $pattern)
    {
        if (!is_string($pattern) ||
            substr_count($pattern, '[') !== substr_count($pattern, ']') ||
            substr_count($pattern, '{') !== substr_count($pattern, '}')
        ) {
            throw new LogicException(
                Message::get(Message::RTE_PATTERN_MALFORM, $pattern),
                Message::RTE_PATTERN_MALFORM
            );
        }
    }