diff --git a/src/Puzzle/Client.php b/src/Puzzle/Client.php index b8ae43d..62cb86a 100644 --- a/src/Puzzle/Client.php +++ b/src/Puzzle/Client.php @@ -252,27 +252,6 @@ public function performRequest($method, $uri, $params = null, $body = null) } } - /** - * Serialize assoc array into JSON string - * - * @param string|array $data Assoc array to encode into JSON - * - * @return string - */ - public function serialize($data) - { - if (is_string($data) === true) { - return $data; - } else { - $data = json_encode($data); - if ($data === '[]') { - return '{}'; - } else { - return $data; - } - } - } - /** * precess the request * @@ -399,7 +378,7 @@ protected function execute($method, $uri, $params, $body) throw new ClientException("Error setting cURL Header options."); } } - + $result = curl_exec($this->getHandle()); $response["data"] = $this->getSerializer()->deserialize($result); $response["status"] = $this->getStatusCode(); diff --git a/src/Puzzle/Interfaces/SerializerInterfac.php b/src/Puzzle/Interfaces/SerializerInterface.php similarity index 100% rename from src/Puzzle/Interfaces/SerializerInterfac.php rename to src/Puzzle/Interfaces/SerializerInterface.php