@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | public function authToken() { |
79 | 79 | $time = time(); |
80 | 80 | try { |
81 | - return $this->login . '|' . $time . '|' . sha1($this->key . $time); |
|
81 | + return $this->login.'|'.$time.'|'.sha1($this->key.$time); |
|
82 | 82 | } catch (\Exception $e) { |
83 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
84 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
83 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
84 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
85 | 85 | return false; |
86 | 86 | } |
87 | 87 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | if (is_array($postfields)) { |
105 | 105 | $postdata = []; |
106 | 106 | foreach ($postfields as $field => $value) { |
107 | - $postdata[] = $field . '=' . urlencode($value); |
|
107 | + $postdata[] = $field.'='.urlencode($value); |
|
108 | 108 | } |
109 | 109 | curl_setopt($curl, CURLOPT_POSTFIELDS, implode('&', $postdata)); |
110 | 110 | } else { |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | try { |
192 | 192 | $this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll); |
193 | 193 | } catch (\Exception $e) { |
194 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
195 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
194 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
195 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
196 | 196 | return false; |
197 | 197 | } |
198 | 198 | return $this->response; |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | try { |
253 | 253 | $this->response = $this->remove($ipAddress, $type); |
254 | 254 | } catch (\Exception $e) { |
255 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
256 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
255 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
256 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
257 | 257 | return false; |
258 | 258 | } |
259 | 259 | return $this->response; |
@@ -283,10 +283,10 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function restList() { |
285 | 285 | try { |
286 | - $this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token=' . $this->authToken(), '', $this->restOptions); |
|
286 | + $this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token='.$this->authToken(), '', $this->restOptions); |
|
287 | 287 | } catch (\Exception $e) { |
288 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
289 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
288 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
289 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
290 | 290 | return false; |
291 | 291 | } |
292 | 292 | return json_decode($this->response, true); |
@@ -312,8 +312,8 @@ discard block |
||
312 | 312 | try { |
313 | 313 | $this->response = $xmlClient->reconcile($this->authToken()); |
314 | 314 | } catch (\Exception $e) { |
315 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
316 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
315 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
316 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
317 | 317 | return false; |
318 | 318 | } |
319 | 319 | return $this->response; |
@@ -328,16 +328,16 @@ discard block |
||
328 | 328 | * @return false|integer 0 on success, -1 on error |
329 | 329 | */ |
330 | 330 | public function license($ipAddress, $type) { |
331 | - $type = (int)$type; |
|
331 | + $type = (int) $type; |
|
332 | 332 | $xmlClient = $this->xmlClient; |
333 | 333 | try { |
334 | - $this->log('error', 'Calling License(' . $this->authToken() . ',' . $ipAddress . ',' . $type . ')'); |
|
334 | + $this->log('error', 'Calling License('.$this->authToken().','.$ipAddress.','.$type.')'); |
|
335 | 335 | $this->response = $xmlClient->license($this->authToken(), $ipAddress, $type); |
336 | - $this->log('error', 'Response: ' . var_export($this->response, true)); |
|
336 | + $this->log('error', 'Response: '.var_export($this->response, true)); |
|
337 | 337 | return $this->response; |
338 | 338 | } catch (\Exception $e) { |
339 | - $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
340 | - $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
339 | + $this->log('error', 'Caught exception code: '.$e->getCode()); |
|
340 | + $this->log('error', 'Caught exception message: '.$e->getMessage()); |
|
341 | 341 | return false; |
342 | 342 | } |
343 | 343 | } |