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

@param array  $messages
@param string $type
@param string $group
Put messages in object messages stack .