Skip to content

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
h-wang committed Jun 3, 2015
1 parent 9f88271 commit f0e8f27
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Client.php
Expand Up @@ -6,7 +6,8 @@
use RuntimeException;

if (!function_exists('curl_file_create')) {
function curl_file_create($filename, $mimetype = '', $postname = '') {
function curl_file_create($filename, $mimetype = '', $postname = '')
{
return "@$filename;filename="
. ($postname ?: basename($filename))
. ($mimetype ? ";type=$mimetype" : '');
Expand All @@ -25,13 +26,13 @@ public function __construct($baseUrl, $username, $password)
$this->username = $username;
$this->password = $password;
}

private function getStatusCode($ch)
{
$info = curl_getinfo($ch);
return (int)$info['http_code'];
}

public function getUserByUsername($username)
{
$data = $this->getData('/users/' . $username);
Expand All @@ -44,14 +45,13 @@ public function getUserByUsername($username)
$user->setCreatedAt($data['created_at']);
$user->setDeletedAt($data['deleted_at']);
$user->setPasswordUpdatedAt($data['passwordupdated_at']);

print_r($userdata);

return $user;
}

public function getData($uri)
{

$url = $this->baseUrl . $uri;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
Expand Down

0 comments on commit f0e8f27

Please sign in to comment.