@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function authToken() { |
79 | 79 | $time = time(); |
80 | - return $this->login . '|' . $time . '|' . sha1($this->key . $time); |
|
80 | + return $this->login.'|'.$time.'|'.sha1($this->key.$time); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | try { |
171 | 171 | $this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll); |
172 | 172 | } catch (\Exception $e) { |
173 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
174 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
173 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
174 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
175 | 175 | return false; |
176 | 176 | } |
177 | 177 | return $this->response; |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * @return false|array an array of licenses each one containing these fields: ip(string) ype(int) license type (1,2,16) registered(boolean) true if server was registered in CLN with this license (CLN licenses only). created(string) license creation time |
256 | 256 | */ |
257 | 257 | public function restList() { |
258 | - $this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token=' . $this->authToken()); |
|
258 | + $this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token='.$this->authToken()); |
|
259 | 259 | return json_decode($this->response, true); |
260 | 260 | } |
261 | 261 | |
@@ -291,14 +291,14 @@ discard block |
||
291 | 291 | * @return false|integer 0 on success, -1 on error |
292 | 292 | */ |
293 | 293 | public function license($ipAddress, $type) { |
294 | - $type = (int)$type; |
|
294 | + $type = (int) $type; |
|
295 | 295 | $xmlClient = $this->xmlClient; |
296 | 296 | try { |
297 | - $this->log('error', 'Calling License(' . $this->authToken() . ',' . $ipAddress . ',' . $type . ')'); |
|
297 | + $this->log('error', 'Calling License('.$this->authToken().','.$ipAddress.','.$type.')'); |
|
298 | 298 | $this->response = $xmlClient->license($this->authToken(), $ipAddress, $type); |
299 | 299 | } catch (\Exception $e) { |
300 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
301 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
300 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
301 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
302 | 302 | return false; |
303 | 303 | } |
304 | 304 | return $this->response; |