/** * getDataModel * * @param Response $response * @param mixed|null $default * * @return mixed|null */ public function getDataModel(Response $response, $default = null) { if ($response instanceof DataResponse) { return $response->getDataBody(); } return $default; }