/** * @param Response\Response $response */ private function setSuccess($response) { $response->setSuccess($response->getHttpStatusCode() === 200); if ($response->getSuccess() === false) { $response->setApiError($response->getApiResponse('error')['message']); } }
/** * @param Response\Response $response */ private function setSuccess($response) { $response->setSuccess($response->getHttpStatusCode() === 200); if ($response->getSuccess() === false) { $message = $response->getApiResponse('message'); if ($message == null) { $message = $response->getHttpStatusCode(); } $response->setApiError($message); } }
/** * @param Response\Response $response * @param $success */ private function setSuccess(Response\Response $response, $success) { $response->setSuccess($success); if ($response->getSuccess() === false) { $message = $response->getApiResponse('TextResponse') ?: 'Unknown Error'; $response->setApiError($message); } }
private function setSuccess(Response\Response $response, $success) { $response->setSuccess($success); if ($response->getSuccess() === false) { $response->setApiError($response->getApiResponse('StatusMsg')); } }