public function toArray()
    {
        $output = $this->outputWrapper || $this->messages ? $this->getwrappedOutput() : $this->output;

        return $this->messages ? array_merge($output, $this->messages) : $output;
    }