src/Replies/Reply.php
public function toArray()
    {
        $dispatch = [];
        $dispatch['status'] = $this->statusCode;

        if ($this->hasMessage()) {
            $dispatch['message'] = $this->message;
        }

        if ($this->hasPayload()) {
            $dispatch = array_merge($dispatch, $this->payload);
        }

        return $dispatch;
    }
public function toArray()
    {
        $dispatch = [];
        $dispatch['status'] = $this->statusCode;

        if ($this->hasMessage()) {
            $dispatch['message'] = $this->message;
        }

        if ($this->hasPayload()) {
            $dispatch = array_merge($dispatch, $this->payload);
        }

        return $dispatch;
    }
public function toArray ( ) { $ dispatch = [ ] ; $ dispatch [ 'status' ] = $ this -> statusCode ; if ( $ this -> hasMessage ( ) ) { $ dispatch [ 'message' ] = $ this -> message ; } if ( $ this -> hasPayload ( ) ) { $ dispatch = array_merge ( $ dispatch , $ this -> payload ) ; } return $ dispatch ; }
Convert the dispatch object to an array
@return array
Convert the dispatch object to an array