Skip to content

Commit

Permalink
fix naming issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dittertp committed Sep 29, 2014
1 parent 46eb878 commit b217894
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/Puzzle/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b217894

Please sign in to comment.