From c445c4d8516959d57c953175069b8de69e662cbb Mon Sep 17 00:00:00 2001 From: yoye Date: Thu, 5 Sep 2013 15:34:17 +0200 Subject: [PATCH] Fix typo in responseHandler --- src/Mailgun/Connection/RestClient.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mailgun/Connection/RestClient.php b/src/Mailgun/Connection/RestClient.php index 4ffeb59..7955c78 100644 --- a/src/Mailgun/Connection/RestClient.php +++ b/src/Mailgun/Connection/RestClient.php @@ -76,25 +76,25 @@ class RestClient{ } public function responseHandler($responseObj){ - $httpResponeCode = $responseObj->getStatusCode(); - if($httpResponeCode === 200){ + $httpResponseCode = $responseObj->getStatusCode(); + if($httpResponseCode === 200){ $jsonResponseData = json_decode($responseObj->getBody(), false); $result = new \stdClass(); $result->http_response_body = $jsonResponseData; } - elseif($httpResponeCode == 400){ + elseif($httpResponseCode == 400){ throw new MissingRequiredParameters(EXCEPTION_MISSING_REQUIRED_PARAMETERS); } - elseif($httpResponeCode == 401){ + elseif($httpResponseCode == 401){ throw new InvalidCredentials(EXCEPTION_INVALID_CREDENTIALS); } - elseif($httpResponeCode == 404){ + elseif($httpResponseCode == 404){ throw new MissingEndpoint(EXCEPTION_MISSING_ENDPOINT); } else{ throw new GenericHTTPError(EXCEPTION_GENERIC_HTTP_ERROR); } - $result->http_response_code = $httpResponeCode; + $result->http_response_code = $httpResponseCode; return $result; } }