protected function _format($statusCode=null, $message=null, $body=false)
    {
        $format = [];
        // Status Code field is necessary
        $format['code'] = ($statusCode) 
            ?: $this->response->getStatusCode();
        // Message field
        if ($message) {
            $format['message'] = $message;
        }
        // Body field
        if ($body !== false) {
            $format['data'] = $body;
        }
        
        return $format;
    }
protected function _format($statusCode=null, $message=null, $body=false)
    {
        $format = [];
        // Status Code field is necessary
        $format['code'] = ($statusCode) 
            ?: $this->response->getStatusCode();
        // Message field
        if ($message) {
            $format['message'] = $message;
        }
        // Body field
        if ($body !== false) {
            $format['data'] = $body;
        }
        
        return $format;
    }
protected function _format ( $ statusCode = null , $ message = null , $ body = false ) { $ format = [ ] ; // Status Code field is necessary $ format [ 'code' ] = ( $ statusCode ) ? : $ this -> response -> getStatusCode ( ) ; // Message field if ( $ message ) { $ format [ 'message' ] = $ message ; } // Body field if ( $ body !== false ) { $ format [ 'data' ] = $ body ; } return $ format ; }
Format Response Data

@deprecated 1.3.0
@param int Callback status code
@param string Callback status text
@param array|mixed|bool Callback data body, false will remove body key
@return array Formated array data
Format Response Data