Skip to content

Commit

Permalink
camelCase Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
detain committed Jun 24, 2017
1 parent ab4dd3a commit 089149e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/Ksplice.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class Ksplice
public $method = 'GET';
public $headers = [];
public $inputs = '';
public $response_raw = '';
public $responseRaw = '';
public $response = [];
private $rest_client;
public $machines_loaded = FALSE;
private $restClient;
public $machinesLoaded = FALSE;
public $ips = [];
public $hosts = [];
public $uuids = [];
Expand All @@ -46,7 +46,7 @@ public function __construct($apiUsername, $apiKey) {
if (file_exists(__DIR__ . '/../../../../include/rendering/RESTClient.php'))
include_once(__DIR__ . '/../../../../include/rendering/RESTClient.php');
if (class_exists('\\RestClient'))
$this->rest_client = new \RESTClient();
$this->restClient = new \RESTClient();
$this->headers = array(
'X-Uptrack-User' => $this->apiUsername,
'X-Uptrack-Key' => $this->apiKey,
Expand All @@ -59,10 +59,10 @@ public function __construct($apiUsername, $apiKey) {
* @return void
*/
public function request() {
$this->rest_client->createRequest($this->urlBase . $this->url, $this->method, $this->inputs, $this->headers);
$this->rest_client->sendRequest();
$this->response_raw = $this->rest_client->getResponse();
$this->response = json_decode($this->response_raw);
$this->restClient->createRequest($this->urlBase . $this->url, $this->method, $this->inputs, $this->headers);
$this->restClient->sendRequest();
$this->responseRaw = $this->restClient->getResponse();
$this->response = json_decode($this->responseRaw);
return $this->response;
}

Expand All @@ -80,7 +80,7 @@ public function list_machines() {
$this->hosts[$data['hostname']] = $data;
$this->uuids[$data['uuid']] = $data;
}
$this->machines_loaded = TRUE;
$this->machinesLoaded = TRUE;
return $this->response;
}

Expand All @@ -103,7 +103,7 @@ public function describe_machine($uuid) {
* @return string|bool
*/
public function ip_to_uuid($ipAddress) {
if (!$this->machines_loaded) {
if (!$this->machinesLoaded) {
$this->list_machines();
}
if (isset($this->ips[$ipAddress])) {
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function_requirements('activate_ksplice');
$uuid = $ksplice->ip_to_uuid($license->get_ip());
myadmin_log('licenses', 'info', "Got UUID $uuid from IP " . $license->get_ip(), __LINE__, __FILE__);
$ksplice->authorize_machine($uuid, TRUE);
myadmin_log('licenses', 'info', 'Response: ' . $ksplice->response_raw, __LINE__, __FILE__);
myadmin_log('licenses', 'info', 'Response: ' . $ksplice->responseRaw, __LINE__, __FILE__);
myadmin_log('licenses', 'info', 'Response: ' . json_encode($ksplice->response), __LINE__, __FILE__);
$event->stopPropagation();
}
Expand Down

0 comments on commit 089149e

Please sign in to comment.