Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gruentee committed Jul 30, 2016
1 parent f2ed6be commit a41c3a9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Flowfact/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ class Client
private $headers = array();
private $requestOptions = array();
private $urlCache = array();
private $logger = null; // FOR DEBUGGING PURPOSES
private $logger = null;

public function __construct($username, $password, $customerId, $baseUrl, $acceptFormat = 'json')
{
$this->_authenticate($username, $password, $customerId); // maybe decouple base URL construction and auth??
$this->_authenticate($username, $password, $customerId);
$this->baseUrl = $baseUrl . '/' . $this->customerId . '/';
$this->setAcceptFormat($acceptFormat);
$this->client = new Http(['base_uri' => $this->baseUrl]);
// allowed HTTP methods
$this->methods = [
'get', 'post', 'put'
];
// DEBUG: set up logger
$logger = new Logger('application_logger');
$logger->pushHandler(new StreamHandler(__DIR__.'/debug.log', Logger::DEBUG));
$this->logger = $logger;
Expand Down Expand Up @@ -92,7 +91,7 @@ public function __call($name, $args)
}
else
{
throw new \Exception("Method not allowed"); // maybe change wording --> HTTP 401
throw new \Exception("Method not allowed");
}
}

Expand Down Expand Up @@ -123,7 +122,6 @@ public function makeRequest($method, $url, $requestBody = null)
{
if(null !== $requestBody)
{
// TODO: handle XML content type
$this->requestOptions['json'] = $requestBody;
}
return $this->client->{$method}($url, $this->requestOptions);
Expand Down

0 comments on commit a41c3a9

Please sign in to comment.