private function populateMessages(array $messages, $type, $group)
    {
        foreach ($messages as $message) {
            $this->messages[] = ['message' => $message, 'type' => $type, 'group' => $group];
        }
    }